footer.tpl 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <footer> <!-- start of #footer section -->
  2. <div class="container">
  3. <div class="row">
  4. <div id="footer_left" class="span4">
  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="span4">
  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="span4">
  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. {{ "Platform"|get_lang }} <a href="{{_p.web}}" target="_blank">{{_s.software_name}} {{_s.system_version}}</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. {% raw %}
  56. <script>
  57. $("form").on("click", ' .advanced_parameters', function() {
  58. var id = $(this).attr('id') + '_options';
  59. var button = $(this);
  60. $("#"+id).toggle(function() {
  61. button.toggleClass('active');
  62. });
  63. });
  64. /* Makes row highlighting possible */
  65. $(document).ready( function() {
  66. /**
  67. * Advanced options
  68. * Usage
  69. * <a id="link" href="url">Advanced</a>
  70. * <div id="link_options">
  71. * hidden content :)
  72. * </div>
  73. * */
  74. $(".advanced_options").on("click", function(event) {
  75. event.preventDefault();
  76. var id = $(this).attr('id') + '_options';
  77. var button = $(this);
  78. $("#"+id).toggle(function() {
  79. button.toggleClass('active');
  80. });
  81. });
  82. /**
  83. * <a class="advanced_options_open" href="http://" rel="div_id">Open</a>
  84. * <a class="advanced_options_close" href="http://" rel="div_id">Close</a>
  85. * <div id="div_id">Div content</div>
  86. * */
  87. $(".advanced_options_open").on("click", function(event) {
  88. event.preventDefault();
  89. var id = $(this).attr('rel');
  90. $("#"+id).show();
  91. });
  92. $(".advanced_options_close").on("click", function(event) {
  93. event.preventDefault();
  94. var id = $(this).attr('rel');
  95. $("#"+id).hide();
  96. });
  97. // Chosen select
  98. $(".chzn-select").chosen({
  99. disable_search_threshold: 10
  100. });
  101. $(".jp-jplayer audio").addClass('skip');
  102. // Mediaelement
  103. jQuery('video:not(.skip), audio:not(.skip)').mediaelementplayer(/* Options */);
  104. // Table highlight.
  105. $("form .data_table input:checkbox").click(function() {
  106. if ($(this).is(":checked")) {
  107. $(this).parentsUntil("tr").parent().addClass("row_selected");
  108. } else {
  109. $(this).parentsUntil("tr").parent().removeClass("row_selected");
  110. }
  111. });
  112. /* For non HTML5 browsers */
  113. if ($("#formLogin".length > 1)) {
  114. $("input[name=login]").focus();
  115. }
  116. /* For IOS users */
  117. $('.autocapitalize_off').attr('autocapitalize', 'off');
  118. //Tool tip (in exercises)
  119. var tip_options = {
  120. placement : 'right'
  121. };
  122. $('.boot-tooltip').tooltip(tip_options);
  123. });
  124. {% endraw %}
  125. </script>
  126. {{ execution_stats }}