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/initials_bar
|
|
|
19 |
|
|
|
20 |
Initials bar.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"title": "First name",
|
|
|
25 |
"class": "firstinitial",
|
|
|
26 |
"current": "A",
|
|
|
27 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst",
|
|
|
28 |
"all": "All",
|
|
|
29 |
"group": [
|
|
|
30 |
{
|
|
|
31 |
"letter": [
|
|
|
32 |
{
|
|
|
33 |
"name": "A",
|
|
|
34 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=A"
|
|
|
35 |
},
|
|
|
36 |
{
|
|
|
37 |
"name": "B",
|
|
|
38 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=B"
|
|
|
39 |
},
|
|
|
40 |
{
|
|
|
41 |
"name": "C",
|
|
|
42 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=C"
|
|
|
43 |
},
|
|
|
44 |
{
|
|
|
45 |
"name": "D",
|
|
|
46 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=D"
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
]
|
|
|
50 |
},
|
|
|
51 |
{
|
|
|
52 |
"letter": [
|
|
|
53 |
{
|
|
|
54 |
"name": "W",
|
|
|
55 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=W",
|
|
|
56 |
"selected": "W"
|
|
|
57 |
},
|
|
|
58 |
{
|
|
|
59 |
"name": "X",
|
|
|
60 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=X"
|
|
|
61 |
},
|
|
|
62 |
{
|
|
|
63 |
"name": "Y",
|
|
|
64 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=Y"
|
|
|
65 |
},
|
|
|
66 |
{
|
|
|
67 |
"name": "Z",
|
|
|
68 |
"url": "http://moodle.generic32/report/progress/index.php?course=2&sifirst=Z"
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
]
|
|
|
72 |
}
|
|
|
73 |
]
|
|
|
74 |
}
|
|
|
75 |
}}
|
|
|
76 |
<div class="initialbar {{class}}">
|
|
|
77 |
<h5 class="initialbarlabel font-weight-bold d-block">{{title}}</h5>
|
|
|
78 |
|
|
|
79 |
<div class="initialbargroups d-flex flex-wrap justify-content-center justify-content-md-start">
|
|
|
80 |
<ul class="pagination pagination-sm my-1">
|
|
|
81 |
{{#current}}
|
|
|
82 |
<li class="initialbarall page-item">
|
|
|
83 |
<a data-initial="" class="page-link" href="{{url}}">
|
|
|
84 |
<svg class="mr-2" width="20" height="20" fill="none" viewBox="0 0 24 24">
|
|
|
85 |
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5.75 19.2502H18.25C18.8023 19.2502 19.25 18.8025 19.25 18.2502V5.75C19.25 5.19772 18.8023 4.75 18.25 4.75H5.75C5.19772 4.75 4.75 5.19772 4.75 5.75V18.2502C4.75 18.8025 5.19772 19.2502 5.75 19.2502Z"></path>
|
|
|
86 |
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 9.25L5.25 9.25"></path>
|
|
|
87 |
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 14.75L5.25 14.75"></path>
|
|
|
88 |
</svg>
|
|
|
89 |
{{all}}</a>
|
|
|
90 |
</li>
|
|
|
91 |
{{/current}}
|
|
|
92 |
{{^current}}
|
|
|
93 |
<li class="initialbarall page-item active">
|
|
|
94 |
<a data-initial="" class="page-link">
|
|
|
95 |
<svg class="mr-2" width="20" height="20" fill="none" viewBox="0 0 24 24">
|
|
|
96 |
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5.75 19.2502H18.25C18.8023 19.2502 19.25 18.8025 19.25 18.2502V5.75C19.25 5.19772 18.8023 4.75 18.25 4.75H5.75C5.19772 4.75 4.75 5.19772 4.75 5.75V18.2502C4.75 18.8025 5.19772 19.2502 5.75 19.2502Z"></path>
|
|
|
97 |
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 9.25L5.25 9.25"></path>
|
|
|
98 |
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.25 14.75L5.25 14.75"></path>
|
|
|
99 |
</svg>
|
|
|
100 |
{{all}}</a>
|
|
|
101 |
</a>
|
|
|
102 |
</li>
|
|
|
103 |
{{/current}}
|
|
|
104 |
</ul>
|
|
|
105 |
{{#group}}
|
|
|
106 |
<ul class="pagination pagination-sm my-1">
|
|
|
107 |
{{#letter}}
|
|
|
108 |
{{#selected}}
|
|
|
109 |
<li data-initial="{{name}}" class="page-item active {{name}}"><span class="page-link">{{name}}</span></li>
|
|
|
110 |
{{/selected}}
|
|
|
111 |
{{^selected}}
|
|
|
112 |
<li data-initial="{{name}}" class="page-item {{name}}"><a class="page-link" href="{{url}}">{{name}}</a></li>
|
|
|
113 |
{{/selected}}
|
|
|
114 |
{{/letter}}
|
|
|
115 |
</ul>
|
|
|
116 |
{{/group}}
|
|
|
117 |
</div>
|
|
|
118 |
</div>
|
|
|
119 |
|