Index: trunk/extensions/Contest/Contest.i18n.php |
— | — | @@ -109,8 +109,7 @@ |
110 | 110 | |
111 | 111 | // Special:ContestWelcome |
112 | 112 | 'contest-welcome-unknown' => 'There is no contest with the provided name.', |
113 | | - 'contest-welcome-rules' => 'In order to participate, you are required to agree to', // js i18n |
114 | | - 'contest-welcome-rules-link' => 'the contest rules', // js i18n |
| 113 | + 'contest-welcome-rules' => 'In order to participate, you must agree to [[$1|the contest rules]].', |
115 | 114 | 'contest-welcome-signup' => 'Signup now', |
116 | 115 | 'contest-welcome-js-off' => 'The contest user interface uses JavaScript. Your browser does not support JavaScript or JavaScript is disabled.', |
117 | 116 | 'contest-welcome-accept-challenge' => 'Challenge accepted', |
Index: trunk/extensions/Contest/specials/SpecialContestWelcome.php |
— | — | @@ -187,13 +187,8 @@ |
188 | 188 | * @param Contest $contest |
189 | 189 | */ |
190 | 190 | protected function showRules( Contest $contest ) { |
191 | | - $this->getOutput()->addHTML( Html::element( |
192 | | - 'div', |
193 | | - array( |
194 | | - 'id' => 'contest-rules', |
195 | | - 'data-rules' => ContestUtils::getParsedArticleContent( $contest->getField( 'rules_page' ) ) |
196 | | - ) |
197 | | - ) ); |
| 191 | + // TODO: we might want to have a pop-up with the content here, instead of a link to the page. |
| 192 | + $this->getOutput()->addWikiMsgArray( 'contest-welcome-rules', $contest->getField( 'rules_page' ) ); |
198 | 193 | } |
199 | 194 | |
200 | 195 | /** |
Index: trunk/extensions/Contest/Contest.php |
— | — | @@ -234,9 +234,7 @@ |
235 | 235 | 'jquery.contestChallenges', 'jquery.fancybox', |
236 | 236 | ), |
237 | 237 | 'messages' => array( |
238 | | - 'contest-welcome-select-header', |
239 | | - 'contest-welcome-rules', |
240 | | - 'contest-welcome-rules-link', |
| 238 | + 'contest-welcome-select-header' |
241 | 239 | ) |
242 | 240 | ); |
243 | 241 | |
Index: trunk/extensions/Contest/resources/contest.special.welcome.js |
— | — | @@ -14,27 +14,6 @@ |
15 | 15 | mw.config.get( 'ContestChallenges' ), |
16 | 16 | mw.config.get( 'ContestConfig' ) |
17 | 17 | ); |
18 | | - |
19 | | - $rules = $( '#contest-rules' ); |
20 | | - |
21 | | - $div = $( '<div />' ).attr( { |
22 | | - 'style': 'display:none' |
23 | | - } ).html( $( '<div />' ).attr( { 'id': 'contest-rules-div' } ).html( $rules.attr( 'data-rules' ) ) ); |
24 | | - |
25 | | - // TODO: fix very ugly message construction. |
26 | | - $a = $( '<a />' ).text( mw.msg( 'contest-welcome-rules-link' ) ).attr( { 'href': '#contest-rules-div' } ); |
27 | | - $p = $( '<p />' ).text( mw.msg( 'contest-welcome-rules' ) + ' ' ).append( $a ).append( '.' ); |
28 | | - |
29 | | - $rules.html( $p ).append( $div ); |
30 | | - |
31 | | - $a.fancybox( { |
32 | | - 'width' : '85%', |
33 | | - 'height' : '85%', |
34 | | - 'transitionIn' : 'none', |
35 | | - 'transitionOut' : 'none', |
36 | | - 'type' : 'inline', |
37 | | - 'autoDimensions': false |
38 | | - } ); |
39 | 18 | } ); |
40 | 19 | |
41 | 20 | })( window.jQuery, window.mediaWiki ); |