From d8411bd5fe5128d2bb5fef1ff820b8ae9282744f Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 20 Sep 2013 19:16:52 +0200 Subject: [PATCH] Add continue editing link also to js and css pages Wrap link in a span with class Change-Id: I3cbbf9c2ae23672c0939261f2675273f5923e5f9 --- includes/EditPage.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 68691c5cd4..9a68ab3ab1 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3155,6 +3155,10 @@ HTML return $previewHTML; } + # provide a anchor link to the editform + $continueEditing = '' . + '[[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' . + wfMessage( 'continue-editing' )->text() . ']]'; if ( $this->mTriedSave && !$this->mTokenOk ) { if ( $this->mTokenOkExceptSuffix ) { $note = wfMessage( 'token_suffix_mismatch' )->plain(); @@ -3165,8 +3169,7 @@ HTML } 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 @@ HTML # Used messages to make sure grep find them: # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview if ( $level && $format ) { - $note = "
" . wfMessage( "{$level}{$format}preview" )->text() . "
"; + $note = "
" . + wfMessage( "{$level}{$format}preview" )->text() . + ' ' . $continueEditing . "
"; } } -- 2.20.1