Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 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_courseformat/local/content/movecmsection
19
 
20
    Displays the course index.
21
 
22
    Example context (json):
23
    {
24
        "title": "General",
25
        "id": 42,
26
        "number": 1,
27
        "sectionurl": "#",
28
        "hascms": true,
29
        "cms": [
30
            {
31
                "name": "Glossary of characters",
32
                "id": "10",
33
                "url": "#",
34
                "sectioninfo": false
35
            },
36
            {
37
                "name": "World Cinema forum",
38
                "id": "11",
39
                "url": "#",
40
                "sectioninfo": {
41
                    "title": "World Cinema forum",
42
                    "id": "11",
43
                    "number": "5",
44
                    "sectionurl": "#",
45
                    "hascms": true,
46
                    "cms": [
47
                        {
48
                            "name": "Announcements",
49
                            "id": "12",
50
                            "url": "#",
51
                            "sectioninfo": false
52
                        }
53
                    ]
54
                }
55
            },
56
            {
57
                "name": "Announcements",
58
                "id": "12",
59
                "url": "#",
60
                "sectioninfo": false
61
            }
62
        ]
63
    }
64
}}
65
<div class="collapse-list-item d-flex"
66
     id="movemodalsection{{number}}"
67
     data-for="section_item"
68
>
69
    <a data-bs-toggle="collapse"
70
       href="#movemodalcollapse{{number}}"
71
       aria-expanded="false"
72
       aria-controls="movemodalcollapse{{number}}"
73
       class="collapse-list-link icons-collapse-expand collapsed"
74
    >
75
        <span class="collapsed-icon icon-no-margin me-1" data-bs-toggle="tooltip" title="{{#str}} expand, core {{/str}}">
76
            {{#pix}} t/collapsedchevron, core {{/pix}}
77
            <span class="visually-hidden">{{#str}} expand, core {{/str}}</span>
78
        </span>
79
        <span class="expanded-icon icon-no-margin me-1" data-bs-toggle="tooltip" title="{{#str}} collapse, core {{/str}}">
80
            {{#pix}} t/expandedchevron, core {{/pix}}
81
            <span class="visually-hidden">{{#str}} collapse, core {{/str}}</span>
82
        </span>
83
    </a>
84
    <a href="#"
85
       class="collapse-list-link text-truncate"
86
       data-for="section"
87
       data-id="{{id}}"
88
       data-number="{{number}}"
89
    >
90
        {{{title}}}
91
    </a>
92
    <span class="dragicon ms-auto">{{#pix}}i/dragdrop{{/pix}}</span>
93
</div>
94
<div id="movemodalcollapse{{number}}"
95
     class="collapse"
96
     aria-labelledby="movemodalsection{{number}}"
97
     role="group"
98
>
99
    <ul class="unlist" data-for="cmlist" data-id="{{id}}">
100
        {{#cms}}
101
            {{#sectioninfo}}
102
                <li class="d-flex flex-column" role="treeitem" data-for="sectionnode">
103
                    {{> core_courseformat/local/content/movecmsection}}
104
                </li>
105
            {{/sectioninfo}}
106
            {{^sectioninfo}}
107
                <li class="collapse-list-item d-flex" role="treeitem">
108
                    <a class="text-truncate"
109
                       href="#"
110
                       data-for="cm"
111
                       data-id="{{id}}"
112
                    >
113
                        {{{name}}}
114
                    </a>
115
                </li>
116
            {{/sectioninfo}}
117
        {{/cms}}
118
    </ul>
119
</div>