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/competency_picker_competencyform
19
 
20
    Show a competency tree and allow picking a competency.
21
 
22
    Context variables required for this template:
23
    * framework - The competency framework
24
      * id
25
      * name
26
      * shortname
27
 
28
    * competencies - array of nodes
29
      * id - competency id
30
      * name - competency idnumber
31
      * children - array of children
32
      * haschildren - boolean
33
 
34
    Example context (json):
35
    {
36
        "framework": {
37
            "id": "1",
38
            "name": "Framework"
39
        },
40
        "competencies": [
41
        ]
42
    }
43
}}
44
<div data-region="competencylinktree">
45
<h5 class="competencylinktree-modal-heading">{{#str}}locatecompetency, tool_lp{{/str}}</h5>
46
 
47
<div class="simplesearchform">
48
    <form data-region="filtercompetencies" class="form-inline" data-frameworkid="{{framework.id}}">
49
        <div class="search-input-group d-inline-flex justify-content-between w-100">
50
            <label class="accesshide" for="filter{{uniqid}}">{{#str}}search, tool_lp{{/str}}</label>
51
            <span class="search-input-icon">
52
                <svg width="20" height="20" fill="none" viewBox="0 0 24 24">
53
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.25 19.25L15.5 15.5M4.75 11C4.75 7.54822 7.54822 4.75 11 4.75C14.4518 4.75 17.25 7.54822 17.25 11C17.25 14.4518 14.4518 17.25 11 17.25C7.54822 17.25 4.75 14.4518 4.75 11Z"></path>
54
                </svg>
55
            </span>
56
            <input type="text"
57
            id="filter{{uniqid}}"
58
            class="search-input w-100"
59
            placeholder="{{#str}}search, tool_lp{{/str}}"
60
            aria-label="{{#str}}search, tool_lp{{/str}}"
61
            name="{{ inputname }}"
62
            data-region="input"
63
            autocomplete="off"
64
            value="{{ search }}"
65
            >
66
            <button type="submit" class="search-input-btn">
67
                <svg width="22" height="22" fill="none" viewBox="0 0 24 24">
68
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.75 6.75L19.25 12L13.75 17.25"></path>
69
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 12H4.75"></path>
70
                </svg>
71
                <span class="sr-only">{{ searchstring }}</span>
72
            </button>
73
        </div>
74
    </form>
75
</div>
76
<ul data-enhance="linktree" style="display: none;" class="mt-2 mx-0 p-3 competency-tree">
77
    <li data-id="0"><span>{{{framework.shortname}}}</span>
78
        <ul class="pl-2">
79
            {{#competencies}}
80
                {{> tool_lp/competencies_tree }}
81
            {{/competencies}}
82
        </ul>
83
    </li>
84
</ul>
85
<div data-region="link-buttons" class="mt-1 float-sm-right">
86
    <input type="button" class="btn btn-primary" data-action="add" value="{{#str}}select{{/str}}"/>
87
    <input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
88
</div>
89
<div class="clearfix"></div>
90
</div>