Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/73195
Change subject: Bug 51052: Show non-existent pages in watchlist
......................................................................
Bug 51052: Show non-existent pages in watchlist
Make them italic and don't show timestamp to show they are
different
Bug: 51052
Change-Id: I85a5f12e8a34c92f3a9e98ec1e1d8934ec4d0b22
---
M includes/specials/SpecialMobileWatchlist.php
M less/common/pagelist.less
M stylesheets/common/pagelist.css
3 files changed, 21 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/95/73195/1
diff --git a/includes/specials/SpecialMobileWatchlist.php
b/includes/specials/SpecialMobileWatchlist.php
index d4030d1..1e372ee 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -253,11 +253,11 @@
'MAX(' . $dbr->tableName( 'revision' ) .
'.rev_timestamp) AS rev_timestamp'
);
$joinConds = array(
- 'page' => array( 'JOIN', array(
+ 'page' => array( 'LEFT JOIN', array(
'wl_namespace = page_namespace',
'wl_title = page_title'
) ),
- 'revision' => array( 'JOIN', array(
+ 'revision' => array( 'LEFT JOIN', array(
'page_id = rev_page'
) )
);
@@ -507,14 +507,21 @@
$output = $this->getOutput();
$title = Title::makeTitle( $row->wl_namespace, $row->wl_title );
$titleText = $title->getPrefixedText();
- $ts = new MWTimestamp( $row->rev_timestamp );
- $lastModified = wfMessage(
'mobile-frontend-watchlist-modified', $ts->getHumanTimestamp() )->text();
+ $ts = $row->rev_timestamp;
+ if ( $ts ) {
+ $ts = new MWTimestamp( $ts );
+ $lastModified = wfMessage(
'mobile-frontend-watchlist-modified', $ts->getHumanTimestamp() )->text();
+ $className = 'title';
+ } else {
+ $className = 'title non-existent';
+ $lastModified = '';
+ }
$thumb = $this->renderThumb( $row );
$output->addHtml(
Html::openElement( 'li', array( 'title' => $titleText )
) .
- Html::openElement( 'a', array( 'href' =>
$title->getLocalUrl(), 'class' => 'title' ) ) .
+ Html::openElement( 'a', array( 'href' =>
$title->getLocalUrl(), 'class' => $className ) ) .
$thumb['html'] .
Html::element( 'h2', array(), $titleText ).
Html::element( 'div', array( 'class' => 'info' ),
$lastModified ) .
diff --git a/less/common/pagelist.less b/less/common/pagelist.less
index 4e328c7..656188f 100644
--- a/less/common/pagelist.less
+++ b/less/common/pagelist.less
@@ -40,13 +40,17 @@
margin: 0 0 0 -@thumbSpace;
}
- a.title {
+
+ .title {
display: block;
position: relative;
padding: 0 @contentMarginRight @articleListPaddingTop
@contentMarginLeft;
margin: -1px 0;
/* FIXME: remove if we reset text-decoration in common
styles */
text-decoration: none;
+ &.non-existent {
+ font-style: italic;
+ }
}
a:active {
diff --git a/stylesheets/common/pagelist.css b/stylesheets/common/pagelist.css
index 175140a..69f3510 100644
--- a/stylesheets/common/pagelist.css
+++ b/stylesheets/common/pagelist.css
@@ -47,7 +47,7 @@
height: 100%;
margin: 0 0 0 -85px;
}
-ul.page-list li a.title {
+ul.page-list li .title {
display: block;
position: relative;
padding: 0 23px 15px 23px;
@@ -56,6 +56,9 @@
text-decoration: none;
}
+ul.page-list li .title.non-existent {
+ font-style: italic;
+}
ul.page-list li a:active {
background: #e8e8e9;
background: rgba(232, 232, 233, 0.5);
--
To view, visit https://gerrit.wikimedia.org/r/73195
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85a5f12e8a34c92f3a9e98ec1e1d8934ec4d0b22
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits