12e07680dc22b20524491a429217a5db593b63d1
[moodle.git] / admin / tool / lp / templates / template_competencies_page.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 competencies template.
19 }}
20 <div data-region="templatecompetenciespage">
21     {{#statistics}}
22         {{> tool_lp/template_statistics }}
23     {{/statistics}}
24     {{#canmanagetemplatecompetencies}}
25     <div data-region="actions" class="clearfix">
26         <div class="pull-right">
27             <button disabled>{{#str}}addtemplatecompetencies, tool_lp{{/str}}</button>
28         </div>
29     </div>
30     {{/canmanagetemplatecompetencies}}
31     <div data-region="templatecompetencies">
32         <div class="managecompetencies">
33             <div class="drag-parentnode">
34                 {{#competencies}}
35                 <div class="drag-samenode" data-id="{{competency.id}}">
36                     <div class="well">
37                         {{#canmanagetemplatecompetencies}}
38                         <span class="drag-handlecontainer pull-left"></span>
39                         <div class="pull-right">
40                             <a href="#" data-action="delete-competency-link" data-id="{{competency.id}}">{{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}</a>
41                         </div>
42                         {{/canmanagetemplatecompetencies}}
43                         {{#competency}}
44                         <a id="competency-info-link-{{competency.idnumber}}"></a>
45                             {{> tool_lp/competency_summary }}
46                         {{/competency}}
47                         <strong>{{#str}}linkedcourseslist, tool_lp{{/str}}</strong>
48                         {{#hascourses}}
49                         <ul class="inline">
50                         {{#linkedcourses}}
51                             <li><a href="{{viewurl}}?id={{id}}">{{fullname}} ({{shortname}})</a></li>
52                         {{/linkedcourses}}
53                         </ul>
54                         {{/hascourses}}
55                         {{^hascourses}}
56                         <span class="label label-info">{{#str}}nolinkedcourses, tool_lp{{/str}}</span>
57                         {{/hascourses}}
58                     </div>
59                 </div>
60                 {{/competencies}}
61             </div>
62         </div>
63         {{^competencies}}
64         <p class="alert-info">
65             {{#str}}nocompetenciesintemplate, tool_lp{{/str}}
66         </p>
67         {{/competencies}}
68     </div>
69     <div data-region="actions">
70         {{#canmanagecompetencyframeworks}}
71         <div>
72             <p><a href="{{manageurl}}">{{#str}}managecompetenciesandframeworks, tool_lp{{/str}}</a></p>
73         </div>
74         {{/canmanagecompetencyframeworks}}
75     </div>
76 </div>
77 {{#js}}
78 require(['tool_lp/competencies'], function(mod) {
79     (new mod({{templateid}}, 'template', {{pagecontextid}}));
80 });
81 {{/js}}