messageList.ejs 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <div class="row" ng-controller="messageList">
  2. <% include public/modal %>
  3. <div class="col-xs-12">
  4. <div class="box">
  5. <div class="box-body table-responsive no-padding" >
  6. <table class="table table-hover">
  7. <tr>
  8. <th>选择</th>
  9. <th>文章标题</th>
  10. <th>留言内容</th>
  11. <th>留言者</th>
  12. <th>邮箱</th>
  13. <th>关联用户(回复)</th>
  14. <th>时间</th>
  15. <th>管理</th>
  16. </tr>
  17. <tr ng-repeat="msgs in data">
  18. <td><input type="checkbox" class="mini"/></td>
  19. <td class=" sorting_1"><a href="/details/{{msgs.contentId}}.html" target="_blank">{{msgs.contentTitle | limitTo : 20}}</a></td>
  20. <td class=" ">{{msgs.content | limitTo : 50}}</td>
  21. <td ng-switch on="msgs.utype">
  22. <span ng-switch-when="0">{{msgs.author.userName}}</span>
  23. <span ng-switch-when="1">{{msgs.adminAuthor.userName}}</span>
  24. </td>
  25. <td ng-switch on="msgs.utype">
  26. <span ng-switch-when="0">{{msgs.author.email}}</span>
  27. <span ng-switch-when="1">{{msgs.adminAuthor.email}}</span>
  28. </td>
  29. <td class=" ">{{msgs.replyAuthor.userName}}</td>
  30. <td class=" ">{{msgs.date | date : "yyyy-MM-dd HH:mm:ss"}}</td>
  31. <td class=" ">
  32. <button class="btn btn-primary btn-xs" data-whatever="{{msgs}}" data-toggle="modal" data-target="#getMsgDetails"><span class="fa fa-fw fa-mail-reply" aria-hidden="true"></span>回复</button>
  33. <button class="btn btn-default btn-xs" ng-click="delMsgsItem(msgs._id)"><span class="fa fa-fw fa-trash-o" aria-hidden="true"></span>删除</button>
  34. </td>
  35. </tr>
  36. </table>
  37. </div><!-- /.box-body -->
  38. <% include public/tableFooter %>
  39. </div><!-- /.box -->
  40. </div><!-- /.col -->
  41. <!--查看留言详情模态窗口-->
  42. <div class="modal fade" id="getMsgDetails">
  43. <div class="modal-dialog">
  44. <div class="modal-content">
  45. <div class="modal-header">
  46. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  47. <h4 class="modal-title">留言回复</h4>
  48. </div>
  49. <div class="modal-body">
  50. <div class="" id="showMsgDetail" style="min-height: 60px;padding: 10px 20px 40px;">
  51. </div>
  52. <form role="form" class="form-horizontal" name="repForm" ng-submit="repMsgForm(repForm.$valid)" novalidate>
  53. <div class="form-group">
  54. <div class="col-md-2">
  55. <label class="form-label-stripped">回复</label>
  56. </div>
  57. <div class="col-md-10">
  58. <textarea rows="3" class="form-control" ng-model="repFormData.content" required></textarea>
  59. <label for="inputError" class="control-label text-danger" ng-show="repForm.content.$invalid && !repForm.content.$pristine"><i class="glyphicon glyphicon-info-sign"></i> 请填写正确的邮箱地址</label>
  60. </div>
  61. </div>
  62. <div class="margin-top-10">
  63. <button class="btn btn-primary theme-btn pull-right" ng-disabled="repForm.$invalid">回复</button>
  64. </div>
  65. <div class="clearfix"></div>
  66. </form>
  67. </div><!-- /.modal-content -->
  68. </div><!-- /.modal-dialog -->
  69. </div><!-- /.modal -->
  70. </div><!-- /.row -->
  71. </div>
  72. <script>
  73. /*targetID:全局对应指定记录的标记,在修改和删除时使用*/
  74. </script>