diff --git a/includes/functions.php b/includes/functions.php
index 57ef2a72..d063b192 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -449,7 +449,7 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
// Make sure $per_page is a valid value
$per_page = ($per_page <= 0) ? 1 : $per_page;
- $seperator = '' . $user->lang['COMMA_SEPARATOR'] . '';
+ $seperator = '
';
$total_pages = ceil($num_items / $per_page);
if ($total_pages == 1 || !$num_items)
@@ -460,24 +460,27 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
$on_page = floor($start_item / $per_page) + 1;
$url_delim = (strpos($base_url, '?') === false) ? '?' : '&';
- $page_string = ($on_page == 1) ? '1' : '1';
+ $page_string = ($on_page == 1) ? '- 1
' : '- 1
';
if ($total_pages > 5)
{
$start_cnt = min(max(1, $on_page - 4), $total_pages - 5);
$end_cnt = max(min($total_pages, $on_page + 4), 6);
- $page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;
+ // Add ... separator to pagination
+ $page_string .= ($start_cnt > 1) ? '- ' . $user->lang['ELLIPSIS'] . '
' : $seperator;
for ($i = $start_cnt + 1; $i < $end_cnt; ++$i)
{
- $page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . '';
+ $page_string .= ($i == $on_page) ? '- ' . $i . '
' : '- ' . $i . '
';
if ($i < $end_cnt - 1)
{
$page_string .= $seperator;
}
}
- $page_string .= ($end_cnt < $total_pages) ? ' ... ' : $seperator;
+
+ // Add ... separator to pagination
+ $page_string .= ($end_cnt < $total_pages) ? '- ' . $user->lang['ELLIPSIS'] . '
' : $seperator;
}
else
{
@@ -485,14 +488,14 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
for ($i = 2; $i < $total_pages; ++$i)
{
- $page_string .= ($i == $on_page) ? '' . $i . '' : '' . $i . '';
+ $page_string .= ($i == $on_page) ? '- ' . $i . '
' : '- ' . $i . '
';
if ($i < $total_pages)
{
$page_string .= $seperator;
}
}
}
- $page_string .= ($on_page == $total_pages) ? '' . $total_pages . '' : '' . $total_pages . '';
+ $page_string .= ($on_page == $total_pages) ? '- ' . $total_pages . '
' : '- ' . $total_pages . '
';
if ($add_prevnext_text)
{
diff --git a/styles/prosilver/template/portal/modules/announcements_center.html b/styles/prosilver/template/portal/modules/announcements_center.html
index b931322a..39cbc611 100644
--- a/styles/prosilver/template/portal/modules/announcements_center.html
+++ b/styles/prosilver/template/portal/modules/announcements_center.html
@@ -37,7 +37,7 @@
diff --git a/styles/prosilver/template/portal/modules/news_compact_center.html b/styles/prosilver/template/portal/modules/news_compact_center.html
index feba87fe..11928d29 100644
--- a/styles/prosilver/template/portal/modules/news_compact_center.html
+++ b/styles/prosilver/template/portal/modules/news_compact_center.html
@@ -59,11 +59,11 @@
-
+
diff --git a/styles/prosilver/theme/portal.css b/styles/prosilver/theme/portal.css
index 82ffb467..2384b67f 100644
--- a/styles/prosilver/theme/portal.css
+++ b/styles/prosilver/theme/portal.css
@@ -120,6 +120,14 @@ span.portal-corners-top-inner, span.portal-corners-bottom-inner{
margin-right: 0px;
}
+.portal-news-pagination {
+ height: 2em;
+}
+
+.portal-news-pagination .pagination {
+ font-size: 1.1em;
+}
+
/**
* margin spacing as in default prosilver for the forumlist
*/
diff --git a/styles/subsilver2/template/portal/modules/announcements_center.html b/styles/subsilver2/template/portal/modules/announcements_center.html
index cab147f5..da486653 100644
--- a/styles/subsilver2/template/portal/modules/announcements_center.html
+++ b/styles/subsilver2/template/portal/modules/announcements_center.html
@@ -60,9 +60,9 @@
diff --git a/styles/subsilver2/template/portal/modules/announcements_center_compact.html b/styles/subsilver2/template/portal/modules/announcements_center_compact.html
index 274aafc9..5b5ac8bb 100644
--- a/styles/subsilver2/template/portal/modules/announcements_center_compact.html
+++ b/styles/subsilver2/template/portal/modules/announcements_center_compact.html
@@ -54,8 +54,8 @@
- | {TOTAL_ANNOUNCEMENTS}
- • {AP_PAGE_NUMBER} • {AP_PAGINATION} • {AP_PAGE_NUMBER} |
+
diff --git a/styles/subsilver2/template/portal/modules/news_center.html b/styles/subsilver2/template/portal/modules/news_center.html
index b9caba2f..61720cb8 100644
--- a/styles/subsilver2/template/portal/modules/news_center.html
+++ b/styles/subsilver2/template/portal/modules/news_center.html
@@ -56,9 +56,9 @@
- |
+ |
+ • {NP_PAGE_NUMBER} • {NP_PAGINATION} • {NP_PAGE_NUMBER}
diff --git a/styles/subsilver2/template/portal/modules/news_compact_center.html b/styles/subsilver2/template/portal/modules/news_compact_center.html
index b3b18423..942e6f2e 100644
--- a/styles/subsilver2/template/portal/modules/news_compact_center.html
+++ b/styles/subsilver2/template/portal/modules/news_compact_center.html
@@ -53,8 +53,8 @@
- | {TOTAL_NEWS}
- • {NP_PAGE_NUMBER} • {NP_PAGINATION} • {NP_PAGE_NUMBER} |
+
diff --git a/styles/subsilver2/theme/portal.css b/styles/subsilver2/theme/portal.css
index 7ce2fd63..1c50d828 100644
--- a/styles/subsilver2/theme/portal.css
+++ b/styles/subsilver2/theme/portal.css
@@ -159,3 +159,16 @@
margin-left: -1px;
}
}
+
+.portal-pagination ul {
+ display: inline-block;
+ list-style: none !important;
+ margin-left: 5px;
+}
+
+.portal-pagination ul li {
+ display: inline-block !important;
+ padding: 0;
+ font-size: 100%;
+ line-height: normal;
+}
diff --git a/tests/functional/portal_announcement_test.php b/tests/functional/portal_announcement_test.php
index bde49813..d9e012a6 100644
--- a/tests/functional/portal_announcement_test.php
+++ b/tests/functional/portal_announcement_test.php
@@ -59,6 +59,11 @@ class phpbb_functional_portal_announcement_test extends \board3\portal\tests\tes
public function test_shortened_message()
{
+ if (!class_exists('\nickvergessen\trimmessage\trim_message'))
+ {
+ $this->markTestSkipped('trimmessage is not available for testing.');
+ }
+
// Create topic as announcement
$data = $this->create_topic(2, 'Portal-announce-global', str_repeat('This is a global announcement for the portal', 6), array(
'topic_type' => POST_GLOBAL,