1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template core/sticky_footer
|
|
|
19 |
|
|
|
20 |
Displays a page sticky footer element.
|
|
|
21 |
|
|
|
22 |
Sticky footer behaviour depends on the theme. The default template is
|
|
|
23 |
a regular element.
|
|
|
24 |
|
|
|
25 |
Classes required for JS:
|
|
|
26 |
* none
|
|
|
27 |
|
|
|
28 |
Data attributes optional for JS:
|
|
|
29 |
* data-disable Number|String - If the sticky footer should be disabled by default
|
|
|
30 |
|
|
|
31 |
Context variables required for this template:
|
|
|
32 |
* disable Boolean - if the sticky footer should be loaded hidden
|
|
|
33 |
|
|
|
34 |
Example context (json):
|
|
|
35 |
{
|
|
|
36 |
"stickycontent" : "<a href=\"#\">Moodle</a>",
|
|
|
37 |
"extras" : [
|
|
|
38 |
{
|
|
|
39 |
"attribute" : "data-example",
|
|
|
40 |
"value" : "stickyfooter"
|
|
|
41 |
}
|
|
|
42 |
],
|
|
|
43 |
"stickyclasses" : "extraclasses"
|
|
|
44 |
}
|
|
|
45 |
}}
|
|
|
46 |
<div
|
|
|
47 |
id="sticky-footer"
|
|
|
48 |
class="{{$ stickyclasses }}{{stickyclasses}}{{/ stickyclasses }}"
|
|
|
49 |
{{$ disable }}
|
|
|
50 |
{{#disable}} data-disable="true" {{/disable}}
|
|
|
51 |
{{/ disable }}
|
|
|
52 |
{{#extras}}
|
|
|
53 |
{{attribute}}="{{value}}"
|
|
|
54 |
{{/extras}}
|
|
|
55 |
>
|
|
|
56 |
{{$ stickycontent }}
|
|
|
57 |
{{{stickycontent}}}
|
|
|
58 |
{{/ stickycontent }}
|
|
|
59 |
</div>
|
|
|
60 |
{{#js}}
|
|
|
61 |
require(['core/sticky-footer'], function(footer) {
|
|
|
62 |
footer.init();
|
|
|
63 |
});
|
|
|
64 |
|
|
|
65 |
{{/js}}
|