Index: trunk/extensions/Collection/Collection.i18n.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | |
27 | 27 | $messages['en'] = array( |
28 | 28 | 'coll-desc' => '[[Special:Book|Create books]]', |
29 | | - 'coll-book_mode_intro' => "With the ''book mode'' you can create a book consisting of arbitrary wiki pages. You can export your book in different formats (for example PDF or ODF) or order a printed copy.", |
| 29 | + 'coll-book_mode_intro' => "<big>With the ''book mode'' you can create a book containing wiki pages of your choice. You can export the book in different formats (for example PDF or ODF) or order a printed copy.</big>", |
30 | 30 | 'coll-book_mode_help' => 'See [[{{MediaWiki:Coll-helppage}}|the help page about books]] for more information.', |
31 | 31 | 'coll-start_book_mode' => 'Start book mode', |
32 | 32 | 'coll-book_mode_text_article' => 'Book mode text', |
Index: trunk/extensions/Collection/images/cancel-button.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/Collection/images/cancel-button.png |
___________________________________________________________________ |
Name: svn:mime-type |
33 | 33 | + image/png |
Index: trunk/extensions/Collection/images/ok-button.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/Collection/images/ok-button.png |
___________________________________________________________________ |
Name: svn:mime-type |
34 | 34 | + image/png |
Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -59,11 +59,7 @@ |
60 | 60 | if ( is_null( $title ) ) { |
61 | 61 | $title = Title::newMainPage(); |
62 | 62 | } |
63 | | - if ( $wgRequest->getVal( 'continue' ) ) { |
64 | | - CollectionSession::enable(); |
65 | | - } else { |
66 | | - CollectionSession::disable(); |
67 | | - } |
| 63 | + CollectionSession::enable(); |
68 | 64 | $wgOut->redirect( $title->getFullURL() ); |
69 | 65 | return; |
70 | 66 | |
— | — | @@ -277,47 +273,114 @@ |
278 | 274 | |
279 | 275 | function renderBookModePage( $referer ) { |
280 | 276 | global $wgOut; |
| 277 | + global $wgScriptPath; |
281 | 278 | |
282 | 279 | $this->setHeaders(); |
283 | 280 | $wgOut->setPageTitle( wfMsg( 'coll-book_mode' ) ); |
284 | 281 | |
285 | 282 | $wgOut->addWikiMsg( 'coll-book_mode_intro' ); |
286 | 283 | |
| 284 | + $imagepath = "$wgScriptPath/extensions/Collection/images"; |
| 285 | + |
| 286 | + $wgOut->addInlineStyle(<<<EOS |
| 287 | +.collection-button { |
| 288 | + float: left; |
| 289 | + padding: 0 10px 0 14px; |
| 290 | + height: 29px; |
| 291 | +} |
| 292 | + |
| 293 | +.collection-button.ok { |
| 294 | + background: url($imagepath/ok-button.png) left top no-repeat; |
| 295 | +} |
| 296 | + |
| 297 | +.collection-button.okright { |
| 298 | + background: url($imagepath/ok-button.png) right top no-repeat; |
| 299 | + margin-right: 10px; |
| 300 | + padding: 0; |
| 301 | + width: 4px; |
| 302 | +} |
| 303 | + |
| 304 | +.collection-button.cancel { |
| 305 | + background: url($imagepath/cancel-button.png) left top no-repeat; |
| 306 | +} |
| 307 | + |
| 308 | +.collection-button.cancelright { |
| 309 | + background: url($imagepath/cancel-button.png) right top no-repeat; |
| 310 | + padding: 0; |
| 311 | + width: 4px; |
| 312 | +} |
| 313 | + |
| 314 | +.collection-button a { |
| 315 | + display: block; |
| 316 | + color: #fff; |
| 317 | + font-size: 1.1em; |
| 318 | + font-weight: bold; |
| 319 | + line-height: 29px; |
| 320 | +} |
| 321 | + |
| 322 | +.collection-button a:hover { |
| 323 | + text-decoration: none; |
| 324 | +} |
| 325 | +EOS |
| 326 | + ); |
| 327 | + |
287 | 328 | $wgOut->addHTML( |
288 | 329 | Xml::tags( 'div', |
289 | 330 | array( |
290 | 331 | 'style' => 'margin: 10px 0;', |
291 | 332 | ), |
292 | | - Xml::tags( 'form', |
| 333 | + Xml::tags( 'div', |
293 | 334 | array( |
294 | | - 'action' => SkinTemplate::makeSpecialUrlSubpage( 'Book', 'start_book_mode/' ), |
295 | | - 'method' => 'post', |
| 335 | + 'class' => 'collection-button ok', |
296 | 336 | ), |
297 | | - Xml::element( 'input', |
| 337 | + Xml::element( 'a', |
298 | 338 | array( |
299 | | - 'type' => 'hidden', |
300 | | - 'name' => 'referer', |
301 | | - 'value' => $referer, |
| 339 | + 'href' => SkinTemplate::makeSpecialUrlSubpage( |
| 340 | + 'Book', 'start_book_mode/', |
| 341 | + array( |
| 342 | + 'referer' => $referer, |
| 343 | + ) |
| 344 | + ), |
| 345 | + // TODO: title |
302 | 346 | ), |
303 | | - '', false |
| 347 | + wfMsg( 'coll-start_book_mode' ) |
304 | 348 | ) |
305 | | - . Xml::element( 'input', |
| 349 | + ) |
| 350 | + . Xml::element( 'div', |
| 351 | + array( |
| 352 | + 'class' => 'collection-button okright', |
| 353 | + ), |
| 354 | + '', false |
| 355 | + ) |
| 356 | + . Xml::tags( 'div', |
| 357 | + array( |
| 358 | + 'class' => 'collection-button cancel', |
| 359 | + ), |
| 360 | + Xml::element( 'a', |
306 | 361 | array( |
307 | | - 'type' => 'submit', |
308 | | - 'name' => 'continue', |
309 | | - 'value' => wfMsg( 'coll-start_book_mode' ), |
| 362 | + 'href' => SkinTemplate::makeSpecialUrlSubpage( |
| 363 | + 'Book', 'stop_book_mode/', |
| 364 | + array( |
| 365 | + 'referer' => $referer, |
| 366 | + ) |
| 367 | + ), |
| 368 | + // TODO: title |
310 | 369 | ), |
311 | | - '', false |
| 370 | + wfMsg( 'coll-cancel' ) |
312 | 371 | ) |
313 | | - . Xml::element( 'input', |
314 | | - array( |
315 | | - 'type' => 'submit', |
316 | | - 'name' => 'exit', |
317 | | - 'value' => wfMsg( 'coll-cancel' ), |
318 | | - ), |
319 | | - '', false |
320 | | - ) |
321 | 372 | ) |
| 373 | + . Xml::element( 'div', |
| 374 | + array( |
| 375 | + 'class' => 'collection-button cancelright', |
| 376 | + ), |
| 377 | + '', false |
| 378 | + ) |
| 379 | + . Xml::element( 'div', |
| 380 | + array( |
| 381 | + 'style' => 'clear: both;', |
| 382 | + ), |
| 383 | + '', false |
| 384 | + ) |
322 | 385 | ) |
323 | 386 | ); |
324 | 387 | |