Commit e6a4eb3c authored by Sujith Haridasan's avatar Sujith Haridasan
Browse files

MDL-73415 mod_forum: Address the followup issues for forum

This issue is a followup for changes made in forum. And hence
addresses the following issues spotted for forum:
1. Bring back the "Forums" header in the search page.
2. Remove the stale function forum_update_subscriptions_button
3. Fix the redirection to activity tab when subscription is
   changed, in the subscription tab.
parent 0f94f292
......@@ -115,7 +115,7 @@ Feature: Toggle activities visibility from the course page
And "Test forum name" activity should be hidden
And I click on "Test forum name" "link" in the "Recent activity" "block"
And I should see "Test forum name"
And I should see "(There are no discussion topics yet in this forum)"
And I should see "There are no discussion topics yet in this forum"
@javascript
Scenario: Activities can be made available but not visible on a course page
......
......@@ -22,12 +22,11 @@ Feature: Managers can create courses
And I add the "Latest announcements" block
And I am on the Announcements "forum activity" page
And "Add discussion topic" "link" should exist
And "Subscription mode > Forced subscription" "link" should not exist in current page administration
And "Subscription mode > Forced subscription" "text" should exist in current page administration
And I navigate to "Subscriptions" in current page administration
And I should see "Forced subscription"
And I log out
And I am on the Announcements "forum activity" page logged in as student1
And "Add a new topic" "link" should not exist
And "Forced subscription" "text" should exist
Scenario: Create a course from the management interface and return to it
Given the following "courses" exist:
......
......@@ -216,7 +216,8 @@ class discussion {
'pindiscussion' => null,
'neighbourlinks' => $this->get_neighbour_links_html(),
'exportdiscussion' => !empty($CFG->enableportfolios) ? $this->get_export_discussion_html($user) : null
]
],
'settingsselector' => true,
]);
$capabilities = (array) $exporteddiscussion['capabilities'];
......
......@@ -39,31 +39,45 @@ class subscription_actionbar implements renderable, templatable {
/** @var \stdClass */
private $forum;
/** @var int */
private $edit;
/**
* subscription_actionbar constructor.
*
* @param int $id The forum id.
* @param moodle_url $currenturl Current URL.
* @param \stdClass $forum The forum object.
* @param int $edit This argument decides to show view/manage subscribers view.
*/
public function __construct(int $id, moodle_url $currenturl, \stdClass $forum) {
public function __construct(int $id, moodle_url $currenturl, \stdClass $forum, int $edit) {
$this->id = $id;
$this->currenturl = $currenturl;
$this->forum = $forum;
$this->edit = $edit;
}
/**
* Create url select menu for subscription option
*
* @return url_select the url_select object
* @return url_select|null the url_select object
*/
private function create_subscription_menu(): url_select {
private function create_subscription_menu(): ?url_select {
// When user is on manage subscription, we don't have to show the subscription selector.
if ($this->edit === 1 && !\mod_forum\subscriptions::is_forcesubscribed($this->forum)) {
return null;
}
$sesskey = sesskey();
$modeset = \mod_forum\subscriptions::get_subscription_mode($this->forum);
$optionallink = new moodle_url('/mod/forum/subscribe.php', ['id' => $this->id, 'mode' => 0, 'sesskey' => $sesskey]);
$forcedlink = new moodle_url('/mod/forum/subscribe.php', ['id' => $this->id, 'mode' => 1, 'sesskey' => $sesskey]);
$autolink = new moodle_url('/mod/forum/subscribe.php', ['id' => $this->id, 'mode' => 2, 'sesskey' => $sesskey]);
$disabledlink = new moodle_url('/mod/forum/subscribe.php', ['id' => $this->id, 'mode' => 3, 'sesskey' => $sesskey]);
$optionallink = new moodle_url('/mod/forum/subscribe.php',
['id' => $this->id, 'mode' => FORUM_CHOOSESUBSCRIBE, 'sesskey' => $sesskey, 'edit' => $this->edit]);
$forcedlink = new moodle_url('/mod/forum/subscribe.php',
['id' => $this->id, 'mode' => FORUM_FORCESUBSCRIBE, 'sesskey' => $sesskey, 'edit' => $this->edit]);
$autolink = new moodle_url('/mod/forum/subscribe.php',
['id' => $this->id, 'mode' => FORUM_INITIALSUBSCRIBE, 'sesskey' => $sesskey, 'edit' => $this->edit]);
$disabledlink = new moodle_url('/mod/forum/subscribe.php',
['id' => $this->id, 'mode' => FORUM_DISALLOWSUBSCRIBE, 'sesskey' => $sesskey, 'edit' => $this->edit]);
$menu = [
$optionallink->out(false) => get_string('subscriptionoptional', 'forum'),
......@@ -104,9 +118,14 @@ class subscription_actionbar implements renderable, templatable {
/**
* Create view and manage subscribers select menu.
*
* @return url_select get url_select object.
* @return url_select|null get url_select object.
*/
private function create_view_manage_menu(): url_select {
private function create_view_manage_menu(): ?url_select {
// If forced subscription is used then no need to show the view.
if (\mod_forum\subscriptions::is_forcesubscribed($this->forum)) {
return null;
}
$viewlink = new moodle_url('/mod/forum/subscribers.php', ['id' => $this->id, 'edit' => 'off']);
$managelink = new moodle_url('/mod/forum/subscribers.php', ['id' => $this->id, 'edit' => 'on']);
......@@ -115,12 +134,11 @@ class subscription_actionbar implements renderable, templatable {
$managelink->out(false) => get_string('managesubscriptionson', 'forum'),
];
if ($this->currenturl->get_param('edit') === 'off') {
if ($this->edit === 0) {
$this->currenturl = $viewlink;
} else {
$this->currenturl = $managelink;
}
$urlselect = new url_select($menu, $this->currenturl->out(false), null, 'selectviewandmanagesubscribers');
$urlselect->set_label(get_string('subscribers', 'forum'), ['class' => 'accesshide']);
return $urlselect;
......@@ -133,12 +151,16 @@ class subscription_actionbar implements renderable, templatable {
* @return array data for template
*/
public function export_for_template(renderer_base $output): array {
$data = [];
$subscribeoptionselect = $this->create_subscription_menu();
$viewmanageselect = $this->create_view_manage_menu();
$data = [
'subscriptionoptions' => $subscribeoptionselect->export_for_template($output),
'viewandmanageselect' => $viewmanageselect->export_for_template($output),
];
if ($subscribeoptionselect) {
$data ['subscriptionoptions'] = $subscribeoptionselect->export_for_template($output);
}
if ($viewmanageselect) {
$data['viewandmanageselect'] = $viewmanageselect->export_for_template($output);
}
return $data;
}
}
......@@ -476,3 +476,39 @@ WHERE
return $result;
}
/**
* Prints the editing button on subscribers page
*
* @deprecated since Moodle 4.0
* @todo MDL-73956 Final deprecation in Moodle 4.4
* @global object
* @global object
* @param int $courseid
* @param int $forumid
* @return string
*/
function forum_update_subscriptions_button($courseid, $forumid): string {
global $CFG, $USER;
debugging('The method forum_update_subscriptions_button() has been deprecated as it is no longer used.' .
'The \'Manage subscribers\' button has been replaced with tertiary navigation.', DEBUG_DEVELOPER);
if (!empty($USER->subscriptionsediting)) {
$string = get_string('managesubscriptionsoff', 'forum');
$edit = "off";
} else {
$string = get_string('managesubscriptionson', 'forum');
$edit = "on";
}
$subscribers = html_writer::start_tag('form', array('action' => $CFG->wwwroot . '/mod/forum/subscribers.php',
'method' => 'get', 'class' => 'form-inline'));
$subscribers .= html_writer::empty_tag('input', array('type' => 'submit', 'value' => $string,
'class' => 'btn btn-secondary'));
$subscribers .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'id', 'value' => $forumid));
$subscribers .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'edit', 'value' => $edit));
$subscribers .= html_writer::end_tag('form');
return $subscribers;
}
......@@ -312,6 +312,7 @@ if ($node && $post->get_id() != $discussion->get_first_post_id()) {
$isnestedv2displaymode = $displaymode == FORUM_MODE_NESTED_V2;
$PAGE->set_title("$course->shortname: " . format_string($discussion->get_name()));
$PAGE->set_heading($course->fullname);
$PAGE->set_secondary_active_tab('modulepage');
$PAGE->activityheader->disable();
if ($isnestedv2displaymode) {
$PAGE->add_body_class('nested-v2-display-mode reset-style');
......
......@@ -30,6 +30,7 @@ $string['actionsforpost'] = 'Actions for post';
$string['addanewdiscussion'] = 'Add discussion topic';
$string['addanewquestion'] = 'Add a new question';
$string['addanewtopic'] = 'Add a new topic';
$string['addreply'] = 'Add reply';
$string['addtofavourites'] = 'Star this discussion';
$string['advancedsearch'] = 'Advanced search';
$string['alldiscussions'] = 'All discussions';
......@@ -224,6 +225,8 @@ $string['duedate_help'] = 'This is when posting in the forum is due. Although th
$string['duedatetodisplayincalendar'] = 'Due date to display in calendar';
$string['eachuserforum'] = 'Each person posts one discussion';
$string['edit'] = 'Edit';
$string['editdiscussion'] = 'Edit discussion';
$string['editdiscussiontopic'] = 'Edit discussion topic';
$string['editedby'] = 'Edited by {$a->name} - original submission {$a->date}';
$string['editedpostupdated'] = '{$a}\'s post was updated';
$string['editing'] = 'Editing';
......@@ -318,6 +321,7 @@ $string['forumposts'] = 'Forum posts';
$string['forum:rate'] = 'Rate posts';
$string['forum:replynews'] = 'Reply to announcements';
$string['forum:replypost'] = 'Reply to posts';
$string['replypostdiscussion'] = 'Reply to discussion';
$string['forum:postprivatereply'] = 'Reply privately to posts';
$string['forum:readprivatereplies'] = 'View private replies';
$string['forums'] = 'Forums';
......@@ -598,6 +602,7 @@ $string['privatereply_help'] = 'A private reply can only be viewed by the author
$string['processingdigest'] = 'Processing email digest for user {$a}';
$string['processingpost'] = 'Processing post {$a}';
$string['prune'] = 'Split';
$string['prunediscussion'] = 'Split discussion';
$string['prunedpost'] = 'A new discussion has been created from that post';
$string['pruneheading'] = 'Split the discussion and move this post to a new discussion';
$string['qandaforum'] = 'Q and A forum';
......
......@@ -4255,37 +4255,6 @@ function forum_change_discussionid($postid, $discussionid) {
return true;
}
/**
* Prints the editing button on subscribers page
*
* @global object
* @global object
* @param int $courseid
* @param int $forumid
* @return string
*/
function forum_update_subscriptions_button($courseid, $forumid) {
global $CFG, $USER;
if (!empty($USER->subscriptionsediting)) {
$string = get_string('managesubscriptionsoff', 'forum');
$edit = "off";
} else {
$string = get_string('managesubscriptionson', 'forum');
$edit = "on";
}
$subscribers = html_writer::start_tag('form', array('action' => $CFG->wwwroot . '/mod/forum/subscribers.php',
'method' => 'get', 'class' => 'form-inline'));
$subscribers .= html_writer::empty_tag('input', array('type' => 'submit', 'value' => $string,
'class' => 'btn btn-secondary'));
$subscribers .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'id', 'value' => $forumid));
$subscribers .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'edit', 'value' => $edit));
$subscribers .= html_writer::end_tag('form');
return $subscribers;
}
// Functions to do with read tracking.
/**
......
......@@ -450,6 +450,8 @@ if (!empty($forum)) {
$PAGE->navbar->add(get_string('delete', 'forum'));
$PAGE->set_title($course->shortname);
$PAGE->set_heading($course->fullname);
$PAGE->set_secondary_active_tab('modulepage');
$PAGE->activityheader->disable();
if ($replycount) {
if (!has_capability('mod/forum:deleteanypost', $modcontext)) {
......@@ -552,6 +554,8 @@ if (!empty($forum)) {
$PAGE->set_cm($cm);
$PAGE->set_context($modcontext);
$PAGE->set_secondary_active_tab('modulepage');
$PAGE->activityheader->disable();
$prunemform = new mod_forum_prune_form(null, array('prune' => $prune, 'confirm' => $prune));
......@@ -632,7 +636,7 @@ if (!empty($forum)) {
$course = $DB->get_record('course', array('id' => $forum->course));
$subjectstr = format_string($post->subject, true);
$PAGE->navbar->add($subjectstr, new moodle_url('/mod/forum/discuss.php', array('d' => $discussion->id)));
$PAGE->navbar->add(get_string("prune", "forum"));
$PAGE->navbar->add(get_string("prunediscussion", "forum"));
$PAGE->set_title(format_string($discussion->name).": ".format_string($post->subject));
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();
......@@ -1077,24 +1081,32 @@ if (!empty($discussion->id)) {
$PAGE->navbar->add($titlesubject, $urlfactory->get_discussion_view_url_from_discussion($discussionentity));
}
if ($post->parent) {
$PAGE->navbar->add(get_string('reply', 'forum'));
}
if ($edit) {
$PAGE->navbar->add(get_string('edit', 'forum'));
$PAGE->navbar->add(get_string('editdiscussiontopic', 'forum'), $PAGE->url);
} else if ($reply) {
$PAGE->navbar->add(get_string('addreply', 'forum'));
} else {
$PAGE->navbar->add(get_string('addanewdiscussion', 'forum'), $PAGE->url);
}
$PAGE->set_title("{$course->shortname}: {$strdiscussionname}{$titlesubject}");
$PAGE->set_heading($course->fullname);
$PAGE->set_secondary_active_tab("modulepage");
$activityheaderconfig['hidecompletion'] = true;
if (!empty($parententity)) {
$activityheaderconfig['description'] = '';
}
$activityheaderconfig['description'] = '';
// Remove the activity description.
$PAGE->activityheader->set_attrs($activityheaderconfig);
echo $OUTPUT->header();
if ($edit) {
echo $OUTPUT->heading(get_string('editdiscussiontopic', 'forum'), 2);
} else if ($reply) {
echo $OUTPUT->heading(get_string('replypostdiscussion', 'forum'), 2);
} else {
echo $OUTPUT->heading(get_string('addanewdiscussion', 'forum'), 2);
}
// Checkup.
if (!empty($parententity) && !$capabilitymanager->can_view_post($USER, $discussionentity, $parententity)) {
print_error('cannotreply', 'forum');
......
......@@ -120,7 +120,9 @@ class mod_forum_renderer extends plugin_renderer_base {
$output = '';
$modinfo = get_fast_modinfo($course);
if (!$users || !is_array($users) || count($users)===0) {
$output .= $this->output->heading(get_string("nosubscribers", "forum"));
$output .= $this->output->notification(
get_string("nosubscribers", "forum"),
\core\output\notification::NOTIFY_INFO, false);
} else if (!isset($modinfo->instances['forum'][$forum->id])) {
$output .= $this->output->heading(get_string("invalidmodule", "error"));
} else {
......
......@@ -377,7 +377,7 @@ class summary_table extends table_sql {
public function print_nothing_to_display(): void {
global $OUTPUT;
echo $OUTPUT->heading(get_string('nothingtodisplay'), 4);
echo $OUTPUT->notification(get_string('nothingtodisplay'), \core\output\notification::NOTIFY_INFO);
}
/**
......
......@@ -172,7 +172,6 @@ if ($download) {
\forumreport_summary\event\report_viewed::create($eventparams)->trigger();
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('summarytitle', 'forumreport_summary', $title), 2, 'pb-5');
if (!empty($filters['groups'])) {
\core\notification::info(get_string('viewsdisclaimer', 'forumreport_summary'));
......@@ -183,6 +182,7 @@ if ($download) {
$forumselect = new single_select($reporturl, 'forumid', $forumselectoptions, $forumid, '');
$forumselect->set_label(get_string('forumselectlabel', 'forumreport_summary'));
echo $OUTPUT->render($forumselect);
echo $OUTPUT->heading(get_string('nodetitle', 'forumreport_summary'), 2, 'pb-5 mt-3');
// Render the report filters form.
$renderer = $PAGE->get_renderer('forumreport_summary');
......
......@@ -223,9 +223,8 @@ echo html_writer::link($url, get_string('advancedsearch', 'forum').'...');
echo '</div>';
if (!$PAGE->has_secondary_navigation()) {
echo $OUTPUT->heading($strforums, 2);
}
echo $OUTPUT->heading($strforums, 2);
echo $OUTPUT->heading("$strsearchresults: $totalcount", 3);
$url = new moodle_url('search.php', array('search' => $search, 'id' => $course->id, 'perpage' => $perpage));
......
......@@ -40,6 +40,7 @@ $user = optional_param('user', 0, PARAM_INT); // The userid of
$discussionid = optional_param('d', null, PARAM_INT); // The discussionid to subscribe.
$sesskey = optional_param('sesskey', null, PARAM_RAW);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
$edit = optional_param('edit', 'off', PARAM_ALPHANUM);
$url = new moodle_url('/mod/forum/subscribe.php', array('id'=>$id));
if (!is_null($mode)) {
......@@ -119,26 +120,28 @@ if ($returnurl) {
$returnto = $returnurl;
}
$subscribersurl = new moodle_url('/mod/forum/subscribers.php', ['id' => $id, 'edit' => $edit]);
if (!is_null($mode) and has_capability('mod/forum:managesubscriptions', $context)) {
require_sesskey();
switch ($mode) {
case FORUM_CHOOSESUBSCRIBE : // 0
\mod_forum\subscriptions::set_subscription_mode($forum->id, FORUM_CHOOSESUBSCRIBE);
redirect(
$returnto,
$subscribersurl,
get_string('everyonecannowchoose', 'forum'),
null,
\core\output\notification::NOTIFY_SUCCESS
);
);
break;
case FORUM_FORCESUBSCRIBE : // 1
\mod_forum\subscriptions::set_subscription_mode($forum->id, FORUM_FORCESUBSCRIBE);
redirect(
$returnto,
$subscribersurl,
get_string('everyoneisnowsubscribed', 'forum'),
null,
\core\output\notification::NOTIFY_SUCCESS
);
);
break;
case FORUM_INITIALSUBSCRIBE : // 2
\mod_forum\subscriptions::set_subscription_mode($forum->id, FORUM_INITIALSUBSCRIBE);
......@@ -151,20 +154,20 @@ if (!is_null($mode) and has_capability('mod/forum:managesubscriptions', $context
}
}
redirect(
$returnto,
$subscribersurl,
get_string('everyoneisnowsubscribed', 'forum'),
null,
\core\output\notification::NOTIFY_SUCCESS
);
);
break;
case FORUM_DISALLOWSUBSCRIBE : // 3
\mod_forum\subscriptions::set_subscription_mode($forum->id, FORUM_DISALLOWSUBSCRIBE);
redirect(
$returnto,
$subscribersurl,
get_string('noonecansubscribenow', 'forum'),
null,
\core\output\notification::NOTIFY_SUCCESS
);
);
break;
default:
print_error(get_string('invalidforcesubscribe', 'forum'));
......@@ -172,12 +175,8 @@ if (!is_null($mode) and has_capability('mod/forum:managesubscriptions', $context
}
if (\mod_forum\subscriptions::is_forcesubscribed($forum)) {
redirect(
$returnto,
get_string('everyoneisnowsubscribed', 'forum'),
null,
\core\output\notification::NOTIFY_SUCCESS
);
$subscribersurl->param('notification', 'everyoneisnowsubscribed');
redirect($subscribersurl);
}
$info = new stdClass();
......@@ -209,11 +208,11 @@ if ($issubscribed) {
if ($discussionid === null) {
if (\mod_forum\subscriptions::unsubscribe_user($user->id, $forum, $context, true)) {
redirect(
$returnto,
get_string('nownotsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
$returnto,
get_string('nownotsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
} else {
print_error('cannotunsubscribe', 'forum', get_local_referer(false));
}
......@@ -221,11 +220,11 @@ if ($issubscribed) {
if (\mod_forum\subscriptions::unsubscribe_user_from_discussion($user->id, $discussion, $context)) {
$info->discussion = $discussion->name;
redirect(
$returnto,
get_string('discussionnownotsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
$returnto,
get_string('discussionnownotsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
} else {
print_error('cannotunsubscribe', 'forum', get_local_referer(false));
}
......@@ -262,19 +261,19 @@ if ($issubscribed) {
if ($discussionid == null) {
\mod_forum\subscriptions::subscribe_user($user->id, $forum, $context, true);
redirect(
$returnto,
get_string('nowsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
$returnto,
get_string('nowsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
} else {
$info->discussion = $discussion->name;
\mod_forum\subscriptions::subscribe_user_to_discussion($user->id, $discussion, $context);
redirect(
$returnto,
get_string('discussionnowsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
$returnto,
get_string('discussionnowsubscribed', 'forum', $info),
null,
\core\output\notification::NOTIFY_SUCCESS
);
}
}
......@@ -34,7 +34,8 @@ $url = new moodle_url('/mod/forum/subscribers.php', array('id'=>$id));
if ($group !== 0) {
$url->param('group', $group);
}
if ($edit !== 0) {
if ($edit === 1) {
$url->param('edit', 'on');
} else {
$url->param('edit', 'off');
......@@ -108,7 +109,7 @@ $PAGE->set_heading($COURSE->fullname);
$PAGE->set_secondary_active_tab("forumsubscriptions");
// Output starts from here.
$actionbar = new \mod_forum\output\subscription_actionbar($id, $url, $forum);
$actionbar = new \mod_forum\output\subscription_actionbar($id, $url, $forum, $edit);
$PAGE->activityheader->disable();
echo $OUTPUT->header();
if (!$PAGE->has_secondary_navigation()) {
......@@ -116,14 +117,16 @@ if (!$PAGE->has_secondary_navigation()) {
}
echo $forumoutput->subscription_actionbar($actionbar);
if ($edit === 0) {
if ($edit === 1 && !\mod_forum\subscriptions::is_forcesubscribed($forum)) {
echo $OUTPUT->heading(get_string('managesubscriptionson', 'forum'), 2);
echo $forumoutput->subscriber_selection_form($existingselector, $subscriberselector);
} else {
echo $OUTPUT->heading(get_string('subscribers', 'forum'), 2);
$subscribers = \mod_forum\subscriptions::fetch_subscribed_users($forum, $currentgroup, $context);
if (\mod_forum\subscriptions::is_forcesubscribed($forum)) {
$subscribers = mod_forum_filter_hidden_users($cm, $context, $subscribers);
}
echo $forumoutput->subscriber_overview($subscribers, $forum, $course);
} else {
echo $forumoutput->subscriber_selection_form($existingselector, $subscriberselector);
}
echo $OUTPUT->footer();
......
......@@ -366,9 +366,9 @@
{{/can_create_discussion}}
{{/state.hasdiscussions}}
{{^state.hasdiscussions}}
<div class="forumnodiscuss">
<div class="forumnodiscuss alert alert-info">
{{$no_discussions_text}}
({{#str}}nodiscussions, forum{{/str}})
{{#str}}nodiscussions, forum{{/str}}
{{/no_discussions_text}}
</div>
{{/state.hasdiscussions}}
......
......@@ -43,6 +43,7 @@
"id": 1,
"forumid": 1,
"istimelocked": false,
"settingsselector": true,
"settings": {
"excludetext": false,
"togglemoreicon": false
......@@ -50,24 +51,38 @@
}
}}
<div class="ml-auto dropdown">
<a href="#" class="{{^settings.excludetext}}dropdown-toggle{{/settings.excludetext}} btn btn-link {{#settings.togglemoreicon}}btn-icon colour-inherit text-decoration-none d-flex align-items-center justify-content-center{{/settings.togglemoreicon}}"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
tabindex="0"
aria-controls="forum-action-menu-{{id}}-menu"
aria-label="{{#str}}togglediscussionmenu, mod_forum{{/str}}"
aria-expanded="false">
{{#settings.togglemoreicon}}
{{#pix}} i/menu, core{{/pix}}
{{/settings.togglemoreicon}}
{{^settings.togglemoreicon}}
{{#pix}} i/settings, core{{/pix}}
{{/settings.togglemoreicon}}