Add pre footer see BT#11080

pull/2487/head
jmontoyaa 10 years ago
parent 16a491efd0
commit 92c8c11857
  1. 3
      main/inc/lib/plugin.lib.php
  2. 7
      main/template/default/layout/footer.tpl
  3. 8
      plugin/courseblock/CourseBlockPlugin.php
  4. 1
      plugin/courseblock/lang/english.php

@ -19,6 +19,7 @@ class AppPlugin
'header_center',
'header_left',
'header_right',
'pre_footer',
'footer_left',
'footer_center',
'footer_right',
@ -427,7 +428,7 @@ class AppPlugin
"subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins','setting')
)
);
$settings_filtered = array();
foreach ($plugin_settings as $item) {
$settings_filtered[$item['variable']] = $item['selected_value'];

@ -1,3 +1,10 @@
{# Plugins for footer section #}
{% if plugin_pre_footer is not null %}
<div id="plugin_footer_left">
{{ plugin_pre_footer }}
</div>
{% endif %}
<footer> <!-- start of #footer section -->
<div class="container">
<div class="row">

@ -10,6 +10,10 @@ class CourseBlockPlugin extends Plugin
// When creating a new course this settings are added to the course
public $course_settings = array(
array(
'name' => 'course_block_pre_footer',
'type' => 'textarea'
),
array(
'name' => 'course_block_footer_left',
'type' => 'textarea'
@ -81,6 +85,10 @@ class CourseBlockPlugin extends Plugin
$content = api_get_course_setting('course_block_footer_right');
$content = $content === -1 ? '' : $content;
break;
case 'pre_footer':
$content = api_get_course_setting('course_block_pre_footer');
$content = $content === -1 ? '' : $content;
break;
}
return $content;
}

@ -8,4 +8,5 @@ $strings['tool_enable_help'] = 'Once enabled, you will have to configure the plu
$strings['course_block_footer_left'] = 'Footer left';
$strings['course_block_footer_center'] = 'Footer center';
$strings['course_block_footer_right'] = 'Footer right';
$strings['course_block_pre_footer'] = 'Pre footer';

Loading…
Cancel
Save