Current Path : /var/www/ljmtc/cbt/mod/grouptool/templates/ |
Current File : /var/www/ljmtc/cbt/mod/grouptool/templates/sortlist_entry.mustache |
{{! This file is part of mod_publication for 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/>. }} {{! @template mod_grouptool/sortlist_entry Grouptool's sortlist entry template. Outputs one entry/row of the sortlist! Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * status - If group's active or inactive * missing - If agrp-entry's missing in the DB (shouldn't occure) * slidup - Add class slidup (used for replacements via JS) * groupings - Array with group's grouping-IDs * id - Group's ID * checked - whether or not the group should be selected * name - Group's name * pageurl - URL to current page * order - Group's order (integer or 99999 if nothings set) * usesize - If groupsize is used * size - Group's size * nodeletion - If the groups' delete button should be disabled (used when any grouptool would recreate the group!) Example context (json): { "status": true, "missing": false, "slidup": false, "groupings": [1, 7, 9, 12], "id": 3, "checked": true, "name": "Awesome group #1", "pageurl": "https://example.com/mod/grouptool/view.php?id=3&tab=administration", "order": 1, "usesize": true, "size": 5, "nodeletion": true } }} <tr class="mod_grouptool_sortlist_entry draggable_item{{^status}} dimmed_text{{/status}}{{#missing}} missing_agrp{{/missing}}{{! }}{{#slidup}} slidup{{/slidup}}" {{! }}data-groupings='[0{{#groupingids}}, {{.}}{{/groupingids}}]' data-order="{{order}}" data-id="{{id}}" data-status="{{status}}" {{! }}data-name="{{name}}" {{#usesize}}data-size="{{size}}"{{/usesize}}> <td class="checkbox_container"><div><input type="checkbox" name="selected[]" title="{{#str}}select, grouptool{{/str}}" {{! }}class="checkbox_status class0 {{#groupingids}} class{{.}}{{/groupingids}}" {{! }}value="{{id}}" {{#checked}}checked{{/checked}} /></div></td> <td class="buttons js_invisible" data-drag><div>{{! }}{{#pix}} i/dragdrop, core, {{#str}} drag, grouptool {{/str}}{{/pix}}</div></td> <td class="grpname"><div> <input type="hidden" name="name[{{id}}]" value="{{name}}" class="form-control" /> <span class="text">{{name}}</span> <a href="{{pageurl}}&rename={{id}}" data-rename title="{{#str}}rename, core{{/str}}"> {{#pix}}t/editstring, core, {{#str}}rename, core{{/str}}{{/pix}}</a> <input type="hidden" name="order[{{id}}]" value="{{order}}" class="sort_order" /> </div></td> {{#usesize}} <td class="size addfield"><div> <input type="hidden" name="size[{{id}}]" value="{{size}}" class="form-control" /> <span class="text">{{size}}</span>{{! }}<a href="{{pageurl}}&resize={{id}}" data-resize title="{{#str}}resize, mod_grouptool{{/str}}" {{! }}class="resizebutton">{{#pix}} t/editstring, core, {{#str}}resize, mod_grouptool{{/str}}{{/pix}}</a> </div></td> {{/usesize}} <td class="buttons"><div> <a href="{{pageurl}}&toggle={{id}}" data-toggle data-status="{{status}}" {{! }}title="{{#status}}{{#str}}active, core{{/str}}{{/status}}{{^status}}{{#str}}inactive, core{{/str}}{{/status}}" {{! }}class="{{#status}}{{#str}}active, core{{/str}}{{/status}}{{^status}}{{#str}}inactive, core{{/str}}{{/status}}">{{! }}{{#status}}{{#pix}} active, mod_grouptool, {{#str}}active, core{{/str}}{{/pix}}{{/status}}{{! }}{{^status}}{{#pix}} inactive, mod_grouptool, {{#str}}inactive, core{{/str}}{{/pix}}{{/status}}{{! }}</a> </div></td> <td class="buttons"><div> <a href="{{pageurl}}&moveup={{id}}" data-moveup class="moveupbutton" title="{{#str}}moveup, mod_grouptool{{/str}}">{{! }}{{#pix}} i/up, core, {{#str}}moveup, mod_grouptool{{/str}}{{/pix}}{{! }}</a> </div></td> <td class="buttons"><div> <a href="{{pageurl}}&movedown={{id}}" data-movedown class="movedownbutton" {{! }}title="{{#str}}movedown, mod_grouptool{{/str}}">{{! }}{{#pix}} i/down, core, {{#str}}movedown, mod_grouptool{{/str}}{{/pix}}{{! }}</a> </div></td> <td class="buttons"><div> <a href="{{^nodeletion}}{{pageurl}}&delete={{id}}{{/nodeletion}}" data-delete{{! }} class="deletebutton {{#nodeletion}} disabled{{/nodeletion}}"{{! }}{{^nodeletion}} title="{{#str}}delete, core{{/str}}"{{/nodeletion}}{{! }}{{#nodeletion}} disabled aria-disabled="true" title="{{#str}}nodeletion, grouptool{{/str}}"{{/nodeletion}}>{{! }}{{^nodeletion}}{{#pix}} i/delete, core, {{#str}}delete, core{{/str}}{{/pix}}{{/nodeletion}}{{! }}{{#nodeletion}}{{#pix}} i/delete, core, {{#str}}nodeletion, grouptool{{/str}}{{/pix}}{{/nodeletion}}{{! }}</a> </div></td> </tr>