list.tpl 6.7 KB

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