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_customlang/translator
19
 
20
    Template for the custom language translator page.
21
 
22
    Classes required for JS:
23
    -
24
 
25
    Data attributes required for JS:
26
    -
27
 
28
    Context variables required for this template:
29
    * strings
30
 
31
    Example context (json):
32
    {
33
        "hasstrings": true,
34
        "formurl": "admin/tool/customlang/edit.php?lng=en",
35
        "currentpage": 0,
36
        "sesskey" : "AZyeeQgmcs",
37
        "strings": [
38
            {
39
                "id": 11,
40
                "component": "core",
41
                "componentid": 1,
42
                "stringid": "course",
43
                "original": "Course",
44
                "master": "Cursus",
45
                "local": "Hoofdstuk",
46
                "outdated": 0,
47
                "modified": 1
48
            }
49
        ]
50
    }
51
}}
52
 
53
{{^hasstrings}}
54
    {{{ nostrings }}}
55
{{/hasstrings}}
56
{{#hasstrings}}
57
<form method="post" action="{{{formurl}}}">
58
    <input type="hidden" name="translatorsubmitted" value="1">
59
    <input type="hidden" name="sesskey" value="{{{ sesskey }}}">
60
    <input type="hidden" name="p" value="{{ currentpage }}">
61
 
62
    <fieldset class="m-3">
63
        <button type="submit" name="savecontinue" class="btn btn-secondary">
64
            {{#str}}savecontinue, tool_customlang{{/str}}
65
        </button>
66
        <button type="submit" name="savecheckin" class="btn btn-secondary">
67
            {{#str}}savecheckin, tool_customlang{{/str}}
68
        </button>
69
    </fieldset>
70
 
71
    <div class="list-group">
72
        <div class="container-fluid d-none d-md-block list-group-item border-bottom-0">
73
            <div class="row">
74
                <div class="col-sm-4 col-md-2">
75
                    <strong>{{#str}}headingcomponent, tool_customlang{{/str}}</strong>
76
                </div>
77
                <div class="col-sm-4 col-md-2">
78
                    <strong>{{#str}}headingstringid, tool_customlang{{/str}}</strong>
79
                </div>
80
                <div class="col-sm-4 col-md-2">
81
                    <strong>{{#str}}headingstandard, tool_customlang{{/str}}</strong>
82
                </div>
83
                <div class="col-sm-12 col-md-6">
84
                    <span class="pl-3">
85
                        <strong>{{#str}}headinglocal, tool_customlang{{/str}}</strong>
86
                    </span>
87
                </div>
88
            </div>
89
        </div>
90
    </div>
91
 
92
    <div class="list-group">
93
    {{#strings}}
94
        <div class="container-fluid list-group-item
95
                {{#local}}list-group-item-info{{/local}}
96
                {{#outdated}}list-group-item-warning{{/outdated}}
97
                {{#modified}}list-group-item-info{{/modified}}"
98
            >
99
            <div class="row">
100
                <div class="col-sm-4 col-md-2 text-break">
101
                    <div class="d-md-none">
102
                        <strong>{{#str}}headingcomponent, tool_customlang{{/str}}</strong>
103
                    </div>
104
                    {{{ component }}}
105
                </div>
106
                <div class="col-sm-4 col-md-2 text-break">
107
                    <div class="d-md-none">
108
                        <strong>{{#str}}headingstringid, tool_customlang{{/str}}</strong>
109
                    </div>
110
                    {{{ stringid }}}
111
                </div>
112
                <div class="col-sm-4 col-md-2">
113
                    <div class="d-md-none">
114
                        <strong>{{#str}}headingstandard, tool_customlang{{/str}}</strong>
115
                    </div>
116
                    {{ master }}
117
                    <div class="info">
118
                        {{{ placeholderhelp }}}
119
                        {{{ outdatedhelp}}}
120
                    </div>
121
                    {{#showoriginalvsmaster}}
122
                    <div class="alert-secondary mt-3 mt-1">
123
                        {{ original }}
124
                    </div>
125
                    {{/showoriginalvsmaster}}
126
                </div>
127
                <div class="col-sm-12 col-md-6 mt-sm-3 mt-md-0">
128
                    <div class="d-md-none">
129
                        <strong>{{#str}}headinglocal, tool_customlang{{/str}}</strong>
130
                    </div>
131
                    <div class="py-2 py-md-0 px-md-3">
132
                        <label for="{{id}}" class="sr-only sr-only-focusable">{{{ component }}}/{{{ stringid }}}</label>
133
                        <textarea class="form-control w-100 border-box" id="{{id}}" name="cust[{{id}}]" cols="40" rows="3">{{{ local }}}</textarea>
134
                        {{#checkupdated}}
135
                        <div class="uptodatewrapper">
136
                            <div class="form-check">
137
                                <input id="update_{{id}}" class="form-check-input" name="updates[]" type="checkbox" value="{{id}}">
138
                                <label for="update_{{id}}" class="form-check-label">{{#str}}markuptodate, tool_customlang{{/str}}</label>
139
                                {{{ outdatedhelp }}}
140
                            </div>
141
                        </div>
142
                        {{/checkupdated}}
143
                    </div>
144
                </div>
145
            </div>
146
        </div>
147
    {{/strings}}
148
    </div>
149
 
150
    <fieldset class="m-3">
151
        <button type="submit" name="savecontinue" class="btn btn-secondary">
152
            {{#str}}savecontinue, tool_customlang{{/str}}
153
        </button>
154
        <button type="submit" name="savecheckin" class="btn btn-secondary">
155
            {{#str}}savecheckin, tool_customlang{{/str}}
156
        </button>
157
    </fieldset>
158
</form>
159
{{/hasstrings}}