table.tpl 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3. $('#entries').dataTable( {
  4. "oLanguage": {
  5. "sLengthMenu": "_MENU_ " + "{{'DataTableLengthMenu'|get_lang}}",
  6. "sZeroRecords": "{{'DataTableZeroRecords'|get_lang}}",
  7. "sInfo": "{{'DataTableInfo'|get_lang}}",
  8. "sInfoEmpty": "{{'DataTableInfoEmpty'|get_lang}}",
  9. "sInfoFiltered": "{{'DataTableInfoFiltered'|get_lang}}",
  10. "sSearch": "{{'DataTableSearch'|get_lang}}",
  11. "oPaginate": {
  12. "sPrevious": "",
  13. "sNext": ""
  14. }
  15. }
  16. });
  17. } );
  18. </script>
  19. <table id="entries" class="data_table glossary entries" data-c_id="{{c_id}}" data-session_id="{{session_id}}" >
  20. <thead>
  21. <tr>
  22. <th class="sorting">
  23. {{'TermName'|get_lang}}
  24. </th>
  25. <th class="sorting">
  26. {{'TermDefinition'|get_lang}}
  27. </th>
  28. {% if is_allowed_to_edit %}
  29. <th>
  30. {{'Actions'|get_lang}}
  31. </th>
  32. {% endif %}
  33. </tr>
  34. </thead>
  35. <tbody>
  36. {% for item in items %}
  37. <tr id="glossary_{{item.id}}" class="glossary term" data-id="{{item.id}}" data-c_id="{{item.c_id}}" data-type="glossary">
  38. <td class="title">
  39. {{item.name}}
  40. </td>
  41. <td class="">
  42. {{item.description}}
  43. </td>
  44. {% if is_allowed_to_edit %}
  45. <td class="td_actions">
  46. {% if session_id == item.session_id %}
  47. <a href="{{root}}&amp;action=edit&amp;id={{item.id}}"
  48. title="{{'Edit'|get_lang}}">
  49. <i class="size-22 icon-edit"></i>
  50. </a>
  51. <a href="{{root}}&amp;action=delete&amp;id={{item.id}}"
  52. onclick="ui.remove('glossary_{{item.id}}', this); return false;"
  53. title="{{'Delete'|get_lang}}">
  54. <i class="size-22 icon-delete"></i>
  55. </a>
  56. {% else %}
  57. <img title="{{'EditionNotAvailableFromSession'|get_lang}}"
  58. alt="{{'EditionNotAvailableFromSession'|get_lang}}"
  59. src="{{'edit_na.png'|icon(22)}}"
  60. style="vertical-align:middle;">
  61. {% endif %}
  62. </td>
  63. {% endif %}
  64. </tr>
  65. {% endfor %}
  66. </tbody>
  67. </table>
  68. <div style="clear:both"></div>