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 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/movecm
19
 
20
    Displays the course index.
21
 
22
    Example context (json):
23
    {
24
        "cmname": "Activity name",
25
        "cmid": 42,
26
        "sections": [
27
            {
28
                "title": "General",
29
                "id": 42,
30
                "number": 1,
31
                "sectionurl": "#",
32
                "hascms": true,
33
                "cms": [
34
                    {
35
                        "name": "Glossary of characters",
36
                        "id": "10",
37
                        "url": "#"
38
                    },
39
                    {
40
                        "name": "World Cinema forum",
41
                        "id": "11",
42
                        "url": "#"
43
                    },
44
                    {
45
                        "name": "Announcements",
46
                        "id": "12",
47
                        "url": "#"
48
                    }
49
                ]
50
            },
51
            {
52
                "title": "City of God or Cidade de Deus",
53
                "id": "43",
54
                "number": "2",
55
                "sectionurl": "#",
56
                "hascms": true,
57
                "cms": [
58
                    {
59
                        "name": "Resources",
60
                        "id": "13",
61
                        "url": "#"
62
                    },
63
                    {
64
                        "name": "Studying City of God by Stephen Smith Bergman-Messerschmidt",
65
                        "id": "14",
66
                        "url": "#"
67
                    },
68
                    {
69
                        "name": "Film education study guide",
70
                        "id": "15",
71
                        "url": "#"
72
                    }
73
                ]
74
            }
75
        ]
76
    }
77
 
78
}}
79
<p data-for="sectionname">{{information}}:</p>
80
<nav class="collapse-list" id="destination-selector" role="tree">
81
    {{#sections}}
82
    <div data-for="sectionnode"
83
        role="treeitem"
84
    >
85
        <div class="collapse-list-item d-flex"
86
            id="movemodalsection{{number}}"
87
            data-for="section_item"
88
        >
89
            <a data-toggle="collapse"
90
                href="#movemodalcollapse{{number}}"
91
                aria-expanded="false"
92
                aria-controls="movemodalcollapse{{number}}"
93
                class="collapse-list-link icons-collapse-expand collapsed"
94
            >
95
                <span class="collapsed-icon icon-no-margin mr-1"
96
                    data-toggle="tooltip" title="{{#str}} expand, core {{/str}}">
97
                    {{#pix}} t/collapsed, core {{/pix}}
98
                    <span class="sr-only">{{#str}} expand, core {{/str}}</span>
99
                </span>
100
                <span class="expanded-icon icon-no-margin mr-1"
101
                    data-toggle="tooltip" title="{{#str}} collapse, core {{/str}}">
102
                    {{#pix}} t/expanded, core {{/pix}}
103
                    <span class="sr-only">{{#str}} collapse, core {{/str}}</span>
104
                </span>
105
            </a>
106
            <a href="#"
107
                class="collapse-list-link text-truncate"
108
                data-for="section"
109
                data-id="{{id}}"
110
                data-number="{{number}}"
111
            >
112
                {{{title}}}
113
            </a>
114
            <span class="dragicon ml-auto">{{#pix}}i/dragdrop{{/pix}}</span>
115
        </div>
116
        <div id="movemodalcollapse{{number}}"
117
            class="collapse-list-item-content collapse"
118
            aria-labelledby="movemodalsection{{number}}"
119
            role="group"
120
        >
121
            <ul class="unlist" data-for="cmlist" data-id="{{id}}">
122
                {{#cms}}
123
                <li class="collapse-list-item d-flex" role="treeitem">
124
                    <a class="collapse-list-link text-truncate"
125
                        href="#"
126
                        data-for="cm"
127
                        data-id="{{id}}"
128
                    >
129
                        {{{name}}}
130
                    </a>
131
                </li>
132
                {{/cms}}
133
            </ul>
134
        </div>
135
    </div>
136
    {{/sections}}
137
</nav>