Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -360,6 +360,8 @@ |
361 | 361 | 'articlefeedbackv5-activity-unoversight' => 'removed oversight on this post on', |
362 | 362 | 'articlefeedbackv5-activity-count' => '$1 actions on this post', |
363 | 363 | 'articlefeedbackv5-activity-more' => 'Show more Activity', |
| 364 | + 'articlefeedbackv5-activity-item-comment' => '$1 $2 $3 : $4', |
| 365 | + 'articlefeedbackv5-activity-item' => '$1 $2 $3', |
364 | 366 | |
365 | 367 | /* EmailCapture */ |
366 | 368 | 'articlefeedbackv5-emailcapture-response-body' => 'Hello! |
— | — | @@ -659,6 +661,8 @@ |
660 | 662 | 'articlefeedbackv5-activity-unoversight' => 'Un-oversight display template', |
661 | 663 | 'articlefeedbackv5-activity-count' => 'Template for activity items count', |
662 | 664 | 'articlefeedbackv5-activity-more' => 'Text for the [Show more] button', |
| 665 | + 'articlefeedbackv5-activity-item-comment' => 'Text for the activity panel - user name link, activity action, date and comment', |
| 666 | + 'articlefeedbackv5-activity-item' => 'Text for the activity panel - user name link, activity action, date', |
663 | 667 | 'articlefeedbackv5-emailcapture-response-body' => 'Body of an e-mail sent to a user wishing to participate in [[mw:Extension:ArticleFeedback|article feedback]] (see the extension documentation). |
664 | 668 | * <code>$1</code> – URL of the confirmation link |
665 | 669 | * <code>$2</code> – URL to type in the confirmation code manually. |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -665,7 +665,7 @@ |
666 | 666 | $( '#articlefeedbackv5-activity-log' ) |
667 | 667 | .find( '.articleFeedbackv5-activity-more' ).replaceWith( data['articlefeedbackv5-view-activity'].activity ); |
668 | 668 | } |
669 | | - if( data['query-continue']['articlefeedbackv5-view-activity'] ) { |
| 669 | + if( data['query-continue'] && data['query-continue']['articlefeedbackv5-view-activity'] ) { |
670 | 670 | $( '#articlefeedbackv5-activity-log' ).find( '.articleFeedbackv5-activity-more' ) |
671 | 671 | .attr( 'rel', data['query-continue']['articlefeedbackv5-view-activity'].aacontinue ) |
672 | 672 | .click( function( e ) { |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiFlagFeedbackArticleFeedbackv5.php |
— | — | @@ -380,8 +380,7 @@ |
381 | 381 | |
382 | 382 | // handle implicit hide/show logging |
383 | 383 | if ( isset( $implicit_hide )) { |
384 | | - $activity = 'hidden'; |
385 | | - ApiArticleFeedbackv5Utils::logActivity( $activity , $pageId, $feedbackId, '', true); |
| 384 | + ApiArticleFeedbackv5Utils::logActivity( 'hidden' , $pageId, $feedbackId, '', true); |
386 | 385 | } |
387 | 386 | |
388 | 387 | // Update helpful/unhelpful display count after submission. |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php |
— | — | @@ -237,7 +237,7 @@ |
238 | 238 | // Make sure our notes are not too long - we won't error, just hard substr it |
239 | 239 | global $wgArticleFeedbackv5MaxActivityNoteLength, $wgLang; |
240 | 240 | |
241 | | - $notes = $wgLang->truncate( $note, $wgArticleFeedbackv5MaxActivityNoteLength ); |
| 241 | + $notes = $wgLang->truncate( $notes, $wgArticleFeedbackv5MaxActivityNoteLength ); |
242 | 242 | |
243 | 243 | // if this is an automatic action, we create our special extension doer and send |
244 | 244 | if ($auto) { |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewActivityArticleFeedbackv5.php |
— | — | @@ -145,20 +145,36 @@ |
146 | 146 | 'class' => 'articleFeedbackv5-activity-item' |
147 | 147 | ) ); |
148 | 148 | |
149 | | - // $user $did_something_on $date |
150 | | - $html .= $this->getUserLink($item->log_user, $item->log_user_text) |
151 | | - . Html::element( 'span', array( |
| 149 | + // so because concatenation is evil, I have to figure out which format to use |
| 150 | + // either the $user $did_something_on $date |
| 151 | + // or the $user $did_something_on $date : $comment |
| 152 | + // because the colon hanging around would look utterly stupid |
| 153 | + |
| 154 | + if ($item->log_comment == '') { |
| 155 | + $html .= wfMessage( 'articlefeedbackv5-activity-item' ) |
| 156 | + ->rawParams( |
| 157 | + $this->getUserLink($item->log_user, $item->log_user_text), |
| 158 | + Html::element( 'span', array( |
| 159 | + 'class' => 'articleFeedbackv5-activity-item-action' |
| 160 | + ), |
| 161 | + wfMessage( 'articlefeedbackv5-activity-' . $item->log_action, |
| 162 | + array())->text()), |
| 163 | + $wgLang->timeanddate( $item->log_timestamp )) |
| 164 | + ->text(); |
| 165 | + } else { |
| 166 | + $html .= wfMessage( 'articlefeedbackv5-activity-item-comment' ) |
| 167 | + ->rawParams( |
| 168 | + $this->getUserLink($item->log_user, $item->log_user_text), |
| 169 | + Html::element( 'span', array( |
152 | 170 | 'class' => 'articleFeedbackv5-activity-item-action' |
153 | | - ), |
154 | | - wfMessage( 'articlefeedbackv5-activity-' . $item->log_action, |
155 | | - array())->text() ) |
156 | | - . $wgLang->timeanddate( $item->log_timestamp ); |
157 | | - |
158 | | - // optional: <div class="articleFeedbackv5-activity-notes">$notes</div> |
159 | | - if (!empty($item->log_comment)) { |
160 | | - $html .= Html::element( 'span', |
| 171 | + ), |
| 172 | + wfMessage( 'articlefeedbackv5-activity-' . $item->log_action, |
| 173 | + array())->text()), |
| 174 | + $wgLang->timeanddate( $item->log_timestamp ), |
| 175 | + Html::element( 'span', |
161 | 176 | array('class' => 'articlefeedbackv5-activity-notes'), |
162 | | - ': ' . $item->log_comment); |
| 177 | + $item->log_comment)) |
| 178 | + ->text(); |
163 | 179 | } |
164 | 180 | |
165 | 181 | // </div> for class="articleFeedbackv5-activity-item" |