Brian Wolff has submitted this change and it was merged.

Change subject: Add continue editing link also to js and css pages
......................................................................


Add continue editing link also to js and css pages

Wrap link in a span with class

Change-Id: I3cbbf9c2ae23672c0939261f2675273f5923e5f9
---
M includes/EditPage.php
1 file changed, 8 insertions(+), 3 deletions(-)

Approvals:
  Brian Wolff: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 68691c5..9a68ab3 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3155,6 +3155,10 @@
                                return $previewHTML;
                        }
 
+                       # provide a anchor link to the editform
+                       $continueEditing = '<span class="mw-continue-editing">' 
.
+                               '[[#' . self::EDITFORM_ID . '|' . 
$wgLang->getArrow() . ' ' .
+                               wfMessage( 'continue-editing' )->text() . 
']]</span>';
                        if ( $this->mTriedSave && !$this->mTokenOk ) {
                                if ( $this->mTokenOkExceptSuffix ) {
                                        $note = wfMessage( 
'token_suffix_mismatch' )->plain();
@@ -3165,8 +3169,7 @@
                        } elseif ( $this->incompleteForm ) {
                                $note = wfMessage( 'edit_form_incomplete' 
)->plain();
                        } else {
-                               $note = wfMessage( 'previewnote' )->plain() .
-                                       ' [[#' . self::EDITFORM_ID . '|' . 
$wgLang->getArrow() . ' ' . wfMessage( 'continue-editing' )->text() . ']]';
+                               $note = wfMessage( 'previewnote' )->plain() . ' 
' . $continueEditing;
                        }
 
                        $parserOptions = $this->mArticle->makeParserOptions( 
$this->mArticle->getContext() );
@@ -3195,7 +3198,9 @@
                                # Used messages to make sure grep find them:
                                # Messages: usercsspreview, userjspreview, 
sitecsspreview, sitejspreview
                                if ( $level && $format ) {
-                                       $note = "<div 
id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" 
)->text() . "</div>";
+                                       $note = "<div 
id='mw-{$level}{$format}preview'>" .
+                                               wfMessage( 
"{$level}{$format}preview" )->text() .
+                                               ' ' . $continueEditing . 
"</div>";
                                }
                        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cbbf9c2ae23672c0939261f2675273f5923e5f9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Brian Wolff <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to