MDL-64506 templates: BS2 pull-x -> BS4 float-x
[moodle.git] / admin / tool / lp / templates / competency_summary.mustache
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/>.
16 }}
17 {{!
18     @template tool_lp/competency_summary
20     Summary of a competency
22     Context variables required for this template:
23     * competency
24       * id
25       * shortname
26       * idnumber
27       * description
28     * framework
29       * shortname
30     * comppath array of ancestors
31     * showrelatedcompetencies boolean
32     * related
33     * showrule boolean
34     * rule
35       * outcome
36       * type
38     Example context (json):
39     {
40         "competency": {
41             "id": 1,
42             "shortname": "C1",
43             "idnumber": "PATH",
44             "description": "Can do something"
45         },
46         "framework": {
47             "shortname": "F1"
48         }
49     }
50 }}
51 <div class='competency-heading'>
52     <h4 id="competency_link_{{competency.id}}">{{{competency.shortname}}}
53         <small>
54         {{#showlinks}}
55             <a href="{{pluginbaseurl}}/competencies.php?competencyid={{competency.id}}">{{competency.idnumber}}</a>
56         {{/showlinks}}
57         {{^showlinks}}
58             {{competency.idnumber}}
59         {{/showlinks}}
60         </small>
61     </h4>
62     {{#framework}}
63         <div class='competency-origin'>
64             <p><small>{{{framework.shortname}}} - {{taxonomyterm}}</small>
65         </div>
66     {{/framework}}
67 </div>
69 {{#competency.description}}
70 <p>{{{competency.description}}}</p>
71 {{/competency.description}}
72 {{#comppath}}
73     <span class="float-left">{{#str}}path, tool_lp{{/str}}&nbsp;</span>{{> tool_lp/competency_path }}
74 {{/comppath}}
75 {{#showrelatedcompetencies}}
76     {{> tool_lp/related_competencies }}
77 {{/showrelatedcompetencies}}
79 {{#showrule}}
80     <h5>{{#str}}competencyrule, tool_lp{{/str}}</h5>
81     <dl>
82         <dt>{{#str}}outcome, tool_lp{{/str}}</dt>
83         <dd>{{rule.outcome}}</dd>
84         <dt>{{#str}}when, tool_lp{{/str}}</dt>
85         <dd>{{rule.type}}</dd>
86     </dl>
87 {{/showrule}}