Proyectos de Subversion Moodle

Rev

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