+
+
+ {{#slidergeneralsettings.showindicatornav}}
+
+ {{#slidecontent}}
+
+ {{/slidecontent}}
+
+ {{/slidergeneralsettings.showindicatornav}}
+
+
+
+ {{#slidecontent}}
+
+ {{/slidecontent}}
+
+
+ {{#slidergeneralsettings.showarrownav}}
+
+
+ prev
+
+
+
+ next
+
+ {{/slidergeneralsettings.showarrownav}}
+
+
+
+{{/slidergeneralsettings.show}}
+
+
+{{#js}}
+require(['jquery', 'theme_boost/bootstrap/carousel'], function($) {
+ if (document.getElementById("slider")) {
+ let carouselitems = document.getElementById("slider").getElementsByClassName('carousel-item');
+ if (carouselitems && carouselitems[0]){
+ carouselitems[0].className += ' active';
+ }
+
+ let carouselindicators = document.getElementById("slider").getElementsByTagName('li');
+ if (carouselindicators && carouselindicators[0]) {
+ carouselindicators[0].className += ' active';
+ }
+
+ $('#slider').carousel();
+ }
+});
+
+{{/js}}
\ No newline at end of file
diff --git a/templates/theme_boost/drawers.mustache b/templates/theme_boost/drawers.mustache
index 7c551938c4c..b2202a56a23 100644
--- a/templates/theme_boost/drawers.mustache
+++ b/templates/theme_boost/drawers.mustache
@@ -204,6 +204,10 @@
{{/regions.contentupper.hasblocks}}
+ {{#sliderpositionbefore}}
+ {{> theme_boost_union/slider }}
+ {{/sliderpositionbefore}}
+
{{#advtilespositionbefore}}
{{> theme_boost_union/advertisementtiles }}
{{/advtilespositionbefore}}
@@ -228,6 +232,7 @@
{{/overflow}}
+
{{{courserelatedhints}}}
{{{ output.main_content }}}
{{{ output.activity_navigation }}}
@@ -237,6 +242,10 @@
{{#advtilespositionafter}}
{{> theme_boost_union/advertisementtiles }}
{{/advtilespositionafter}}
+ {{#sliderpositionafter}}
+ {{> theme_boost_union/slider }}
+ {{/sliderpositionafter}}
+
{{#regions.contentlower.hasblocks}}
diff --git a/tests/behat/theme_boost_union_contentsettings_slider.feature b/tests/behat/theme_boost_union_contentsettings_slider.feature
new file mode 100644
index 00000000000..612ae939e04
--- /dev/null
+++ b/tests/behat/theme_boost_union_contentsettings_slider.feature
@@ -0,0 +1,188 @@
+@theme @theme_boost_union @theme_boost_union_contentsettings @theme_boost_union_contentsettings_slider @javascript @_file_upload
+Feature: Configuring the theme_boost_union plugin for the "Slider" tab on the "Content" page
+ In order to use the features
+ As admin
+ I need to be able to configure the theme Boost Union plugin
+
+ Background:
+ Given the following config values are set as admin:
+ | debug | 0 |
+ | debugdisplay | 0 |
+ And the following config values are set as admin:
+ | config | value | plugin |
+ | slideractivatedsetting | 1 | theme_boost_union |
+ | slidercaptionsetting | 1 | theme_boost_union |
+ | slidercontentsetting | 1 | theme_boost_union |
+ | slide1enabled | yes | theme_boost_union |
+ And I log in as "admin"
+ And I navigate to "Appearance > Boost Union > Content" in site administration
+ And I click on "Slider" "link" in the "#adminsettings .nav-tabs" "css_element"
+ And I upload "theme/boost_union/tests/fixtures/login_bg1.jpg" file to "Slide 1 image" filemanager
+ And I press "Save changes"
+
+ Scenario Outline: Setting: Slider - Display Slider on Frontpage When activated
+ Given the following config values are set as admin:
+ | config | value | plugin |
+ | slideractivatedsetting |