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_search/index_requests
19
 
20
    Template to provide admin information about the queue of index requests.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * topten
30
    * count
31
 
32
    Optional context variables for this template:
33
    * ellipsis
34
 
35
    Example context (json):
36
    {
37
        "topten":
38
        [
39
            {
40
                "id": 42,
41
                "timerequested": 123456789,
42
                "contextid": 123,
43
                "contextlink": "<a href='...'>Forum: Tutor group forum</a>",
44
                "searcharea": "mod_forum-activity",
45
                "areaname": "Forum activities",
46
                "partialarea": "mod_forum-activity",
47
                "partialareaname": "Forum activities",
48
                "partialtime": 123400000,
49
                "indexpriority": 100
50
            }
51
        ],
52
        "total": 1,
53
        "ellipsis": true
54
    }
55
}}
56
{{#total}}
57
    <div>
58
        <h3>
59
            {{#str}} queueheading, search, {{total}} {{/str}}
60
        </h3>
61
        <table class="generaltable">
62
            <thead>
63
            <tr>
64
                <th scope="col">{{#str}} context, role {{/str}}</th>
65
                <th scope="col">{{#str}} searcharea, search {{/str}}</th>
66
                <th scope="col">{{#str}} time {{/str}}</th>
67
                <th scope="col">{{#str}} progress, search {{/str}}</th>
68
                <th scope="col">{{#str}} priority, search {{/str}}</th>
69
            </tr>
70
            </thead>
71
            <tbody>
72
 
73
 
74
            {{#topten}}
75
                <tr>
76
                    <td>
77
                        {{{contextlink}}}
78
                    </td>
79
                    <td>
80
                        {{#searcharea}} {{areaname}} {{/searcharea}}
81
                    </td>
82
                    <td>{{#userdate}} {{timerequested}}, {{#str}} strftimedatetimeshort, core_langconfig {{/str}} {{/userdate}}</td>
83
                    <td>
84
                        {{#partialarea}}
85
                            {{partialareaname}}:
86
                        {{/partialarea}}
87
                        {{#partialtime}}
88
                            {{#userdate}} {{partialtime}}, {{#str}} strftimedatetimeshort, core_langconfig {{/str}} {{/userdate}}
89
                        {{/partialtime}}
90
                    </td>
91
                    <td>
92
                        {{#priorityname}}
93
                            {{priorityname}}
94
                        {{/priorityname}}
95
                        {{^priorityname}}
96
                            {{indexpriority}}
97
                        {{/priorityname}}
98
                    </td>
99
                </tr>
100
            {{/topten}}
101
 
102
            {{#ellipsis}}
103
                <tr>
104
                    <td colspan="5">...</td>
105
                </tr>
106
            {{/ellipsis}}
107
            </tbody>
108
        </table>
109
    </div>
110
{{/total}}