PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Samples/Blog/Bifrost.Samples.Blog.Mvc/Areas/Administration/Features/Users/Index.cshtml

#
Razor | 39 lines | 32 code | 7 blank | 0 comment | 0 complexity | be2581c37e555e89aefce100cc9b80e9 MD5 | raw file
 1@using Bifrost.Web.Mvc.Commands
 2@using Bifrost.Samples.Blog.Mvc.Areas.Administration.Features.Users;
 3@using Bifrost.Samples.Blog.Views.Security;
 4@using Bifrost.Samples.Blog.Domain.Security.Commands;
 5@model IEnumerable<User>
 6@{
 7    ViewBag.Title = "Users Administration";
 8}
 9
10<table>
11    <tr>
12        <td>
13            <ul>
14                @foreach (var user in Model)
15                {
16                    @Html.ActionLink(user.UserName, "Show", new { area="Administration", controller="Users", userName = user.UserName })
17                    <br />
18                }
19            
20            </ul>
21        </td>
22
23        <td>
24            @using (var form = Html.BeginCommandForm<CreateUser, UsersController>(c => c.Create(null), FormMethod.Post))
25            {
26                @form.Html.HiddenFor(c => c.Id);
27                @form.Html.LabelFor(c => c.Name)
28                @form.Html.TextBoxFor(c => c.Name) <br />
29                
30                @form.Html.LabelFor(c => c.Password)
31                @form.Html.TextBoxFor(c => c.Password) <br />
32                
33                <input type="submit" value="Create user" />
34            }
35        </td>
36    </tr>
37
38
39</table>