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 tiny_media/insert_image_modal_details
19
 
20
    Insert image details body template.
21
 
22
    Example context (json):
23
    {
24
        "elementid": "exampleId",
25
        "alt": "Image description",
26
        "presentation": true,
27
        "width": 600,
28
        "height": 400,
29
        "customStyle": "",
30
        "sizecustomhelpicon": {
31
            "text": "Help text"
1441 ariadna 32
        },
33
        "maxlengthalt": 750
1 efrain 34
    }
35
 
36
}}
37
<div class="tiny_image_image_details">
38
    <div class="container">
39
        <div class="row">
40
            <!-- Column 1: Image Preview and Description -->
41
            <div class="tiny_image_preview_col col-lg-7 p-0">
42
                <input type="hidden" class="tiny_image_customstyle" value="{{customStyle}}">
43
                <!-- Row 1: Image preview -->
1441 ariadna 44
                <div class="tiny_image_preview_box border rounded position-relative">
1 efrain 45
                    <!-- Delete image icon -->
46
                    <div class="tiny_image_deleteicon" tabindex="0" title="{{#str}} deleteimage, tiny_media {{/str}}">
47
                        <i class="fa fa-trash-o" title="{{#str}} deleteimage, tiny_media {{/str}}"></i>
48
                    </div>
49
                    <!-- Image placeholder -->
50
                    <img class="tiny_image_preview" src="data:," alt>
51
                </div>
52
                <!-- Row 2: Image description -->
1441 ariadna 53
                <div class="mt-3">
1 efrain 54
                    <label for="{{elementid}}_tiny_image_altentry">{{#str}} enteralt, tiny_media {{/str}}</label>
1441 ariadna 55
                    <textarea class="tiny_image_altentry form-control fullwidth" id="{{elementid}}_tiny_image_altentry" name="altentry" maxlength="{{maxlengthalt}}">{{alt}}</textarea>
1 efrain 56
                    <!-- Character counter -->
57
                    <div id="the-count" class="d-flex justify-content-end small">
58
                        <span id="currentcount">0</span>
1441 ariadna 59
                        <span class="mx-1">/</span>
60
                        <span id="maximumcount">{{maxlengthalt}}</span>
61
                        <span id="maxlength_feedback" class="visually-hidden" role="status"></span>
1 efrain 62
                    </div>
63
                </div>
64
            </div>
65
            <!-- Column 2: Checkbox and Radio Buttons -->
66
            <div class="tiny_image_properties_col col-lg-5">
67
                <!-- Row 1: Image presentation role -->
68
                <div class="form-check mb-2">
69
                    <input type="checkbox" class="tiny_image_presentation form-check-input" id="{{elementid}}_tiny_image_presentation" {{# presentation }}checked{{/ presentation }}>
70
                    <label class="form-check-label" for="{{elementid}}_tiny_image_presentation">{{#str}} presentation, tiny_media {{/str}}</label>
71
                </div>
72
                <!-- Row 2: Original size radiobutton -->
1441 ariadna 73
                <div class="form-check mb-2 ps-0">
1 efrain 74
                    <input type="radio" class="tiny_image_sizeoriginal" id="{{elementid}}_tiny_image_sizeoriginal" name="radioOptions">
75
                    <label class="form-check-label" for="{{elementid}}_tiny_image_sizeoriginal">{{#str}} sizeoriginal, tiny_media {{/str}}</label>
76
                </div>
77
                <!-- Row 3: Custom size radiobutton -->
1441 ariadna 78
                <div class="form-check ps-0 mb-2">
1 efrain 79
                    <input type="radio" class="tiny_image_sizecustom" id="{{elementid}}_tiny_image_sizecustom" name="radioOptions">
80
                    <label class="form-check-label" for="{{elementid}}_tiny_image_sizecustom">{{#str}} sizecustom, tiny_media {{/str}}</label>
81
                </div>
82
                <!-- Row 4: Image size -->
83
                <div class="tiny_image_properties mb-2">
84
                    <!-- Row 1: Image width and height -->
1441 ariadna 85
                    <div id="{{elementid}}_tiny_image_size" class="tiny_image_size container ms-1">
1 efrain 86
                        <div class="d-flex justify-content-start">
87
                            <!-- Column 1: Width Input -->
1441 ariadna 88
                            <div class="flex-item me-2">
89
                                <div>
90
                                    <input type="number" min="0" class="tiny_image_widthentry form-control me-1 input-mini" id="{{elementid}}_tiny_image_widthentry" value="{{width}}">
91
                                    <label for="{{elementid}}_tiny_image_widthentry" class="ms-1">{{#str}} width, tiny_media {{/str}}</label>
1 efrain 92
                                </div>
93
                            </div>
94
                            <!-- Column 2: "X" Text -->
1441 ariadna 95
                            <div class="flex-item me-1 mt-2">X</div>
1 efrain 96
                            <!-- Column 3: Height Input -->
1441 ariadna 97
                            <div class="flex-item me-1">
98
                                <div>
99
                                    <input type="number" min="0" class="tiny_image_heightentry form-control ms-1 input-mini" id="{{elementid}}_tiny_image_heightentry" value="{{height}}">
100
                                    <label for="{{elementid}}_tiny_image_heightentry" class="ms-1">{{#str}} height, tiny_media {{/str}}</label>
1 efrain 101
                                </div>
102
                            </div>
1441 ariadna 103
                            <div class="tiny_image_customhelpicon flex-item ms-1">{{#sizecustomhelpicon}}{{> core/help_icon }}{{/sizecustomhelpicon}}</div>
1 efrain 104
                        </div>
105
                    </div>
106
                    <!-- Row 2: Keep proportion -->
107
                    <div class="form-check mb-2">
108
                        <input type="checkbox" class="tiny_image_constrain form-check-input" id="{{elementid}}_tiny_image_constrain">
109
                        <label class="form-check-label" for="{{elementid}}_tiny_image_constrain">{{#str}} constrain, tiny_media {{/str}}</label>
110
                    </div>
111
                </div>
112
            </div>
113
        </div>
114
    </div>
115
</div>