user_participate_form.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <{include file="./admin/header.html"}>
  2. <{include file="./admin/left.html"}>
  3. <{include file="./admin/nav.html"}>
  4. <{include file="get_kindeditor.html"}>
  5. <div id="activity_container">
  6. <div class="activity_center">
  7. <{include file="./admin/activity/common_nav.html"}>
  8. 查看:
  9. <{if $action == 'all'}>
  10. <span class="text-muted">全部</span> &nbsp;
  11. <{else}>
  12. <a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageList&events_id=<{$eventData.id}>&action=all">全部</a> &nbsp;
  13. <{/if}>
  14. <{if $action == 'member'}>
  15. <span class="text-muted">用户</span> &nbsp;
  16. <{else}>
  17. <a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageList&groupByUid=true&events_id=<{$eventData.id}>&action=member">用户</a> &nbsp;
  18. <{/if}>
  19. <{if $action == 'form'}>
  20. <span class="text-muted">表单</span> &nbsp;
  21. <{else}>
  22. <a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageEventFormData&events_id=<{$eventData.id}>&action=form">表单</a> &nbsp;
  23. <{/if}>
  24. <{if $isPrizes}>
  25. <{if $action == 'win'}>
  26. <span class="text-muted">中奖</span> &nbsp;
  27. <{else}>
  28. <a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=PageLotteryDataList&events_id=<{$eventData.id}>&action=win">中奖</a> &nbsp;
  29. <{/if}>
  30. <{/if}>
  31. <a href="<{$web_cfg.domain}>/?c=Admin_Activity_UserHelp&a=PageList&events_id=<{$eventData.id}>">助力排行</a> &nbsp;
  32. <{if $download_url}>
  33. <a href="<{$download_url}>" target="_blank" class="" style="padding:0 10px;margin-left:10px;"><i class="fa fa-download"></i> 导出数据</a>
  34. <{/if}>
  35. <{*
  36. <a href="" target="_blank" class="button button-primary button-small" style="width:; float:right" ><i class="fa fa-download"></i> 导出数据报表 </a>
  37. *}>
  38. <div class="block_10"></div>
  39. <div class="panel panel-default">
  40. <div class="panel-body">
  41. <div class="form-group">
  42. <div>
  43. <table class="table table-hover">
  44. <thead>
  45. <tr>
  46. <th>参与人</th>
  47. <th>UID</th>
  48. <th>时间</th>
  49. <th>行为</th>
  50. <{if $audit}>
  51. <th>审核状态</th>
  52. <{/if}>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <{if $formData}>
  57. <{foreach from=$formData item=data}>
  58. <tr>
  59. <td>
  60. <{if $userData[$data.uid].headimgurl}>
  61. <img class="img-rounded" width="48" height="48" src="<{$userData[$data.uid].headimgurl}>" />
  62. <{else}>
  63. <img class="img-rounded" width="48" height="48" src="http://news.mydrivers.com/Img/20110518/04481549.png" />
  64. <{/if}>
  65. <{if $userData[$data.uid].nickname}><{$userData[$data.uid].nickname}><{else}>游客<{/if}></td>
  66. <td><{$data.uid}></td>
  67. <td><{"Y-m-d H:i:s"|date:$data.create_time}></td>
  68. <td>
  69. <{foreach from=$formType item=name}>
  70. <{$name}>:<span class="text-muted"><{$data.$name}></span>&nbsp;
  71. <{/foreach}>
  72. </td>
  73. <{if $audit}>
  74. <th><input type="checkbox" class="audit" name="audit[<{$data.id}>]" value="<{$data.id}>" <{if $data.audit == 2}>checked<{/if}>/></th>
  75. <{/if}>
  76. </tr>
  77. <{/foreach}>
  78. <{else}>
  79. <tr>
  80. <td colspan="3" align="center" class="text-muted">无表单数据</td>
  81. </tr>
  82. <{/if}>
  83. </tbody>
  84. </table>
  85. <{if $audit}>
  86. <div style="float:right" ><input type="checkbox" id="audit" value="2" />全选&nbsp;&nbsp;&nbsp;&nbsp;
  87. <a id="audit_submit" href="javascript:;" class="button button-default button-rounded">更新状态</a>
  88. </div>
  89. <br /><br /><br />
  90. <{/if}>
  91. <div class="page"><{$page_html}></div><p style="float:right" >参与人数:<{$total_num}></p>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <{include file="./admin/activity/common_right.html"}>
  98. <div style="clear:both;"></div>
  99. </div>
  100. <script>
  101. KISSY.use('node, io, event', function (S, Node, IO, Event) {
  102. var $ = S.all;
  103. });
  104. function checkAll()
  105. {
  106. $("#audit").click(function(){
  107. if ($(this).prop('checked')) {
  108. $(".audit").prop('checked',true);
  109. } else {
  110. $(".audit").prop('checked',false);
  111. }
  112. })
  113. }
  114. function submit()
  115. {
  116. $("#audit_submit").click(function()
  117. {
  118. var yes = [];
  119. var no = [];
  120. $(".audit").each(function(){
  121. if ($(this).prop('checked')) {
  122. yes.push($(this).val());
  123. } else {
  124. no.push($(this).val());
  125. }
  126. });
  127. var state = true;
  128. if (state) {
  129. var id = '<{$eventData.id}>';
  130. var url = '<{$web_cfg.domain}>/?c=Admin_Activity_UserParticipateLog&a=Audit';
  131. $.post(url, {id:id,yes:yes.join(','),no:no.join(',')}, function(res) {
  132. alert('更新成功');
  133. });
  134. } else {
  135. alert('请选择一个选项');
  136. }
  137. })
  138. }
  139. checkAll();
  140. submit();
  141. </script>
  142. <{include file="./admin/bottom.html"}>