vgquotes/Src/VideoGameQuotes.Web/Views/Admin/SingleUser.ascx
2011-03-02 20:18:33 +00:00

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>