r100307 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100306‎ | r100307 | r100308 >
Date:00:47, 20 October 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
added subject to reminder email preview
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/resources/contest.special.contest.js (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -165,6 +165,7 @@
166166 'contest-contest-reminder-close' => 'Close',
167167 'contest-contest-reminder-retry' => 'Retry sending',
168168 'contest-contest-reminder-failed' => 'Could not sent the reminder emails.',
 169+ 'contest-contest-reminder-subject' => 'Subject:',
169170
170171 // Contestant pager
171172 'contest-contestant-id' => 'ID',
@@ -310,6 +311,7 @@
311312 'contest-contest-reminder-close' => 'Close button text',
312313 'contest-contest-reminder-retry' => 'Retry button text',
313314 'contest-contest-reminder-failed' => 'Failiure message, displayed in an alert box',
 315+ 'contest-contest-reminder-subject' => 'Email subject indicator',
314316
315317 // Special:MyContests
316318 'contest-mycontests-toplink' => 'Text for link in the user menu (i.e. where watchlist and preferences are linked)',
Index: trunk/extensions/Contest/specials/SpecialContest.php
@@ -141,7 +141,11 @@
142142 array(
143143 'id' => 'send-reminder',
144144 'data-token' => $this->getUser()->editToken(),
145 - 'data-contest-id' => $contest->getId()
 145+ 'data-contest-id' => $contest->getId(),
 146+
 147+ // Note: this is a copy of the message in ContestContestant::sendReminderEmail.
 148+ // If it's changed or modified by a hook, this message might not be accurate.
 149+ 'data-reminder-subject' => wfMsgExt( 'contest-email-reminder-title', 'parsemag', $contest->getDaysLeft() )
146150 ),
147151 wfMsg( 'contest-contest-send-reminder' )
148152 ) );
Index: trunk/extensions/Contest/Contest.php
@@ -169,6 +169,7 @@
170170 'contest-contest-reminder-close',
171171 'contest-contest-reminder-retry',
172172 'contest-contest-reminder-failed',
 173+ 'contest-contest-reminder-subject',
173174 ),
174175 'dependencies' => array(
175176 'jquery.ui.button', 'jquery.ui.dialog',
Index: trunk/extensions/Contest/resources/contest.special.contest.js
@@ -32,6 +32,7 @@
3333
3434 $dialog = $( '<div />' ).html( '' ).dialog( {
3535 'title': mw.msg( 'contest-contest-reminder-title' ),
 36+ 'minWidth': 550,
3637 'buttons': [
3738 {
3839 'text': mw.msg( 'contest-contest-reminder-send' ),
@@ -70,6 +71,12 @@
7172
7273 $dialog.append( $( '<p />' ).text( mw.msg( 'contest-contest-reminder-preview' ) ) ).append( '<hr />' );
7374
 75+ $dialog.append( $( '<p />' )
 76+ .html( $( '<b />' )
 77+ .text( mw.msg( 'contest-contest-reminder-subject' ) ) )
 78+ .append( ' ' + $( '#send-reminder' ).attr( 'data-reminder-subject' ) ) )
 79+ .append( '<hr />' );
 80+
7481 $dialog.append( $( '#reminder-content' ).html() );
7582 };
7683

Follow-up revisions

RevisionCommit summaryAuthorDate
r1003131.18wmf1 MFT r100295, r100302, r100307, r100308, r100309, r100311reedy01:03, 20 October 2011

Status & tagging log