Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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/datafilter/filter
19
 
20
    Template for the form containing one or more filter rows.
21
 
1441 ariadna 22
    This must be included inside a <form> element to support validation on filter fields.
23
 
1 efrain 24
    Example context (json):
25
    {
26
        "filtertypes": [
27
            {
28
                "name": "status",
29
                "title": "Status",
30
                "values": [
31
                    {
32
                        "value": 1,
33
                        "title": "Active"
34
                    },
35
                    {
36
                        "value": 0,
37
                        "title": "Suspended"
38
                    }
39
                ]
40
            }
1441 ariadna 41
        ],
42
        "showallbutton": false
1 efrain 43
    }
44
}}
45
 
46
<div id="core-filter-{{uniqid}}" class="filter-group my-2 p-2 bg-light border-radius border" data-table-region="{{tableregionid}}" data-table-course-id="{{courseid}}" data-filterverb="2">
47
    {{> core/datafilter/filter_match }}
48
 
49
    <div data-filterregion="filters">
50
        {{> core/datafilter/filter_row }}
51
    </div>
52
 
53
    <div class="d-flex" data-filterregion="actions">
54
        &nbsp;
55
        <button type="button" class="btn btn-link text-reset" data-filteraction="add">
1441 ariadna 56
            {{#pix}}t/add{{/pix}}<span class="ps-3">{{#str}}addcondition{{/str}}</span>
1 efrain 57
        </button>
1441 ariadna 58
        {{#showallbutton}}
59
            <button data-filteraction="showall" data-perpage="{{ perpage }}" data-status="0" type="button" class="btn btn-light ms-auto me-2">{{#str}}showall{{/str}}</button>
60
        {{/showallbutton}}
61
        <button data-filteraction="reset" type="button" class="btn btn-secondary {{^showallbutton}}ms-auto{{/showallbutton}} me-2">{{#str}}clearfilters{{/str}}</button>
62
        <button data-filteraction="apply" type="submit" class="btn btn-primary">{{#str}}applyfilters{{/str}}</button>
1 efrain 63
    </div>
64
 
65
    {{> core/datafilter/filter_types }}
66
 
67
</div>
68
 
69