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/bulkactions/bulk_actions
19
 
20
    Renders a section with all available bulk actions.
21
 
22
    Context variables required for this template:
23
    * actions - Array of objects with the following properties:
24
        * actiontrigger - The HTML for the action trigger.
1441 ariadna 25
    * hasmoreactions - Whether there are more actions than the ones displayed.
26
    * moreactions - Array of objects with the following properties:
27
        * actiontrigger - The HTML for the action trigger.
1 efrain 28
 
29
    Example context (json):
30
    {
31
        "actions": [
32
            {
33
                "actiontrigger": "<button>Move</button>"
34
            }
1441 ariadna 35
        ],
36
        "hasmoreactions": true,
37
        "moreactions": [
38
            {
39
                "actiontrigger": "<button>Delete</button>"
40
            }
1 efrain 41
        ]
42
    }
43
}}
1441 ariadna 44
<div class="justify-content-between px-3 py-2" data-type="bulkactions">
1 efrain 45
    <div class="d-flex">
46
    </div>
47
    <div data-for="bulktools">
1441 ariadna 48
        <div class="btn-toolbar" role="toolbar" aria-label="{{#str}} bulkactions, core {{/str}}" data-for="bulkactions">
1 efrain 49
            {{#actions}}
1441 ariadna 50
                {{{actiontrigger}}}
1 efrain 51
            {{/actions}}
1441 ariadna 52
            {{#hasmoreactions}}
53
                <div class="dropup">
54
                    <button
55
                        class="btn py-0 d-flex flex-column"
56
                        type="button"
57
                        id="more-actions-toggle-{{uniqid}}"
58
                        data-bs-toggle="dropdown"
59
                        aria-haspopup="true"
60
                        aria-expanded="false"
61
                        tabindex="-1"
62
                    >
63
                        <span class="w-100 ps-2">
64
                            {{#pix}} i/menu, core {{/pix}}
65
                        </span>
66
                        <span>{{#str}} moremenu, core {{/str}}</span>
67
                    </button>
68
                    <div class="dropdown-menu" aria-labelledby="more-actions-toggle-{{uniqid}}" role="menu">
69
                        {{#moreactions}}
70
                            {{{actiontrigger}}}
71
                        {{/moreactions}}
72
                    </div>
73
                </div>
74
            {{/hasmoreactions}}
75
        </div>
1 efrain 76
    </div>
77
    <div class="d-flex flex-column">
1441 ariadna 78
        <div class="ms-auto">
1 efrain 79
            <button
80
                type="button"
1441 ariadna 81
                class="btn pe-0 pb-0"
1 efrain 82
                data-action="bulkcancel"
83
                data-for="bulkcancel"
84
                title="{{#str}} bulkcancel, core {{/str}}"
85
            >
86
                {{#pix}} e/cancel, core {{/pix}}
87
            </button>
88
        </div>
1441 ariadna 89
        <div data-for="bulkcount" role="status">
90
            &nbsp;{{#str}} bulkselection, core, {{bulkselectioncount}} {{/str}}
1 efrain 91
        </div>
92
    </div>
93
</div>