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 aiplacement_courseassist/action_button
19
    * isdropdown - Is this a dropdown item
20
    * actions - The action being performed
21
    * buttontext - The text to display for the button
22
    * title - The tooltip/title text to use
23
 
24
    Template to display sparkles icon.
25
 
26
    Example context (json):
27
    {
28
        "isdropdown": true,
29
        "action": "explain",
30
        "buttontext": "Explain",
31
        "title": "Create an AI-generated explanation of the page content"
32
    }
33
}}
34
<button
35
    class="{{#isdropdown}}dropdown-item{{/isdropdown}}{{^isdropdown}}btn btn-outline-secondary{{/isdropdown}} ai-action"
36
    type="button"
37
    title="{{title}}"
38
    data-action="{{action}}"
39
    data-bs-toggle="tooltip"
40
    data-bs-placement="right"
41
    aria-controls="ai-drawer"
42
    data-input-type="action"
43
    data-bs-delay="200"
44
>
45
    {{^isdropdown}}
46
        {{> aiplacement_courseassist/sparkles_icon }}
47
    {{/isdropdown}}
48
    {{buttontext}}
49
</button>