Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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/related_competencies
19
 
20
    List of related competencies.
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
    * showdeleterelatedaction boolean
30
    * relatedcompetencies array
31
      * id int
32
      * shortname string
33
      * idnumber string
34
 
35
    Example context (json):
36
    {
37
        "showdeleterelatedaction": false,
38
        "relatedcompetencies":
39
        [
40
            {
41
                "id": 1,
42
                "shortname": "Competency",
43
                "idnumber": "C1"
44
            }
45
        ]
46
    }
47
 
48
}}
49
<div class="card-special mt-4 pt-4 border-top" data-region="relatedcompetencies">
50
    <h5>{{#str}}crossreferencedcompetencies, tool_lp{{/str}}:</h5>
51
<ul class="my-0">
52
    {{#relatedcompetencies}}
53
        <li>
54
            {{#showdeleterelatedaction}}
55
                <div class="float-sm-right">
56
                    <a href="#" data-action="deleterelation" id="id-related-{{id}}" title="{{#str}}delete{{/str}}">
57
                        <svg width="24" height="24" fill="none" viewBox="0 0 24 24">
58
                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6.75 7.75L7.59115 17.4233C7.68102 18.4568 8.54622 19.25 9.58363 19.25H14.4164C15.4538 19.25 16.319 18.4568 16.4088 17.4233L17.25 7.75"></path>
59
                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.75 7.5V6.75C9.75 5.64543 10.6454 4.75 11.75 4.75H12.25C13.3546 4.75 14.25 5.64543 14.25 6.75V7.5"></path>
60
                            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5 7.75H19"></path>
61
                        </svg>
62
                    </a>
63
                </div>
64
            {{/showdeleterelatedaction}}
65
            <p>
66
                <a href="#" data-action="competency-dialogue" data-id="{{id}}">
67
                    {{{shortname}}}{{#idnumber}} {{idnumber}}{{/idnumber}}
68
                </a>
69
            </p>
70
        </li>
71
    {{/relatedcompetencies}}
72
</ul>
73
{{^relatedcompetencies}}
74
    <div class="alert alert-warning">{{#str}}nocrossreferencedcompetencies, tool_lp{{/str}}</div>
75
{{/relatedcompetencies}}
76
</div>
77
{{#js}}
78
require(['tool_lp/competencydialogue'], function(Compdialogue) {
79
    Compdialogue.init();
80
});
81
{{/js}}