Index.cshtml 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @{
  2. ViewBag.Title = "Index";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using AirWheel.Cycling.Service;
  6. @using AirWheel.Cycling.Domain;
  7. @using AirWheel.Cycling.Common;
  8. @using CommonToolHelper;
  9. @model PageInfo<COM_UPLOAD>
  10. <script type="text/javascript">
  11. function Detail(n) {
  12. dig.addModel('文件详情', '/Com/Upload/Detail/' + n, 600, 450, function () {
  13. });
  14. }
  15. </script>
  16. <div class="row col-lg-12">
  17. <div class="wrapper wrapper-content animated fadeInUp">
  18. <div class="ibox">
  19. <div class="ibox-title">
  20. <h5>文件管理</h5>
  21. </div>
  22. <div class="ibox-content">
  23. <!-- search star -->
  24. @using (Ajax.BeginForm("Index", null, new AjaxOptions() { }, new { @id = "form1", @class = "form-horizontal", @method = "get" }))
  25. {
  26. <div class="form-horizontal clearfix">
  27. <div class="col-lg-4 col-sm-4" style="float:right;">
  28. <div class="form-group">
  29. <div class="col-lg-12 col-sm-12 input-group">
  30. @Html.TextBox("Search", null, new { @class = "input-sm form-control", @placeholder = "请输入查询关键词" })
  31. <span class="input-group-btn">
  32. <button type="submit" onclick="submit()" class="btn btn-sm btn-primary"> 搜索</button>
  33. </span>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <!-- search end -->
  39. <div id="example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
  40. <table id="example" class="table table-striped table-bordered table-hover dataTables-example dataTable" cellspacing="0" width="100%">
  41. <thead>
  42. <tr>
  43. <th style="width:130px !important;">上传时间</th>
  44. <th style="width:100px !important;">上传者</th>
  45. <th style="width:50px !important;">类型</th>
  46. <th>原名称</th>
  47. <th>新名称</th>
  48. <th>文件大小</th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. @{foreach (var item in Model.List)
  53. {
  54. <tr>
  55. <td>
  56. <a href="javascript:Detail('@item.ID')">
  57. @item.UPTIME</a></td>
  58. <td>@item.UPOPEATOR</td>
  59. <td>@item.UPFILESUFFIX</td>
  60. <td>@item.UPOLDNAME</td>
  61. <td>@item.UPNEWNAME</td>
  62. <td>@(item.UPFILESIZE+""+item.UPFILEUNIT)</td>
  63. </tr>
  64. }
  65. }
  66. </tbody>
  67. </table>
  68. <!-- page -->
  69. <div class="bottom">
  70. <div class="dataTables_info" id="example_info" post="status" aria-live="polite">显示第 @Model.BeginPage 至 @Model.EndPage 项结果,共 @Model.Count 项</div>
  71. <div class="dataTables_length" id="example_length">
  72. <label>
  73. 显示
  74. <select name="example_length" onchange="submit()" aria-controls="example" class="form-control input-sm">
  75. <option value="10" @(Model.PageSize == 10 ? "selected" : "")>10</option>
  76. <option value="25" @(Model.PageSize == 25 ? "selected" : "")>25</option>
  77. <option value="50" @(Model.PageSize == 50 ? "selected" : "")>50</option>
  78. <option value="100" @(Model.PageSize == 100 ? "selected" : "")>100</option>
  79. </select> 项结果
  80. </label>
  81. </div>
  82. @CommonHtmlHelper.PaginationPager(Model.Index, Model.PageSize, Model.Count, 7, Model.Url)
  83. <div class="clear"></div>
  84. </div>
  85. <!-- page -->
  86. </div>
  87. }
  88. </div>
  89. </div>
  90. </div>
  91. </div>