Skip to content
Snippets Groups Projects
Commit ec98b37c authored by Kevin Paxman's avatar Kevin Paxman
Browse files

ISTWCMS-6978: refactor, add next link at bottom, and make URLs relative so...

ISTWCMS-6978: refactor, add next link at bottom, and make URLs relative so they should work on Pantheon
parent f5e16a0b
No related branches found
No related tags found
1 merge request!38ISTWCMS-6978: Add code to view all webforms in webform list block on dashboard
...@@ -133,10 +133,8 @@ class FormsListBlock extends BlockBase implements ContainerFactoryPluginInterfac ...@@ -133,10 +133,8 @@ class FormsListBlock extends BlockBase implements ContainerFactoryPluginInterfac
// a link to view all the webforms to the info part of the // a link to view all the webforms to the info part of the
// render array. // render array.
if ($total_num_of_results > 50) { if ($total_num_of_results > 50) {
$html = $this->t('@count webforms', ['@count' => $total_num_of_results]); $build['entity_list']['info']['#markup'] .= $this->t('<br><a href="../admin/structure/webform">View all webforms</a>');
$html .= '<br />'; $build['entity_list']['more_info']['#markup'] = $this->t('<p class="pager__items"><a href="../admin/structure/webform?page=1">Next ›</a></p>');
$html .= $this->t('There are more than 50 webforms, <a href="/admin/structure/webform">View all webforms</a>');
$build['entity_list']['info']['#markup'] = $html;
} }
// Remove the pager from the webform list. // Remove the pager from the webform list.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment