Skip to content
Snippets Groups Projects
Commit ec029471 authored by catch's avatar catch
Browse files

Issue #2828680 by raman.b, bandanasharma, mogtofu33, drclaw, damontgomery,...

Issue #2828680 by raman.b, bandanasharma, mogtofu33, drclaw, damontgomery, tanubansal, paulocs, amietpatial, Chi, borisson_: Missing ul wrapper on forum local action links

(cherry picked from commit 290d4049)
parent 8b1bfc8f
No related branches found
No related tags found
6 merge requests!1286issue #3240655 by elfakhar,!1285Issue #3240655 by elfakhar Aligne the active border,!541Issue #3123070: Fix 'PSR2.Classes.PropertyDeclaration.Underscore' coding standard,!463Resolve #3205025 "Class align center for media",!386Allow multiple vocabularies in the taxonomy filter,!308Issue #3118206: Remote media does not validate provider
......@@ -294,7 +294,6 @@ protected function buildActionLinks($vid, TermInterface $forum_term = NULL) {
if ($this->nodeAccess->createAccess($type)) {
$node_type = $this->nodeTypeStorage->load($type);
$links[$type] = [
'#attributes' => ['class' => ['action-links']],
'#theme' => 'menu_local_action',
'#link' => [
'title' => $this->t('Add new @node_type', [
......@@ -323,15 +322,26 @@ protected function buildActionLinks($vid, TermInterface $forum_term = NULL) {
// Anonymous user does not have access to create new topics.
else {
$links['login'] = [
'#attributes' => ['class' => ['action-links']],
'#theme' => 'menu_local_action',
'#link' => [
'title' => $this->t('Log in to post new content in the forum.'),
'url' => Url::fromRoute('user.login', [], ['query' => $this->getDestinationArray()]),
],
// Without this workaround, the action links will be rendered as <li>
// with no wrapping <ul> element.
// @todo Find a better way for this in https://www.drupal.org/node/3181052.
'#prefix' => '<ul class="action-links">',
'#suffix' => '</ul>',
];
}
}
else {
// Without this workaround, the action links will be rendered as <li> with
// no wrapping <ul> element.
// @todo Find a better way for this in https://www.drupal.org/node/3181052.
$links['#prefix'] = '<ul class="action-links">';
$links['#suffix'] = '</ul>';
}
return $links;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment