Index.cshtml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @using Webdiyer.WebControls.Mvc
  2. @model PagedList<Hospital.Model.Models.ReportInnerAnnounce>
  3. @{
  4. ViewBag.Title = "公告";
  5. }
  6. <div class=" user_heading">
  7. <h1 class="page__title">公告</h1>
  8. <p class="page__desc md-color-white">
  9. <i class="fa fa-folder-o" title="分类"></i>&nbsp;所有分类
  10. </p>
  11. </div>
  12. <div class="page__hd no-padding">
  13. @if (Model != null && Model.Any())
  14. {
  15. <div class="weui-panel">
  16. <div class="weui-panel__bd">
  17. @foreach (var item in Model)
  18. {
  19. <a class="weui-cell weui-cell_access" href="@Url.Action("Details", "InterAnnounce", new { area = "WxApp", id = @item.Id ,returnUrl = Request.RawUrl})">
  20. <div class="weui-cell__bd weui-cell_primary">
  21. <h4 class="weui-media-box__title white-space-normal">
  22. @item.Title
  23. @{ var flag = item.UserInterAnnounces.Where(e => e.UserId == (int)ViewBag.UserProfileId);
  24. if (!flag.Any())
  25. {
  26. <small class='uk-badge uk-badge-primary md-color-white'>新</small>
  27. }
  28. }
  29. </h4>
  30. <ul class="weui-media-box__info">
  31. <li class="weui-media-box__info__meta"><i class="md-list-addon-icon material-icons">date_range</i>@item.ReportTime.ToShortDateString()</li>
  32. </ul>
  33. </div>
  34. <div class="weui-cell__ft">
  35. </div>
  36. </a>
  37. }
  38. </div>
  39. </div>
  40. <div class="weui-panel__ft">
  41. <div class="weui-cell weui-cell_link">
  42. <div class="weui-cell__bd">共 @Model.TotalItemCount 条记录,页 @Model.CurrentPageIndex / @Model.TotalPageCount</div>
  43. </div>
  44. </div>
  45. <div style="text-align: center;">
  46. @Html.Pager(Model, new PagerOptions
  47. {
  48. AutoHide = false,
  49. PageIndexParameterName = "page",
  50. ContainerTagName = "ul",
  51. PagerItemWrapperFormatString = "<li>{0}</li>",
  52. CurrentPagerItemWrapperFormatString = "<li class='active'><span>{0}</span></li>",
  53. NumericPagerItemCount = 5,
  54. CssClass = "pagination",
  55. ShowPageIndexBox = false,
  56. AlwaysShowFirstLastPageNumber = true,
  57. ShowNumericPagerItems = false,
  58. })
  59. </div>
  60. }
  61. else
  62. {
  63. <div class="weui-cells">
  64. <div class="weui-cell">
  65. <div class="weui-cell__bd">
  66. <p>暂无公告</p>
  67. </div>
  68. </div>
  69. </div>
  70. }
  71. </div>