Gitlab CSE Unil

admin.mustache 8.32 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
M. Chardon's avatar
M. Chardon committed
17
18
{{!
    @template assignfeedback_editpdfplus/admin
19
20
21
22
23
24
25
26
27
28
29

    Admin template for manage axis.

    Context variables required for this template:
    * courseid - Course id
    * context - Context id
    * axisimportform - Moodle form to import an axis
    * toolbars - All toolbars for the current course
    * axis - All axis for the current coure
    * toollibs - All avaibled type's tool
    * toolbarsDispo - All toolbars which can be import by the current user
M. Chardon's avatar
M. Chardon committed
30
31
32
33
34
}}

<div class="assignfeedback_editpdfplus_widget_admin">                                                                                                             
    <h5>{{# str }} adminsubtitle, assignfeedback_editpdfplus {{/ str }}</h5> 

M. Chardon's avatar
M. Chardon committed
35
36
37
38
39
    <div class="card">
        <div class="card-header">
            <a data-toggle="collapse" href="#collapseadmin1" aria-expanded="true" aria-controls="collapseadmin1">
                {{# str }} adminaxisimporttitle, assignfeedback_editpdfplus {{/ str }}
            </a>
M. Chardon's avatar
M. Chardon committed
40
        </div>
M. Chardon's avatar
M. Chardon committed
41
42
        <div id="collapseadmin1" class="collapse">
            <div class="card-block" style="height: 400px;overflow: auto;">
43
                {{# str }} adminaxisimport, assignfeedback_editpdfplus {{/ str }}
M. Chardon's avatar
M. Chardon committed
44
45
                {{{ axisimportform.render }}}
                <input type="hidden" id="courseid" value="{{courseid}}" />
M. Chardon's avatar
M. Chardon committed
46
                <table class='table table-bordered table-striped'>
M. Chardon's avatar
M. Chardon committed
47
48
                    <thead>
                        <tr>
49
50
51
                            <th>{{# str }} adminaxisimport_name, assignfeedback_editpdfplus {{/ str }}</th>
                            <th>{{# str }} adminaxisimport_tool, assignfeedback_editpdfplus {{/ str }}</th>
                            <th>{{# str }} adminaxisimport_action, assignfeedback_editpdfplus {{/ str }}</th>
M. Chardon's avatar
M. Chardon committed
52
53
54
55
56
57
58
                        </tr>
                    </thead>
                    <tbody>
                        {{# toolbarsDispo }}
                        <tr>
                            <td>{{axis.label}}</td>
                            <td>
M. Chardon's avatar
M. Chardon committed
59
60
                                <div class="btn-group">
                                    {{# tools }}
61
                                    <button class="btn" style="{{style}}">
M. Chardon's avatar
M. Chardon committed
62
63
64
65
                                        {{label}}
                                    </button>
                                    {{/ tools }}
                                </div>
M. Chardon's avatar
M. Chardon committed
66
                            </td>
M. Chardon's avatar
M. Chardon committed
67
68
69
                            <td>
                                <button class='btn btn-primary btn-sm btnimport' data-axis='{{axis.id}}'><i class='fa fa-download'></i></button>
                            </td>
M. Chardon's avatar
M. Chardon committed
70
71
72
73
                        </tr>
                        {{/ toolbarsDispo }}
                    </tbody>
                </table>
M. Chardon's avatar
M. Chardon committed
74
            </div>
M. Chardon's avatar
M. Chardon committed
75
        </div>
M. Chardon's avatar
M. Chardon committed
76
    </div>
M. Chardon's avatar
M. Chardon committed
77

M. Chardon's avatar
M. Chardon committed
78
79
80
81
82
    <div class="card">
        <div class="card-header">
            <a data-toggle="collapse" href="#collapseadmin2" aria-expanded="true" aria-controls="collapseadmin2">
                {{# str }} admincurrenttoolbar, assignfeedback_editpdfplus {{/ str }}
            </a>
M. Chardon's avatar
M. Chardon committed
83
        </div>
M. Chardon's avatar
M. Chardon committed
84
        <div class="card-body">
M. Chardon's avatar
M. Chardon committed
85
            <div id="message_import_axis" class="alert" style="display:none;"></div>
86
            <div id="message_order_tool" class="alert" style="display:none;"></div>
87
            <table>
M. Chardon's avatar
M. Chardon committed
88
                <tr>
89
                    <td class='assignfeedback_editpdfplus_widget_admin_col1'>
M. Chardon's avatar
M. Chardon committed
90
91
                        <h6>
                            {{# str }} adminaxis, assignfeedback_editpdfplus {{/ str }}
92
                            <button type="button" class="btn" id="assignfeedback_editpdfplus_widget_admin_button_addaxis">
M. Chardon's avatar
M. Chardon committed
93
                                <i class="fa fa-plus" aria-hidden="true"></i>
M. Chardon's avatar
M. Chardon committed
94
                            </button>
M. Chardon's avatar
M. Chardon committed
95
96
                        </h6>
                    </td>
97
                    <td id='assignfeedback_editpdfplus_widget_admin_toolheader' class='assignfeedback_editpdfplus_widget_admin_col2'>
M. Chardon's avatar
M. Chardon committed
98
99
                        <h6>
                            {{# str }} admintools, assignfeedback_editpdfplus {{/ str }}
100
                            <button type="button" class="btn" id="assignfeedback_editpdfplus_widget_admin_button_addtool">
M. Chardon's avatar
M. Chardon committed
101
                                <i class="fa fa-plus" aria-hidden="true"></i>
M. Chardon's avatar
M. Chardon committed
102
                            </button>
M. Chardon's avatar
M. Chardon committed
103
104
                        </h6>
                    </td>
105
                    <td></td>
M. Chardon's avatar
M. Chardon committed
106
107
                </tr>
                <tr id='assignfeedback_editpdfplus_widget_admin_workspace'>
108
                    <td  id='editpdlplus_axes_worspace' class='assignfeedback_editpdfplus_widget_admin_col1'>
M. Chardon's avatar
M. Chardon committed
109
110
111
112
113
                        <select id='editpdlplus_axes' class='form-control'>
                            {{# axis }}
                            <option value="{{id}}" data-delete="{{children}}">{{label}}</option>
                            {{/ axis }}
                        </select>
M. Chardon's avatar
M. Chardon committed
114
115
                        <div class="card" id="axistool">
                            <div class="card-body" style="text-align: center;">
116
                                <button type="button" class="btn" id="assignfeedback_editpdfplus_widget_admin_button_editaxis">
M. Chardon's avatar
M. Chardon committed
117
118
                                    <i class="fa fa-pencil" aria-hidden="true"></i>
                                </button>
119
                                <button type="button" class="btn" id="assignfeedback_editpdfplus_widget_admin_button_delaxis">
M. Chardon's avatar
M. Chardon committed
120
121
122
123
124
                                    <i class="fa fa-remove" aria-hidden="true"></i>
                                </button>
                            </div>
                        </div>
                    </td>
125
                    <td id='assignfeedback_editpdfplus_widget_admin_toolworkspace' class='assignfeedback_editpdfplus_widget_admin_col2'>
M. Chardon's avatar
M. Chardon committed
126
127
                        <div id='editpdlplus_toolbars'>
                            {{# toolbars }}
128
129
130
131
132
133
134
135
136
137
                            <div id="editpdlplus_toolbar_{{axis.id}}" class="btn-group toolbar sortable" style="display: none;width: 100%;">
                                <ul class="sortable" style="list-style-type: none;margin: 0;padding: 0;width: 100%;">
                                    {{# tools }}
                                    <li style="float: left;display: block;">
                                        <button class="btn {{button}} editpdlplus_tool" id="editpdlplus_tool_{{id}}" value="{{id}}" style="{{style}}" data-enable="{{enabled}}">
                                            {{label}}
                                        </button>
                                    </li>
                                    {{/ tools }}
                                </ul>
M. Chardon's avatar
M. Chardon committed
138
139
140
                            </div>
                            {{/ toolbars }}
                        </div>
141
                        {{{ toolorderform.render }}}
M. Chardon's avatar
M. Chardon committed
142

143
                        <div class="alert" id="message_edit_tool"></div>
M. Chardon's avatar
M. Chardon committed
144

145
                        <div id="editpdlplus_tool_item"></div>
M. Chardon's avatar
M. Chardon committed
146
147
                    </td>
                    <td>
M. Chardon's avatar
M. Chardon committed
148
                        <div id="assignfeedback_editpdfplus_widget_admin_div_addaxis" style="display:none;" class="card w-50 ml-2 border-primary">
M. Chardon's avatar
M. Chardon committed
149
                        </div>
M. Chardon's avatar
M. Chardon committed
150
                        <div id="assignfeedback_editpdfplus_widget_admin_div_editaxis" style="display:none;" class="card w-50 ml-2 border-primary">
M. Chardon's avatar
M. Chardon committed
151
                        </div>
M. Chardon's avatar
M. Chardon committed
152
                        <div id="assignfeedback_editpdfplus_widget_admin_div_delaxis" style="display:none;" class="card w-50 ml-2 border-primary">
M. Chardon's avatar
M. Chardon committed
153
154
155
156
                        </div>
                    </td>
                </tr>
            </table>
M. Chardon's avatar
M. Chardon committed
157
158
159
160
161
162
        </div>
    </div>
</div>

{{# js }}
require(['assignfeedback_editpdfplus/admin_panel'], function(AdminPanel) {
163
var adminpanel = new AdminPanel({{context.id}},'{{{toollibs}}}');
M. Chardon's avatar
M. Chardon committed
164
165
});
{{/ js }}