file_array_data.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li class="active"><a>所有数据</a></li>
  7. <li><a href="{:url('theme/fileArrayDataEdit',['tab'=>$tab,'var'=>$var,'file_id'=>$file_id,'widget'=>$widget])}">添加数据</a>
  8. </li>
  9. </ul>
  10. <form method="post" class="js-ajax-form margin-top-20">
  11. <table class="table table-hover table-bordered table-list">
  12. <thead>
  13. <tr>
  14. <foreach name="array_item" item="vo">
  15. <th>{$vo.title}</th>
  16. </foreach>
  17. <th width="120">{:lang('ACTIONS')}</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. <foreach name="array_items" item="item" key="itemKey">
  22. <tr>
  23. <foreach name="array_item" item="vo">
  24. <td>
  25. <switch name="vo.type">
  26. <case value="image">
  27. <notempty name="$item[$key]">
  28. <img src="{:cmf_get_image_preview_url($item[$key])}" style="height:100px;"/>
  29. </notempty>
  30. </case>
  31. <default>
  32. {$item[$key]|default=''}
  33. </default>
  34. </switch>
  35. </td>
  36. </foreach>
  37. <td>
  38. <a href="{:url('theme/fileArrayDataEdit',['tab'=>$tab,'var'=>$var,'file_id'=>$file_id,'widget'=>$widget,'item_index'=>$itemKey])}">编辑</a>
  39. <a href="{:url('theme/fileArrayDataDelete',['tab'=>$tab,'var'=>$var,'file_id'=>$file_id,'widget'=>$widget,'item_index'=>$itemKey])}"
  40. class="js-ajax-delete">删除</a>
  41. </td>
  42. </tr>
  43. </foreach>
  44. </tbody>
  45. </table>
  46. </form>
  47. </div>
  48. <script src="__STATIC__/js/admin.js"></script>
  49. <script>
  50. function confirm() {
  51. return true;
  52. }
  53. </script>
  54. </body>
  55. </html>