list.tpl 5.7 KB

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