PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms 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
Possible License(s): CC-BY-SA-3.0
  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. <table>
  10. <tr>
  11. <td>
  12. <ul>
  13. @foreach (var user in Model)
  14. {
  15. @Html.ActionLink(user.UserName, "Show", new { area="Administration", controller="Users", userName = user.UserName })
  16. <br />
  17. }
  18. </ul>
  19. </td>
  20. <td>
  21. @using (var form = Html.BeginCommandForm<CreateUser, UsersController>(c => c.Create(null), FormMethod.Post))
  22. {
  23. @form.Html.HiddenFor(c => c.Id);
  24. @form.Html.LabelFor(c => c.Name)
  25. @form.Html.TextBoxFor(c => c.Name) <br />
  26. @form.Html.LabelFor(c => c.Password)
  27. @form.Html.TextBoxFor(c => c.Password) <br />
  28. <input type="submit" value="Create user" />
  29. }
  30. </td>
  31. </tr>
  32. </table>