Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/52052
Change subject: (bug 45057) Display error message on permalink if feedback
doesn't exist
......................................................................
(bug 45057) Display error message on permalink if feedback doesn't exist
Change-Id: Ib899f472867f01942e39a963e5388851b309a947
---
M ArticleFeedbackv5.i18n.php
M SpecialArticleFeedbackv5.php
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
3 files changed, 3 insertions(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5
refs/changes/52/52052/1
diff --git a/ArticleFeedbackv5.i18n.php b/ArticleFeedbackv5.i18n.php
index 327ed0b..481f984 100644
--- a/ArticleFeedbackv5.i18n.php
+++ b/ArticleFeedbackv5.i18n.php
@@ -242,6 +242,7 @@
'articlefeedbackv5-unsupported-message' => 'Sorry, your browser is not
supported by this prototype. To see this page, please use a different browser.',
'articlefeedbackv5-page-disabled' => 'Article Feedback page not enabled
for this page.',
'articlefeedbackv5-no-feedback' => "There is no feedback for the filter
you selected. To change your filter, try one of the options above (e.g.:
'Featured' or 'Unreviewed').",
+ 'articlefeedbackv5-invalid-feedback' => 'The requested feedback does
not exist.',
'articlefeedbackv5-viewactivity' => 'Read note',
'articlefeedbackv5-viewactivity-empty' => 'No reason given',
'articlefeedbackv5-mask-view-contents' => 'View contents',
@@ -971,6 +972,7 @@
'articlefeedbackv5-unsupported-message' => 'A message to be displayed
on the special page, when a visitor with an unsupported browser visits.',
'articlefeedbackv5-page-disabled' => 'A message to be displayed on the
article feedback page when AFT is not enabled for that page',
'articlefeedbackv5-no-feedback' => 'A message to be displayed on the
article feedback page when there is no feedback yet for a certain filter.',
+ 'articlefeedbackv5-invalid-feedback' => 'A message to be displayed on
the article feedback page when the requested feedback could not be found (does
not exist).',
'articlefeedbackv5-viewactivity' => 'Text for the link to see the log
of activity (e.g. mark as helpful, resolve, oversight, ...) taken towards
feedback',
'articlefeedbackv5-viewactivity-empty' => 'Text for the link to see the
log of activity (e.g. mark as helpful, resolve, oversight, ...) taken towards
feedback, when no comment was entered for the last action',
'articlefeedbackv5-mask-view-contents' => 'Pseudo-link to make it
obvious that clicking there will reveal the original feedback content',
diff --git a/SpecialArticleFeedbackv5.php b/SpecialArticleFeedbackv5.php
index 0838f63..2440eb3 100644
--- a/SpecialArticleFeedbackv5.php
+++ b/SpecialArticleFeedbackv5.php
@@ -418,7 +418,7 @@
*/
protected function buildContent( $renderer, $records ) {
if ( !$records ) {
- return '';
+ return $this->msg( 'articlefeedbackv5-invalid-feedback'
)->text();
}
if ( $this->feedbackId ) {
diff --git
a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
index 2f46d5a..341e9e5 100644
--- a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
+++ b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
@@ -469,7 +469,6 @@
$.articleFeedbackv5special.emptyMessage = function() {
var $feedbackContainer = $( '#articleFeedbackv5-show-feedback'
);
if ( $feedbackContainer.children().length == 0 ) {
- var $message =
$feedbackContainer.append(
$( '<div
id="articlefeedbackv5-no-feedback" />' ).text(
mw.msg(
'articlefeedbackv5-no-feedback' )
--
To view, visit https://gerrit.wikimedia.org/r/52052
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib899f472867f01942e39a963e5388851b309a947
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedbackv5
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits