/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
Possible License(s): CC-BY-SA-3.0
- @using Bifrost.Web.Mvc.Commands
- @using Bifrost.Samples.Blog.Mvc.Areas.Administration.Features.Users;
- @using Bifrost.Samples.Blog.Views.Security;
- @using Bifrost.Samples.Blog.Domain.Security.Commands;
- @model IEnumerable<User>
- @{
- ViewBag.Title = "Users Administration";
- }
-
- <table>
- <tr>
- <td>
- <ul>
- @foreach (var user in Model)
- {
- @Html.ActionLink(user.UserName, "Show", new { area="Administration", controller="Users", userName = user.UserName })
- <br />
- }
-
- </ul>
- </td>
-
- <td>
- @using (var form = Html.BeginCommandForm<CreateUser, UsersController>(c => c.Create(null), FormMethod.Post))
- {
- @form.Html.HiddenFor(c => c.Id);
- @form.Html.LabelFor(c => c.Name)
- @form.Html.TextBoxFor(c => c.Name) <br />
-
- @form.Html.LabelFor(c => c.Password)
- @form.Html.TextBoxFor(c => c.Password) <br />
-
- <input type="submit" value="Create user" />
- }
- </td>
- </tr>
-
-
- </table>