list.tpl 6.7 KB

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