MDL-64506 templates: Move BS2 btns' to BS4 btns'
[moodle.git] / admin / tool / lp / templates / evidence_summary.mustache
CommitLineData
0845a3a0
DW
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 tool_lp/evidence_summary
19
20 Moodle template for the the summary of a single piece of evidence.
21
22 Classes required for JS:
23 * none
24
25 Data attributes required for JS:
26 * none
27
28 Context variables required for this template:
29 * actionuser User record from a user_summary_exporter
30 * userdate User formatted date this evidence was created
31 * grade Raw grade value if set
32 * gradename Scale grade item
33 * description Description of the evidence
34 * url Optional url for the evidence
35
36 Example context (json):
37 { "actionuser": { "id": 1, "fullname": "Legend", "profileimageurlsmall": "https://secure.gravatar.com/avatar/78f83716ad197a25e175fbb747cff1ff?s=35&d=mm" },
38 "userdate": "Tuesday...",
39 "grade": 2,
40 "gradename": "Met",
5cb320c1 41 "description": "The user competency was manually rated in the plan Personal plan A",
1e99f31e
FM
42 "url": "http://moodle.org/",
43 "candelete": true,
44 "id": 1
0845a3a0
DW
45 }
46}}
29551c4b 47<div class="card well-small evidence" data-region="evidence" data-id="{{id}}">
1e99f31e 48 {{#candelete}}
207136f2 49 <div class="pull-xs-right">
1e99f31e
FM
50 <a href="#" data-action="delete-evidence">{{#pix}}t/delete{{/pix}}</a>
51 </div>
52 {{/candelete}}
3c659fc2 53{{#actionuser}}
0845a3a0 54 <div>
9f422dc2 55 {{> tool_lp/user_summary }}
0845a3a0 56 </div>
3c659fc2
DW
57{{/actionuser}}
58<strong><time datetime="{{userdate}}">{{userdate}}</time></strong>
59{{#grade}}
207136f2 60 <p><span class="tag tag-info">{{gradename}}</span></p>
3c659fc2
DW
61{{/grade}}
62<p>{{description}}</p>
d17cbbfb
FM
63{{#note}}
64 <blockquote>{{note}}</blockquote>
65{{/note}}
3c659fc2 66{{#url}}
0845a3a0 67 <p><a href="{{url}}" target="_blank" rel="noreferrer">{{url}}</a></p>
3c659fc2
DW
68{{/url}}
69</div>
1e99f31e
FM
70
71{{#js}}
72require(['tool_lp/evidence_delete'], function(EvidenceDelete) {
73 EvidenceDelete.register('[data-action="delete-evidence"]', '[data-region="evidence"]');
74});
75{{/js}}