Merge branch 'MDL-62619' of git://github.com/stronk7/moodle
[moodle.git] / user / templates / status_details.mustache
blob120e44e9e56cb326ce627ec9eb117fd4e9e38aa3
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
17 {{!
18     @template core_user/status_details
20     Template for the user enrolment status details.
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.
27     * statusclass string - The CSS class for the enrolment status.
28     * timestart string - Optional. The enrolment time start.
29     * timeend string - Optional. The enrolment time end.
31     Example context (json):
32     {
33         "fullname": "Student John",
34         "coursename": "TC 1",
35         "enrolinstancename": "Manual enrolment",
36         "status": "Active",
37         "statusclass": "label label-success",
38         "timestart": "1 January 2017",
39         "timeend": "31 January 2018"
40     }
42 <table class="table user-enrol-details">
43     <tr>
44         <th>
45             {{#str}}fullname{{/str}}
46         </th>
47         <td class="user-fullname">
48             {{fullname}}
49         </td>
50     </tr>
51     <tr>
52         <th>
53             {{#str}}course{{/str}}
54         </th>
55         <td class="user-course">
56             {{coursename}}
57         </td>
58     </tr>
59     <tr>
60         <th>
61             {{#str}}enrolmentmethod, enrol{{/str}}
62         </th>
63         <td class="user-enrol-instance">
64             {{enrolinstancename}} {{{editenrollink}}}
65         </td>
66     </tr>
67     <tr>
68         <th>
69             {{#str}}participationstatus, enrol{{/str}}
70         </th>
71         <td class="user-enrol-status">
72             <span class="{{statusclass}}">
73                 {{status}}
74             </span>
75         </td>
76     </tr>
77     {{#timestart}}
78     <tr>
79         <th>
80             {{#str}}enroltimestart, enrol{{/str}}
81         </th>
82         <td  class="user-enrol-timestart">
83             {{timestart}}
84         </td>
85     </tr>
86     {{/timestart}}
87     {{#timeend}}
88     <tr>
89         <th>
90             {{#str}}enroltimeend, enrol{{/str}}
91         </th>
92         <td class="user-enrol-timeend">
93             {{timeend}}
94         </td>
95     </tr>
96     {{/timeend}}
97 </table>