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
    Moodle is free software: you can redistribute it and/or modify
4
    it under the terms of the GNU General Public License as published by
5
    the Free Software Foundation, either version 3 of the License, or
6
    (at your option) any later version.
7
    Moodle is distributed in the hope that it will be useful,
8
    but WITHOUT ANY WARRANTY; without even the implied warranty of
9
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
    GNU General Public License for more details.
11
    You should have received a copy of the GNU General Public License
12
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
13
}}
14
{{!
15
    @template mod_data/template_editor_tools
16
 
17
    Tag tool box for the template editor in the mod_data.
18
 
19
    Example context (json):
20
    {
21
        "toolshelp": "Available tags",
22
        "hastools": true,
23
        "tools": [
24
            {
25
                "name": "Fields",
26
                "tags": [
27
                    {
28
                    "tag": "[[Checkme]]",
29
                    "tagname": "Checkme - [[Checkme]]"
30
                    },
31
                    {
32
                    "tag": "[[Description]]",
33
                    "tagname": "Description - [[Description]]"
34
                    },
35
                    {
36
                    "tag": "[[Name]]",
37
                    "tagname": "Name - [[Name]]"
38
                    }
39
                ]
40
            },
41
            {
42
                "name": "Actions",
43
                "tags": [
44
                    {
45
                    "tag": "##actionsmenu##",
46
                    "tagname": "Actions menu - ##actionsmenu##"
47
                    },
48
                    {
49
                    "tag": "##edit##",
50
                    "tagname": "Edit - ##edit##"
51
                    },
52
                    {
53
                    "tag": "##delete##",
54
                    "tagname": "Delete - ##delete##"
55
                    },
56
                    {
57
                    "tag": "##approve##",
58
                    "tagname": "Approve - ##approve##"
59
                    },
60
                    {
61
                    "tag": "##disapprove##",
62
                    "tagname": "Undo approval - ##disapprove##"
63
                    },
64
                    {
65
                    "tag": "##export##",
66
                    "tagname": "Export - ##export##"
67
                    },
68
                    {
69
                    "tag": "##more##",
70
                    "tagname": "More - ##more##"
71
                    },
72
                    {
73
                    "tag": "##moreurl##",
74
                    "tagname": "More URL - ##moreurl##"
75
                    },
76
                    {
77
                    "tag": "##delcheck##",
78
                    "tagname": "Bulk delete checkbox - ##delcheck##"
79
                    }
80
                ]
81
            },
82
            {
83
                "name": "Other",
84
                "tags": [
85
                    {
86
                    "tag": "##tags##",
87
                    "tagname": "Tags - ##tags##"
88
                    },
89
                    {
90
                    "tag": "##timeadded##",
91
                    "tagname": "Time added - ##timeadded##"
92
                    },
93
                    {
94
                    "tag": "##timemodified##",
95
                    "tagname": "Time modified - ##timemodified##"
96
                    },
97
                    {
98
                    "tag": "##user##",
99
                    "tagname": "User - ##user##"
100
                    },
101
                    {
102
                    "tag": "##userpicture##",
103
                    "tagname": "User picture - ##userpicture##"
104
                    },
105
                    {
106
                    "tag": "##approvalstatus##",
107
                    "tagname": "Approval status - ##approvalstatus##"
108
                    },
109
                    {
110
                    "tag": "##id##",
111
                    "tagname": "Entry ID - ##id##"
112
                    },
113
                    {
114
                    "tag": "##comments##",
115
                    "tagname": "Comments - ##comments##"
116
                    }
117
                ]
118
            }
119
        ]
120
    }
121
}}
122
{{#hastools}}
123
<div class="p-2">
124
    <label for="availabletags">{{#str}} availabletags, data {{/str}}</label>
125
    {{{toolshelp}}}
126
    <div class="no-overflow" id="availabletags_wrapper">
127
        <select name="fields1[]" id="availabletags" size="20" onclick="insert_field_tags(this)" class="form-control">
128
            {{#tools}}
129
                <optgroup label="{{name}}">
130
                    {{#tags}}
131
                    <option value="{{tag}}">{{tagname}}</option>
132
                    {{/tags}}
133
                </optgroup>
134
            {{/tools}}
135
        </select>
136
    </div>
137
</div>
138
{{/hastools}}