r108484 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108483‎ | r108484 | r108485 >
Date:00:44, 10 January 2012
Author:rmoen
Status:resolved (Comments)
Tags:
Comment:
added recent changes log to moodbar feedback, add min height to fbd-list due to absolute positioned fbd-filters box
Modified paths:
  • /trunk/extensions/MoodBar/ApiMoodBar.php (modified) (history)
  • /trunk/extensions/MoodBar/DashboardForms.php (modified) (history)
  • /trunk/extensions/MoodBar/MoodBar.i18n.php (modified) (history)
  • /trunk/extensions/MoodBar/MoodBar.php (modified) (history)
  • /trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/DashboardForms.php
@@ -29,7 +29,7 @@
3030 $output = $wgOut->getHTML();
3131 $wgOut->clearHTML( );
3232 $wgOut->addHTML( $oldText );
33 -
 33+
3434 if ( $result === true ) {
3535 return true;
3636 }
Index: trunk/extensions/MoodBar/MoodBar.i18n.php
@@ -155,6 +155,7 @@
156156 'moodbar-log-name' => 'Feedback log',
157157 'moodbar-log-header' => 'This is the log of actions taken on feedback items listed on the [[Special:FeedbackDashboard|feedback dashboard]].',
158158 'moodbar-log-hide' => 'hid [[$1]]',
 159+ 'moodbar-log-feedback' => 'MoodBar Feedback [[$1]]',
159160 'moodbar-log-restore' => 'restored the visibility for [[$1]]',
160161 //Feedback Response
161162 'moodbar-response-terms' => 'By submitting, you agree to transparency under these $1.',
@@ -316,6 +317,7 @@
317318 'moodbar-type-sad' => '$1 is the username that can be used for GENDER. Message is used on Special:FeedbackDashboard.',
318319 'moodbar-type-confused' => '$1 is the username that can be used for GENDER. Message is used on Special:FeedbackDashboard.',
319320 'moodbar-type-stats' => 'The stats for Moodbar feedback in the last 24 hours, $1 is the number of Happy, $2 is the number of Sad, $3 is the number of Confused',
 321+
320322 'moodbar-user-ip' => '{{Identical|IP Address}}',
321323 'moodbar-response-terms' => 'Text of the user license agreement. Parameters:
322324 * $1 {{msg-mw|moodbar-response-link}}',
@@ -323,6 +325,13 @@
324326 'moodbar-response-url' => '{{Optional}}
325327
326328 Terms of use URL. Do not change this URL until a translation of the page itself exists.',
 329+ // Log types
 330+ 'moodbar-log-name' => 'Feedback log name',
 331+ 'moodbar-log-header' => 'Descriptive header text for Feedback log page.',
 332+ 'moodbar-log-hide' => 'Log Action text for hiding feedback [[$1]] is link to feedback item',
 333+ 'moodbar-log-feedback' => 'Log Action text for leaving feedback [[$1]] is link to feedback item',
 334+ 'moodbar-log-restore' => 'Log Action text for restoring feedback [[$1]] is link to feedback item',
 335+ //Feedback Dashboard Response
327336 'response-back-text' => 'Text for response preview back button',
328337 'response-preview-text' => 'Text for preview response preview button',
329338 'response-ajax-action-head' => 'Text for ajax status heading while request is being made',
Index: trunk/extensions/MoodBar/ApiMoodBar.php
@@ -29,8 +29,19 @@
3030
3131 $result = array( 'result' => 'success' );
3232 $this->getResult()->addValue( null, $this->getModuleName(), $result );
 33+
 34+ //add feedback log in recent changes
 35+ $this->logFeedback($params, $item->getProperty( 'id' ));
3336 }
3437
 38+ public function logFeedback( $params, $itemId ) {
 39+ $title = SpecialPage::getTitleFor( 'FeedbackDashboard', $itemId);
 40+ $reason = $params['type'] . ': ' . $params['comment'];
 41+ $log = new LogPage( 'moodbar' );
 42+ $log->addEntry( 'feedback', $title, $reason );
 43+
 44+ }
 45+
3546 public function needsToken() {
3647 return true;
3748 }
Index: trunk/extensions/MoodBar/modules/ext.moodBar.dashboard/ext.moodBar.dashboard.css
@@ -167,6 +167,7 @@
168168 min-height: 20em;
169169 list-style: none;
170170 list-style-image: none; /* ie 7 fix */
 171+ min-height: 500px;
171172 }
172173
173174 .client-nojs #fbd-list-more {
Index: trunk/extensions/MoodBar/MoodBar.php
@@ -63,6 +63,7 @@
6464 $wgLogActions += array(
6565 'moodbar/hide' => 'moodbar-log-hide',
6666 'moodbar/restore' => 'moodbar-log-restore',
 67+ 'moodbar/feedback' => 'moodbar-log-feedback'
6768 );
6869
6970 // Jobs

Follow-up revisions

RevisionCommit summaryAuthorDate
r108563make user contrib log reason translatable, add/document reason in language fi...rmoen23:37, 10 January 2012

Comments

#Comment by Catrope (talk | contribs)   18:35, 10 January 2012
+		$reason = $params['type'] . ': ' . $params['comment']; 

You should make this translatable, by creating a message that contains '$1: $2' in English.

OK otherwise.

Status & tagging log