Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
9 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 block_openai_chat/control_bar
19
 
20
    This template renders the control_bar.
21
 
22
    Example context (json):
23
    {
24
        "logging_enabled": boolean, true if logging is enabled in the plugin settings
25
        "is_edit_mode": boolean; true if edit mode is active
26
        "pix_popout": relative url of the popout pix to the root of moodle
27
        "pix_arrow_right": relative url of the arrow right pix to the root of moodle
28
        "pix_refresh": relative url of the refresh pix to the root of moodle
29
    }
30
}}
31
 
32
{{^is_edit_mode}}
33
    {{#logging_enabled}}
34
        <div title='{{#str}}loggingenabled, block_openai_chat{{/str}}' class='recording'></div>
35
    {{/logging_enabled}}
36
    <button class='openai_input_popout_btn' title="{{#str}}popout, block_openai_chat {{/str}}" id="popout">
37
        <img src="{{{config.wwwroot}}}{{{ pix_popout }}}" class='openai_input_popout_btn_icon' />
38
    </button>
39
{{/is_edit_mode}}
40
<div id="control_bar">
41
    <div class="openai_input_bar" id="input_bar">
42
        <textarea rows=1 id="openai_input" placeholder="{{#str}}askaquestion, block_openai_chat{{/str}}" type="text" name="message"></textarea>
43
        <button class='openai_input_submit_btn' title="{{#str}} submit {{/str}}" id="go">
44
            <img src="{{{config.wwwroot}}}{{{ pix_arrow_right }}}" class='openai_input_submit_btn_icon'/>
45
        </button>
46
    </div>
47
    <button class='openai_input_refresh_btn' title="{{#str}}new_chat, block_openai_chat {{/str}}" id="refresh">
48
        <img src="{{{config.wwwroot}}}{{{ pix_refresh }}}" class='openai_input_refresh_btn_icon' />
49
    </button>
50
</div>