{{! 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 . }} {{! @template mod_forum/discussion_list Template to display the list of forum discussions. Classes required for JS: * none Data attributes required for JS: * none Context variables required for this template: * TODO Example context (json): { } }}
{{{groupchangemenu}}} {{#notifications}} {{> core/notification}} {{/notifications}} {{#forum.capabilities.create}} {{/forum.capabilities.create}} {{#state.hasdiscussions}} {{$discussion_top_pagination}} {{{ pagination }}} {{/discussion_top_pagination}} {{$discussion_list_output}} {{#str}} showingcountoftotaldiscussions, mod_forum, {"count": "{{visiblediscussioncount}}", "total":"{{totaldiscussioncount}}"} {{/str}} {{$discussion_list_header}} {{#forum.state.groupmode}} {{/forum.state.groupmode}} {{#forum.capabilities.viewdiscussions}} {{#forum.userstate.tracked}} {{/forum.userstate.tracked}} {{/forum.capabilities.viewdiscussions}} {{#forum.capabilities.subscribe}} {{/forum.capabilities.subscribe}} {{/discussion_list_header}} {{$discussion_list_body}} {{#summaries}} {{#forum.state.groupmode}} {{/forum.state.groupmode}} {{#forum.capabilities.viewdiscussions}} {{#forum.userstate.tracked}} {{/forum.userstate.tracked}} {{/forum.capabilities.viewdiscussions}} {{/summaries}} {{/discussion_list_body}}
  {{#str}}discussion, mod_forum{{/str}} {{#str}}startedby, mod_forum{{/str}}{{#str}}group{{/str}} {{#state.sortorder.isrepliesdesc}} {{#str}}replies, mod_forum{{/str}} {{#pix}}t/downlong, core, {{#str}}desc, core{{/str}}{{/pix}} {{/state.sortorder.isrepliesdesc}} {{#state.sortorder.isrepliesasc}} {{#str}}replies, mod_forum{{/str}} {{#pix}}t/uplong, core, {{#str}}asc, core{{/str}}{{/pix}} {{/state.sortorder.isrepliesasc}} {{^state.sortorder.isrepliesdesc}} {{^state.sortorder.isrepliesasc}} {{#str}}replies, mod_forum{{/str}} {{/state.sortorder.isrepliesasc}} {{/state.sortorder.isrepliesdesc}} {{#str}}unread, mod_forum{{/str}} {{#pix}}t/markasread, core, {{#str}}markallread, mod_forum{{/str}}{{/pix}} {{#state.sortorder.islastpostdesc}} {{#str}}lastpost, mod_forum{{/str}} {{#pix}}t/downlong, core, {{#str}}desc, core{{/str}}{{/pix}} {{/state.sortorder.islastpostdesc}} {{#state.sortorder.islastpostasc}} {{#str}}lastpost, mod_forum{{/str}} {{#pix}}t/uplong, core, {{#str}}asc, core{{/str}}{{/pix}} {{/state.sortorder.islastpostasc}} {{^state.sortorder.islastpostdesc}} {{^state.sortorder.islastpostasc}} {{#str}}lastpost, mod_forum{{/str}} {{/state.sortorder.islastpostasc}} {{/state.sortorder.islastpostdesc}} {{#state.sortorder.iscreateddesc}} {{#str}}created, mod_forum{{/str}} {{#pix}}t/downlong, core, {{#str}}desc, core{{/str}}{{/pix}} {{/state.sortorder.iscreateddesc}} {{#state.sortorder.iscreatedasc}} {{#str}}created, mod_forum{{/str}} {{#pix}}t/uplong, core, {{#str}}asc, core{{/str}}{{/pix}} {{/state.sortorder.iscreatedasc}} {{^state.sortorder.iscreateddesc}} {{^state.sortorder.iscreatedasc}} {{#str}}created, mod_forum{{/str}} {{/state.sortorder.iscreatedasc}} {{/state.sortorder.iscreateddesc}}  
{{#discussion.pinned}} {{#pix}}i/pinned, mod_forum, {{#str}}discussionpinned, mod_forum{{/str}}{{/pix}} {{/discussion.pinned}} {{^discussion.pinned}} {{#discussion}} {{> mod_forum/forum_discussion_favourite_toggle}} {{/discussion}} {{/discussion.pinned}} {{{discussion.name}}} {{#firstpostauthor}}
{{#str}}pictureof, moodle, {{fullname}}{{/str}}
{{fullname}}
{{/firstpostauthor}}
{{#discussion.group}} {{#urls.picture}} {{#urls.userlist}} {{/urls.userlist}} {{^urls.userlist}} {{/urls.userlist}} {{/urls.picture}} {{^urls.picture}} {{#urls.userlist}} {{name}} {{/urls.userlist}} {{^urls.userlist}} {{name}} {{/urls.userlist}} {{/urls.picture}} {{/discussion.group}} {{replies}} {{#unread}} {{! TODO Rewrite as AJAX}} {{/unread}} {{^unread}} 0 {{/unread}} {{! TODO Check q&a, eachuser }} {{#latestpostid}} {{/latestpostid}} {{#userdate}}{{discussion.times.created}}, {{#str}}strftimerecentfull{{/str}}{{/userdate}} {{#discussion.timed.istimed}}
{{#pix}} i/calendar, moodle, {{#discussion.times.start}} {{! }}{{#str}} displaystart, mod_forum {{/str}}: {{#userdate}}{{.}}, {{#str}}strftimerecentfull {{/str}}{{/userdate}} {{/discussion.times.start}} {{#discussion.times.end}} {{! }}{{#str}} displayend, mod_forum {{/str}}: {{#userdate}}{{.}}, {{#str}} strftimerecentfull {{/str}}{{/userdate}} {{/discussion.times.end}} {{#discussion.timed.visible}} {{! }}{{#str}} timedvisible, mod_forum {{/str}} {{/discussion.timed.visible}} {{^discussion.timed.visible}} {{! }}{{#str}} timedhidden, mod_forum {{/str}} {{/discussion.timed.visible}} {{/pix}}
{{/discussion.timed.istimed}}
{{#discussion}}
{{#pix}}i/lock, core, {{#str}}locked, forum{{/str}}{{/pix}}
{{> mod_forum/discussion_subscription_toggle}}
{{> mod_forum/forum_action_menu}}
{{/discussion}}
{{/discussion_list_output}} {{$discussion_bottom_pagination}} {{{ pagination }}} {{/discussion_bottom_pagination}} {{#can_create_discussion}} {{/can_create_discussion}} {{/state.hasdiscussions}} {{^state.hasdiscussions}}
{{$no_discussions_text}} ({{#str}}nodiscussions, forum{{/str}}) {{/no_discussions_text}}
{{/state.hasdiscussions}}
{{#js}} require(['jquery', 'mod_forum/discussion_list'], function($, View) { var root = $('#discussion-list-{{uniqid}}'); View.init(root); }); {{/js}}