26 lines
859 B
Plaintext
26 lines
859 B
Plaintext
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VideoGameQuotes.Web.Models.UserModel>" %>
|
||
|
<%@ Import Namespace="VideoGameQuotes.Api" %>
|
||
|
|
||
|
<div class="user-container">
|
||
|
<p>
|
||
|
<strong><%: Model.User.Username ?? "<no username>" %></strong>
|
||
|
[<em><%: Model.User.IpAddress %></em>]
|
||
|
</p>
|
||
|
|
||
|
<dl>
|
||
|
<dt>Created</dt>
|
||
|
<dd><%: Model.User.Created %></dd>
|
||
|
<dt>Group</dt>
|
||
|
<dd><%: Model.User.Group %></dd>
|
||
|
</dl>
|
||
|
|
||
|
<% if (Model.CurrentUser.Group == UserGroup.Admin) { %>
|
||
|
<div class="user-admin">
|
||
|
<%= Html.ActionLink("edit", "edit", "User", new { usernameOrIp = Model.User.Username ?? Model.User.IpAddress }, null) %> |
|
||
|
<%= Html.ActionLink("delete", "delete", "User", new { id = Model.User.Id }, null)%> |
|
||
|
<%= Html.ActionLink("ban", "ban", "User", new { id = Model.User.Id }, null)%>
|
||
|
</div>
|
||
|
<% } %>
|
||
|
|
||
|
<hr />
|
||
|
</div>
|