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 core/local/process_monitor/process
19
 
20
    Template to render a process inside the process monitor.
21
 
22
    Example context (json):
23
    {
24
        "id": 42,
25
        "name": "Sample",
26
        "percentage": 30,
27
        "error": "Something goes wrong"
28
    }
29
}}
30
<div
31
    class="queue-process d-flex flex-column p-2"
32
    data-for="queue-process"
33
    data-id="{{id}}"
34
>
35
    <div class="d-flex flex-row align-items-center">
36
        <div class="p-2 uploadname text-truncate" data-for="name"> {{name}} </div>
37
        <div class="ml-auto p-2 progressbar">
38
            <progress value="{{percentage}}" max="100"></progress>
39
            <button
40
                type="button"
41
                class="d-none close"
42
                data-action="closeProcess"
43
                aria-label="{{#str}}closebuttontitle, core{{/str}}"
44
            >
45
                <span aria-hidden="true">×</span>
46
            </button>
47
        </div>
48
    </div>
49
    <div class="d-none alert alert-danger" role="alert" data-for="error">
50
        {{error}}
51
    </div>
52
</div>
53
{{#js}}
54
require(['core/local/process_monitor/process'], function(component) {
55
    component.init('[data-for="queue-process"][data-id="{{id}}"]');
56
});
57
{{/js}}