list.tpl 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <script>
  2. function confirmation(name) {
  3. if (confirm("{{ "AreYouSureToDeleteJS"|get_lang }} \"" + name + "\" ?")) {
  4. return true;
  5. } else {
  6. return false;
  7. }
  8. }
  9. </script>
  10. {{ introduction_section }}
  11. {% for lp_data in data %}
  12. <h3 class="page-header">
  13. {% if is_allowed_to_edit %}
  14. {% if (categories|length) > 1 %}
  15. {{ lp_data.category.getName() }}
  16. {% endif %}
  17. {% else %}
  18. {% if (categories|length) > 1 %}
  19. {% if lp_data.lp_list is not empty and lp_data.category.getId() != 0 %}
  20. {{ lp_data.category.getName() }}
  21. {% elseif lp_data.lp_list is not empty and lp_data.category.getId() == 0 %}
  22. {{ lp_data.category.getName() }}
  23. {% elseif lp_data.lp_list is not empty and lp_data.category.getId() != 0 %}
  24. {{ lp_data.category.getName() }}
  25. {% endif %}
  26. {% endif %}
  27. {% endif %}
  28. {% if lp_data.category.getId() > 0 and is_allowed_to_edit %}
  29. <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=add_lp_category&id=' ~ lp_data.category.getId() }}" title="{{ "Edit"|get_lang }}">
  30. <img src="{{ "edit.png"|icon }}" alt="{{ "Edit"|get_lang }}">
  31. </a>
  32. {% if loop.index0 == 1 %}
  33. <a href="#">
  34. <img src="{{ "up_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
  35. </a>
  36. {% else %}
  37. <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_up_category&id=' ~ lp_data.category.getId() }}" title="{{ "Move"|get_lang }}">
  38. <img src="{{ "up.png"|icon }}" alt="{{ "Move"|get_lang }}">
  39. </a>
  40. {% endif %}
  41. {% if (data|length - 1) == loop.index0 %}
  42. <a href="#">
  43. <img src="{{ "down_na.png"|icon }}" alt="{{ "Move"|get_lang }}">
  44. </a>
  45. {% else %}
  46. <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=move_down_category&id=' ~ lp_data.category.getId() }}" title="{{ "Move"|get_lang }}">
  47. <img src="{{ "down.png"|icon }}" alt="{{ "Move"|get_lang }}">
  48. </a>
  49. {% endif %}
  50. <a href="{{ 'lp_controller.php?' ~ _p.web_cid_query ~ '&action=delete_lp_category&id=' ~ lp_data.category.getId() }}" title="{{ "Delete"|get_lang }}">
  51. <img src="{{ "delete.png"|icon }}" alt="{{ "Delete"|get_lang }}">
  52. </a>
  53. {% endif %}
  54. </h3>
  55. {% if lp_data.lp_list %}
  56. <div class="table-responsive">
  57. <table class="table table-hover table-striped">
  58. <thead>
  59. <tr>
  60. <th>{{ "Title"|get_lang }}</th>
  61. {% if is_allowed_to_edit %}
  62. <th>{{ "PublicationDate"|get_lang }}</th>
  63. <th>{{ "ExpirationDate"|get_lang }}</th>
  64. <th>{{ "Progress"|get_lang }}</th>
  65. <th>{{ "AuthoringOptions"|get_lang }}</th>
  66. {% else %}
  67. {% if not is_invitee %}
  68. <th>{{ "Progress"|get_lang }}</th>
  69. {% endif %}
  70. <th>{{ "Actions"|get_lang }}</th>
  71. {% endif %}
  72. </tr>
  73. </thead>
  74. <tbody>
  75. {% for row in lp_data.lp_list %}
  76. <tr>
  77. <td>
  78. {{ row.learnpath_icon }}
  79. <a href="{{ row.url_start }}">
  80. {{ row.title }}
  81. {{ row.session_image }}
  82. {{ row.extra }}
  83. </a>
  84. </td>
  85. {% if is_allowed_to_edit %}
  86. <td>
  87. {% if row.start_time %}
  88. <span class="small">{{ row.start_time }}</span>
  89. {% endif %}
  90. </td>
  91. <td>
  92. <span class="small">{{ row.end_time }}</span>
  93. </td>
  94. <td>
  95. {{ row.dsp_progress }}
  96. </td>
  97. {% else %}
  98. {% if not is_invitee %}
  99. <td>
  100. {{ row.dsp_progress }}
  101. </td>
  102. {% endif %}
  103. {% endif %}
  104. <td>
  105. {{ row.action_build }}
  106. {{ row.action_edit }}
  107. {{ row.action_visible }}
  108. {{ row.action_tracking }}
  109. {{ row.action_publish }}
  110. {{ row.action_subscribe_users }}
  111. {{ row.action_serious_game }}
  112. {{ row.action_reinit }}
  113. {{ row.action_default_view }}
  114. {{ row.action_debug }}
  115. {{ row.action_export }}
  116. {{ row.action_copy }}
  117. {{ row.action_auto_launch }}
  118. {{ row.action_pdf }}
  119. {{ row.action_delete }}
  120. {{ row.action_order }}
  121. </td>
  122. </tr>
  123. {% endfor %}
  124. </tbody>
  125. </table>
  126. </div>
  127. {% endif %}
  128. {% endfor %}
  129. {% if is_allowed_to_edit and not lp_is_shown %}
  130. <div id="no-data-view">
  131. <h2>{{ "LearningPaths"|get_lang }}</h2>
  132. <img src="{{ "scorms.png"|icon(64) }}" width="64" height="64">
  133. <div class="controls">
  134. <a href="{{ web_self ~ "?" ~ _p.web_cid_query ~ "&action=add_lp" }}" class="btn btn-default">
  135. {{ "LearnpathAddLearnpath"|get_lang }}
  136. </a>
  137. </div>
  138. </div>
  139. {% endif %}