Cenarium has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/189185

Change subject: Adding css class with sync status to flaggedrevs notice id
......................................................................

Adding css class with sync status to flaggedrevs notice id

When viewing a stable version, this adds to the flaggedrevs notice id the css 
class
flaggedrevs_stable_synced if the version is synced, 
flaggedrevs_stable_notsynced otherwise.
When not viewing a stable version, this adds flaggedrevs_notstable. This allows 
customisation
of the notice based on version viewed and sync status.

Change-Id: I9941639e7cb1fb55a6f4bfe36e3c111d821b5bfb
---
M frontend/FlaggablePageView.php
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/85/189185/1

diff --git a/frontend/FlaggablePageView.php b/frontend/FlaggablePageView.php
index ec21e98..9e5ff3d 100644
--- a/frontend/FlaggablePageView.php
+++ b/frontend/FlaggablePageView.php
@@ -376,9 +376,17 @@
                                $tagClass = 'flaggedrevs_basic';
                        }
                }
-               # Wrap tag contents in a div
+               # Wrap tag contents in a div, with class indicating sync status 
when showing stable version
                if ( $tag != '' ) {
-                       $css = "{$tagClass} plainlinks noprint";
+                       if ( $this->showingStable() ) {
+                               if ( $this->article->stableVersionIsSynced() ) {
+                                       $css = "{$tagClass} 
flaggedrevs_stable_synced plainlinks noprint";
+                               } else {
+                                       $css = "{$tagClass} 
flaggedrevs_stable_notsynced plainlinks noprint";
+                               }
+                       } else {
+                              $css = "{$tagClass} flaggedrevs_notstable 
plainlinks noprint";
+                       }
                        $notice = "<div id=\"mw-fr-revisiontag\" 
class=\"{$css}\">{$tag}</div>\n";
                        $this->reviewNotice .= $notice;
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/189185
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9941639e7cb1fb55a6f4bfe36e3c111d821b5bfb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Cenarium <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to