Index.cshtml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. @using Webdiyer.WebControls.Mvc
  2. @model PagedList<Hospital.Model.D_Models.Models.D_NcisAnnouncement>
  3. @{
  4. ViewBag.Title = "卫健委更新内容";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. }
  7. <div class="page-header">
  8. <h3>
  9. @if (ViewBag.Logo != null)
  10. {
  11. <img src="@ViewBag.Logo" id="logoImg" style="margin:0px 5px 5px 0px;" />
  12. }
  13. <i class="fa fa-volume-down"></i> @ViewBag.Title
  14. <a href="@Url.Action("Index","MAdmin")" class='backbutton'><i class="icon-white fa fa-arrow-circle-left"></i>返回</a>
  15. </h3>
  16. </div>
  17. <div style="">
  18. @if (Model != null && Model.Any())
  19. {
  20. var i = 1;
  21. <table class="table table-striped table-hover">
  22. <thead>
  23. <tr>
  24. <th></th>
  25. <th>标题</th>
  26. <th>日期</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. @foreach (var item in Model)
  31. {
  32. <tr>
  33. <td style="width:60px;text-align:center;">@i</td>
  34. <td>
  35. <a href="@Url.Action("Details", "NcisAnnouncement", new { Area = "Admin" ,@id = item.ID})">@item.Title</a>
  36. </td>
  37. <td style="width:260px;">@item.AddTime</td>
  38. </tr>
  39. i++;
  40. }
  41. </tbody>
  42. </table>
  43. <div class="pagination">
  44. <p class="status">共 @Model.TotalItemCount 条记录,页 @Model.CurrentPageIndex / @Model.TotalPageCount</p>
  45. @Html.Pager(Model, new PagerOptions
  46. {
  47. AutoHide = false,
  48. PageIndexParameterName = "page",
  49. ContainerTagName = "ul",
  50. PagerItemWrapperFormatString = "<li>{0}</li>",
  51. CurrentPagerItemWrapperFormatString = "<li class='active'><span>{0}</span></li>",
  52. NumericPagerItemCount = 5,
  53. })
  54. </div>
  55. }
  56. else
  57. {
  58. <div class="alert alert-block">
  59. <i class="fa fa-info-circle"></i><strong>暂无数据</strong>
  60. </div>
  61. }
  62. </div>