Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 comments.
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 booktool_print/print_book_chapter
19
 
20
    Print book chapter page.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * printdialoglink string The URL pointing to the print book chapter popup window.
30
    * booktitle string The HTML of the book title.
31
    * parentchaptertitle string The HTML of the parent chapter title (if exists).
32
    * chapter object The object containing the HTML of the chapter content and chapter's visibility.
33
 
34
    Example context (json):
35
    {
36
        "printdialoglink": "<a>Print book</a>",
37
        "booktitle": "<h2>Book title</h2>",
38
        "parentchaptertitle": "<h2>Parent chapter title</h2>",
39
        "chapter": {
40
            "content": "<div>Chapter content</div>",
41
            "visible": "true"
42
        }
43
    }
44
}}
45
<div class="chapter col-12 p-4">
46
    <div class="text-right">{{{ printdialoglink }}}</div>
47
    <div class="text-center pb-5">{{{ booktitle }}}</div>
48
    <div class="chapter">
49
        {{#parentchaptertitle}}
50
         <div class="text-center">
51
            {{{parentchaptertitle}}}
52
         </div>
53
        {{/parentchaptertitle}}
54
        {{{chapter.content}}}
55
    </div>
56
</div>