MDL-64506 templates: Move BS2 labels to BS4 badges
[moodle.git] / user / templates / status_details.mustache
CommitLineData
80d13bfe
JP
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_user/status_details
19
20 Template for the user enrolment status details.
21
22 Context variables required for this template:
23 * fullname string - The user's full name.
24 * coursename string - The course name.
25 * enrolinstancename string - The enrolment instance name.
26 * status string - The enrolment status.
4544451a 27 * statusclass string - The CSS class for the enrolment status.
80d13bfe
JP
28 * timestart string - Optional. The enrolment time start.
29 * timeend string - Optional. The enrolment time end.
6676f202 30 * timeenrolled string - Optional. The time when the user was enrolled.
80d13bfe
JP
31
32 Example context (json):
33 {
34 "fullname": "Student John",
35 "coursename": "TC 1",
36 "enrolinstancename": "Manual enrolment",
37 "status": "Active",
3f2c68f1 38 "statusclass": "badge badge-success",
80d13bfe 39 "timestart": "1 January 2017",
6676f202
RK
40 "timeend": "31 January 2018",
41 "timeenrolled": "31 December 2016"
80d13bfe
JP
42 }
43}}
44<table class="table user-enrol-details">
45 <tr>
46 <th>
47 {{#str}}fullname{{/str}}
48 </th>
49 <td class="user-fullname">
50 {{fullname}}
51 </td>
52 </tr>
53 <tr>
54 <th>
55 {{#str}}course{{/str}}
56 </th>
57 <td class="user-course">
58 {{coursename}}
59 </td>
60 </tr>
61 <tr>
62 <th>
63 {{#str}}enrolmentmethod, enrol{{/str}}
64 </th>
65 <td class="user-enrol-instance">
98024662 66 {{enrolinstancename}} {{{editenrollink}}}
80d13bfe
JP
67 </td>
68 </tr>
69 <tr>
70 <th>
71 {{#str}}participationstatus, enrol{{/str}}
72 </th>
73 <td class="user-enrol-status">
4544451a
JP
74 <span class="{{statusclass}}">
75 {{status}}
76 </span>
80d13bfe
JP
77 </td>
78 </tr>
79 {{#timestart}}
80 <tr>
81 <th>
82 {{#str}}enroltimestart, enrol{{/str}}
83 </th>
84 <td class="user-enrol-timestart">
85 {{timestart}}
86 </td>
87 </tr>
88 {{/timestart}}
89 {{#timeend}}
90 <tr>
91 <th>
92 {{#str}}enroltimeend, enrol{{/str}}
93 </th>
94 <td class="user-enrol-timeend">
95 {{timeend}}
96 </td>
97 </tr>
98 {{/timeend}}
6676f202
RK
99 {{#timeenrolled}}
100 <tr>
101 <th>
102 {{#str}}enroltimecreated, enrol{{/str}}
103 </th>
104 <td class="user-enrol-timeenrolled">
105 {{timeenrolled}}
106 </td>
107 </tr>
108 {{/timeenrolled}}
80d13bfe 109</table>