[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
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 tool_lp/comment_area 19 20 IDs required for JS: 21 * all 22 23 Classes required for JS: 24 * none 25 26 Data attributes required for JS: 27 * none 28 29 Context variables required for this template: 30 * autostart 31 * canpost 32 * cid 33 * collapsediconurl 34 * commentarea 35 * component 36 * contextid 37 * count 38 * courseid 39 * displaycancel 40 * fullwidth 41 * itemid 42 * linktext 43 * notoggle 44 * displaytotalcount 45 * template 46 * uniqid 47 48 Example context (json): 49 { 50 } 51 52 }} 53 <div style="display: none;" id="cmt-tmpl">{{{template}}}</div> 54 <div class="mdl-left"> 55 {{^notoggle}} 56 <a href="#" class="comment-link" id="comment-link-{{cid}}"> 57 <img src="{{{collapsediconurl}}}" id="comment-img-{{cid}}" alt="{{linktext}}" title="{{linktext}}"><span id="comment-link-text-{{cid}}">{{linktext}} 58 {{#displaytotalcount}} 59 ({{count}}) 60 {{/displaytotalcount}}</span> 61 </a> 62 {{/notoggle}} 63 64 <div id="comment-ctrl-{{cid}}" class="comment-ctrl"> 65 <ul id="comment-list-{{cid}}" class="comment-list"> 66 <li class="first"></li> 67 </ul> 68 <div id="comment-pagination-{{cid}}" class="comment-pagination"></div> 69 70 {{#canpost}} 71 <div class="comment-area"> 72 <div class="db"> 73 <textarea name="context" id="dlg-content-{{cid}}" rows="2" {{^fullwidth}}cols="20"{{/fullwidth}}{{#fullwidth}}class="fullwidth"{{/fullwidth}}></textarea> 74 </div> 75 <div class="fd" id="comment-action-{{cid}}"> 76 <a href="#" id="comment-action-post-{{cid}}">{{#str}}savecomment{{/str}}</a> 77 {{#displaycancel}} 78 | <a href="#" id="comment-action-cancel-{{cid}}">{{#str}}cancel{{/str}}</a> 79 {{/displaycancel}} 80 </div> 81 </div> 82 <div class="clearer"></div> 83 {{/canpost}} 84 85 </div> 86 </div> 87 {{#js}} 88 require(['core/str'], function(Str) { 89 // Preloading strings. 90 Str.get_strings([ 91 { key: 'addcomment', component: 'moodle' }, 92 { key: 'comments', component: 'moodle' }, 93 { key: 'commentscount', component: 'moodle' }, 94 { key: 'commentsrequirelogin', component: 'moodle' }, 95 { key: 'deletecomment', component: 'moodle' }, 96 ]).then(function() { 97 // Kick off when strings are loaded. 98 Y.use('core_comment', function(Y) { 99 M.core_comment.init(Y, { 100 client_id: '{{cid}}', 101 commentarea: '{{commentarea}}', 102 itemid: {{itemid}}, 103 page: 0, 104 courseid: {{courseid}}, 105 contextid: {{contextid}}, 106 component: '{{component}}', 107 notoggle: false, // {{notoggle}} True not supported just yet. 108 autostart: false // {{autostart}} True not supported just yet. 109 }); 110 }); 111 }); 112 }) 113 {{/js}}
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |