jenkins-bot has submitted this change and it was merged.
Change subject: SearchTranslation: Add styling for previous/next links
......................................................................
SearchTranslation: Add styling for previous/next links
Bug: T49920
Change-Id: I93812d9bcab6317441d6886c9aa92858537e6367
---
M i18n/search/en.json
M resources/css/ext.translate.special.searchtranslations.css
M specials/SpecialSearchTranslations.php
3 files changed, 21 insertions(+), 5 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/search/en.json b/i18n/search/en.json
index 4e83be6..5b7ea8c 100644
--- a/i18n/search/en.json
+++ b/i18n/search/en.json
@@ -16,6 +16,6 @@
"tux-sst-nosolr-body": "This wiki does not have a translation search
service.",
"tux-sst-solr-offline-title": "Search unavailable",
"tux-sst-solr-offline-body": "The search service is temporarily
unavailable.",
- "tux-sst-next": "Next results",
- "tux-sst-prev": "Previous results"
+ "tux-sst-next": "Next ›",
+ "tux-sst-prev": "‹ Previous"
}
\ No newline at end of file
diff --git a/resources/css/ext.translate.special.searchtranslations.css
b/resources/css/ext.translate.special.searchtranslations.css
index 29a617d..d4d0ae5 100644
--- a/resources/css/ext.translate.special.searchtranslations.css
+++ b/resources/css/ext.translate.special.searchtranslations.css
@@ -78,6 +78,18 @@
color: #555;
}
+/* Pagination links */
+.tux-searchpage .results .tux-pagination-line {
+ color: #eee;
+ font-size: 1px;
+}
+
+.tux-searchpage .results .tux-pagination-links {
+ font-size: 20px;
+ padding-top: 20px;
+ text-align: center;
+}
+
/* Search area */
.tux-searchpage .searchinput {
padding: 10px 0;
diff --git a/specials/SpecialSearchTranslations.php
b/specials/SpecialSearchTranslations.php
index c5fc1c1..945d060 100644
--- a/specials/SpecialSearchTranslations.php
+++ b/specials/SpecialSearchTranslations.php
@@ -171,6 +171,8 @@
. Html::closeElement( 'div' );
}
+ $resultsHtml .= Html::rawElement( 'hr', array( 'class' =>
'tux-pagination-line' ) );
+
$prev = $next = '';
$total = $server->getTotalHits( $resultset );
$offset = $this->opts->getValue( 'offset' );
@@ -179,7 +181,7 @@
if ( $total - $offset > $this->limit ) {
$newParams = array( 'offset' => $offset + $this->limit
) + $params;
$attribs = array(
- 'class' => 'pager-next',
+ 'class' => 'mw-ui-button pager-next',
'href' => $this->getTitle()->getLocalUrl(
$newParams ),
);
$next = Html::element( 'a', $attribs, $this->msg(
'tux-sst-next' )->text() );
@@ -187,13 +189,15 @@
if ( $offset ) {
$newParams = array( 'offset' => max( 0, $offset -
$this->limit ) ) + $params;
$attribs = array(
- 'class' => 'pager-prev',
+ 'class' => 'mw-ui-button pager-prev',
'href' => $this->getTitle()->getLocalUrl(
$newParams ),
);
$prev = Html::element( 'a', $attribs, $this->msg(
'tux-sst-prev' )->text() );
}
- $resultsHtml .= Html::rawElement( 'div', array(), "$prev $next"
);
+ $resultsHtml .= Html::rawElement( 'div', array( 'class' =>
'tux-pagination-links' ),
+ "$prev $next"
+ );
$search = $this->getSearchInput( $queryString );
$count = $this->msg( 'tux-sst-count' )->numParams( $total );
--
To view, visit https://gerrit.wikimedia.org/r/196386
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I93812d9bcab6317441d6886c9aa92858537e6367
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: AYUSH GARG <[email protected]>
Gerrit-Reviewer: AYUSH GARG <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Pginer <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits