Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 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 tiny_media/embed/metadata/captions
19
 
20
    Insert media captions template.
21
 
22
    Example context (json):
23
    {
24
        "media": {
25
            "tracks": {
26
                "captions": "captions"
27
            }
28
        },
29
        "showFilePickerTrack": true,
30
        "langsInstalled": "installed langs",
31
        "src": "http://moodle.com/link/to/source",
32
        "srclang": "selected lang",
33
        "default": true,
34
        "langsAvailable": "avalialbe langs",
35
        "defaultTrack": true,
36
        "label": "selected track",
37
        "code": "lang code",
38
        "lang": "lang name"
39
    }
40
 
41
}}
42
{{#media.tracks.captions}}
43
    <div class="mb-1 tiny_media_track">
44
        <div class="tiny_media_source tiny_media_track_source">
45
            <div class="mb-1">
46
                <label for="caption-video-url-input">
47
                    {{#str}} captionssourcelabel, tiny_media {{/str}}
48
                </label>
49
                <div class="input-group input-append w-100">
50
                    <input id="caption-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32" value="{{src}}">
51
                    {{#showFilePickerTrack}}
52
                    <span class="input-group-append">
53
                        <button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
54
                    </span>
55
                    {{/showFilePickerTrack}}
56
                </div>
57
            </div>
58
        </div>
59
        <div class="mb-3">
60
            <label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
61
            <select id="caption-video-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
62
                <optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
63
                    {{#langsInstalled}}
64
                        <option value="{{lang}}" data-language-code="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
65
                    {{/langsInstalled}}
66
                </optgroup>
67
                <optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
68
                    {{#langsAvailable}}
69
                        <option value="{{lang}}" data-language-code="{{code}}">{{lang}}</option>
70
                    {{/langsAvailable}}
71
                </optgroup>
72
            </select>
73
        </div>
74
        <div class="mb-3">
75
            <label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
76
            <input id="caption-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}">
77
        </div>
78
        <div class="form-check">
79
            <input type="checkbox" class="form-check-input tiny_media_track_default" {{#defaultTrack }}checked{{/defaultTrack }}>
80
            <label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
81
        </div>
82
        <div class="addcomponent-wrapper">
83
            <a href="#" class="addcomponent">
84
                {{#str}} addcaptionstrack, tiny_media {{/str}}
85
            </a>
86
        </div>
87
        <div class="removecomponent-wrapper hidden">
88
            <a href="#" class="removecomponent">
89
                {{#str}} remove, tiny_media {{/str}}
90
            </a>
91
        </div>
92
    </div>
93
{{/media.tracks.captions}}
94
{{^media.tracks.captions}}
95
    <div class="mb-1 tiny_media_track">
96
        <div class="tiny_media_source tiny_media_track_source">
97
            <div class="mb-1">
98
                <label for="caption-video-url-input">
99
                    {{#str}} captionssourcelabel, tiny_media {{/str}}
100
                </label>
101
                <div class="input-group input-append w-100">
102
                    <input id="caption-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32">
103
                    {{#showFilePickerTrack}}
104
                    <span class="input-group-append">
105
                        <button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
106
                    </span>
107
                    {{/showFilePickerTrack}}
108
                </div>
109
            </div>
110
        </div>
111
        <div class="mb-3">
112
            <label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
113
            <select id="caption-video-lang-input" class="form-select tiny_media_track_lang_entry">
114
                <optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
115
                    {{#langsInstalled}}
116
                        <option value="{{lang}}" data-language-code="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
117
                    {{/langsInstalled}}
118
                </optgroup>
119
                <optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
120
                    {{#langsAvailable}}
121
                        <option value="{{lang}}" data-language-code="{{code}}">{{lang}}</option>
122
                    {{/langsAvailable}}
123
                </optgroup>
124
            </select>
125
        </div>
126
        <div class="mb-3">
127
            <label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
128
            <input id="caption-video-track-input" class="form-control tiny_media_track_label_entry" type="text">
129
        </div>
130
        <div class="form-check">
131
            <input type="checkbox" class="form-check-input tiny_media_track_default">
132
            <label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
133
        </div>
134
        <div class="addcomponent-wrapper">
135
            <a href="#" class="addcomponent">
136
                {{#str}} addcaptionstrack, tiny_media {{/str}}
137
            </a>
138
        </div>
139
        <div class="removecomponent-wrapper hidden">
140
            <a href="#" class="removecomponent">
141
                {{#str}} remove, tiny_media {{/str}}
142
            </a>
143
        </div>
144
    </div>
145
{{/media.tracks.captions}}