footer.tpl 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <footer> <!-- start of #footer section -->
  2. <div class="container">
  3. <div class="row">
  4. <div id="footer_left" class="col-md-4">
  5. {% if session_teachers is not null %}
  6. <div id="session_teachers">
  7. {{ session_teachers }}
  8. </div>
  9. {% endif %}
  10. {% if teachers is not null %}
  11. <div id="teachers">
  12. {{ teachers }}
  13. </div>
  14. {% endif %}
  15. {# Plugins for footer section #}
  16. {% if plugin_footer_left is not null %}
  17. <div id="plugin_footer_left">
  18. {{ plugin_footer_left }}
  19. </div>
  20. {% endif %}
  21. &nbsp;
  22. </div>
  23. <div id="footer_center" class="col-md-4">
  24. {# Plugins for footer section #}
  25. {% if plugin_footer_center is not null %}
  26. <div id="plugin_footer_center">
  27. {{ plugin_footer_center }}
  28. </div>
  29. {% endif %}
  30. &nbsp;
  31. </div>
  32. <div id="footer_right" class="col-md-4">
  33. {% if administrator_name is not null %}
  34. <div id="admin_name">
  35. {{ administrator_name }}
  36. </div>
  37. {% endif %}
  38. <div id="software_name">
  39. <a href="{{_p.web}}" target="_blank">{{ "PoweredByX" |get_lang | format(_s.software_name) }}</a>
  40. &copy; {{ "now"|date("Y") }}
  41. </div>
  42. {# Plugins for footer section #}
  43. {% if plugin_footer_right is not null %}
  44. <div id="plugin_footer_right">
  45. {{ plugin_footer_right }}
  46. </div>
  47. {% endif %}
  48. &nbsp;
  49. </div><!-- end of #footer_right -->
  50. </div><!-- end of #row -->
  51. </div><!-- end of #container -->
  52. </footer>
  53. {# Extra footer configured in admin section, only shown to non-admins #}
  54. {{ footer_extra_content }}
  55. <div class="modal fade" id="expand-image-modal" tabindex="-1" role="dialog" aria-labelledby="expand-image-modal-title" aria-hidden="true">
  56. <div class="modal-dialog modal-lg">
  57. <div class="modal-content">
  58. <div class="modal-header">
  59. <button type="button" class="close" data-dismiss="modal" aria-label="{{ "Close" | get_lang }}"><span aria-hidden="true">&times;</span></button>
  60. <h4 class="modal-title" id="expand-image-modal-title">&nbsp;</h4>
  61. </div>
  62. <div class="modal-body">
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <script>
  68. $("form").on("click", ' .advanced_parameters', function() {
  69. /*var id = $(this).attr('id') + '_options';
  70. console.log(id);
  71. $("#"+id).toggleClass('active');
  72. var button = $(this);
  73. $("#"+id).toggle(function() {
  74. $("#"+id).toggleClass('active');
  75. });*/
  76. });
  77. /* Makes row highlighting possible */
  78. $(document).ready( function() {
  79. // Date time settings.
  80. moment.locale('{{ locale }}');
  81. $.datepicker.setDefaults($.datepicker.regional["{{ locale }}"]);
  82. $.datepicker.regional["local"] = $.datepicker.regional["{{ locale }}"];
  83. // Bootstrap tabs.
  84. $('.tab-wrapper a').click(function (e) {
  85. e.preventDefault();
  86. $(this).tab('show');
  87. //$('#tabs a:first').tab('show') // Select first tab
  88. });
  89. // Fixes bug when loading links inside a tab.
  90. $('.tab-wrapper .tab-pane a').unbind();
  91. /**
  92. * Advanced options
  93. * Usage
  94. * <a id="link" href="url">Advanced</a>
  95. * <div id="link_options">
  96. * hidden content :)
  97. * </div>
  98. * */
  99. $(".advanced_options").on("click", function(event) {
  100. event.preventDefault();
  101. var id = $(this).attr('id') + '_options';
  102. var button = $(this);
  103. button.toggleClass('active');
  104. $("#"+id).toggle();
  105. });
  106. /**
  107. * <a class="advanced_options_open" href="http://" rel="div_id">Open</a>
  108. * <a class="advanced_options_close" href="http://" rel="div_id">Close</a>
  109. * <div id="div_id">Div content</div>
  110. * */
  111. $(".advanced_options_open").on("click", function(event) {
  112. event.preventDefault();
  113. var id = $(this).attr('rel');
  114. $("#"+id).show();
  115. });
  116. $(".advanced_options_close").on("click", function(event) {
  117. event.preventDefault();
  118. var id = $(this).attr('rel');
  119. $("#"+id).hide();
  120. });
  121. // Chosen select
  122. $(".chzn-select").chosen({
  123. disable_search_threshold: 10,
  124. no_results_text: '{{ 'SearchNoResultsFound' | get_lang }}',
  125. placeholder_text_multiple: '{{ 'SelectSomeOptions' | get_lang }}',
  126. placeholder_text_single: '{{ 'SelectAnOption' | get_lang }}',
  127. width: "100%"
  128. });
  129. // Adv multi-select search input.
  130. $('.select_class_filter').on('focus', function() {
  131. var inputId = $(this).attr('id');
  132. inputId = inputId.replace('-filter', '');
  133. $("#"+ inputId).filterByText($("#"+inputId+"-filter"));
  134. });
  135. $(".jp-jplayer audio").addClass('skip');
  136. // Mediaelement
  137. jQuery('video:not(.skip), audio:not(.skip)').mediaelementplayer(/* Options */);
  138. // Table highlight.
  139. $("form .data_table input:checkbox").click(function() {
  140. if ($(this).is(":checked")) {
  141. $(this).parentsUntil("tr").parent().addClass("row_selected");
  142. } else {
  143. $(this).parentsUntil("tr").parent().removeClass("row_selected");
  144. }
  145. });
  146. /* For non HTML5 browsers */
  147. if ($("#formLogin".length > 1)) {
  148. $("input[name=login]").focus();
  149. }
  150. /* For IOS users */
  151. $('.autocapitalize_off').attr('autocapitalize', 'off');
  152. // Tool tip (in exercises)
  153. var tip_options = {
  154. placement : 'right'
  155. };
  156. $('.boot-tooltip').tooltip(tip_options);
  157. });
  158. // @todo move in a chamilo.js js lib.
  159. jQuery.fn.filterByText = function(textbox) {
  160. return this.each(function() {
  161. var select = this;
  162. var options = [];
  163. $(select).find('option').each(function() {
  164. options.push({value: $(this).val(), text: $(this).text()});
  165. });
  166. $(select).data('options', options);
  167. $(textbox).bind('change keyup', function() {
  168. var options = $(select).empty().data('options');
  169. var search = $.trim($(this).val());
  170. var regex = new RegExp(search,"gi");
  171. $.each(options, function(i) {
  172. var option = options[i];
  173. if(option.text.match(regex) !== null) {
  174. $(select).append(
  175. $('<option>').text(option.text).val(option.value)
  176. );
  177. }
  178. });
  179. });
  180. });
  181. };
  182. /**
  183. * Generic function to replace the deprecated jQuery toggle function
  184. * @param inId : id of block to hide / unhide
  185. * @param inIdTxt : id of the button
  186. * @param inTxtHide : text one of the button
  187. * @param inTxtUnhide : text two of the button
  188. * @todo : allow to detect if text is from a button or from a <a>
  189. */
  190. function hideUnhide(inId, inIdTxt, inTxtHide, inTxtUnhide)
  191. {
  192. if ($('#'+inId).css("display") == "none") {
  193. $('#'+inId).show(400);
  194. $('#'+inIdTxt).attr("value", inTxtUnhide);
  195. } else {
  196. $('#'+inId).hide(400);
  197. $('#'+inIdTxt).attr("value", inTxtHide);
  198. }
  199. }
  200. </script>
  201. {{ execution_stats }}