Index: trunk/extensions/Collection/Collection.i18n.php |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 | 'coll-your_book' => 'Your book', |
54 | 54 | 'coll-download_title' => 'Download', |
55 | 55 | 'coll-download_text' => 'To download an offline version choose a format and click the button.', |
| 56 | + 'coll-download_as_text' => 'To download an offline version in $1 format click the button.', |
56 | 57 | 'coll-download' => 'Download', |
57 | 58 | 'coll-format_label' => 'Format:', |
58 | 59 | 'coll-remove' => 'Remove', |
— | — | @@ -996,6 +997,7 @@ |
997 | 998 | 'coll-your_book' => 'Dein Buch', |
998 | 999 | 'coll-download_title' => 'Herunterladen', |
999 | 1000 | 'coll-download_text' => 'Um eine Offline-Version herunterzuladen, wähle ein Format und klicke auf die Schaltfläche.', |
| 1001 | + 'coll-download_as_text' => 'Um eine Offline-Version im Format $1 herunterzuladen, klicke auf die Schaltfläche.', |
1000 | 1002 | 'coll-download' => 'Herunterladen', |
1001 | 1003 | 'coll-format_label' => 'Format:', |
1002 | 1004 | 'coll-remove' => 'Entfernen', |
Index: trunk/extensions/Collection/Collection.templates.php |
— | — | @@ -72,24 +72,34 @@ |
73 | 73 | |
74 | 74 | <div style="margin-bottom: 10px; padding: 10px; border: 1px solid #aaa; background-color: #f9f9f9;"> |
75 | 75 | <h2><span class="mw-headline"><?php $this->msg('coll-download_title') ?></span></h2> |
76 | | - <?php $this->msgWiki('coll-download_text') ?> |
| 76 | + <?php if (count($this->data['formats']) == 1) { |
| 77 | + $writer = array_rand($this->data['formats']); |
| 78 | + echo $GLOBALS['wgParser']->parse( |
| 79 | + wfMsgNoTrans('coll-download_as_text', $this->data['formats'][$writer]), |
| 80 | + $GLOBALS['wgTitle'], |
| 81 | + $GLOBALS['wgOut']->parserOptions(), |
| 82 | + true |
| 83 | + )->getText(); |
| 84 | + $buttonLabel = wfMsgHtml('coll-download_as', htmlspecialchars($this->data['formats'][$writer])); |
| 85 | + } else { |
| 86 | + $this->msgWiki('coll-download_text'); |
| 87 | + $buttonLabel = wfMsgHtml('coll-download'); |
| 88 | + } ?> |
77 | 89 | <form id="downloadForm" action="<?php echo htmlspecialchars(SkinTemplate::makeSpecialUrlSubpage('Book', 'render/')) ?>" method="post"> |
78 | | - <?php if (count($this->data['formats']) == 1) { |
79 | | - $writer = array_rand($this->data['formats']); |
80 | | - $buttonLabel = wfMsgHtml('coll-download_as', htmlspecialchars($this->data['formats'][$writer])); |
81 | | - ?> |
| 90 | + <table style="width:100%; background-color: transparent;"><tr><td><tbody><tr><td> |
| 91 | + <?php if (count($this->data['formats']) == 1) { ?> |
82 | 92 | <input type="hidden" name="writer" value="<?php echo htmlspecialchars($writer) ?>" /> |
83 | | - <?php } else { |
84 | | - $buttonLabel = wfMsgHtml('coll-download'); |
85 | | - ?> |
86 | | - <label for="formatSelect"><?php $this->msg('coll-format_label') ?></label> |
87 | | - <select id="formatSelect" name="writer"> |
88 | | - <?php foreach ($this->data['formats'] as $writer => $name) { ?> |
89 | | - <option value="<?php echo htmlspecialchars($writer) ?>"><?php echo htmlspecialchars($name) ?></option> |
90 | | - <?php } ?> |
91 | | - </select> |
| 93 | + <?php } else { ?> |
| 94 | + <label for="formatSelect"><?php $this->msg('coll-format_label') ?></label> |
| 95 | + <select id="formatSelect" name="writer"> |
| 96 | + <?php foreach ($this->data['formats'] as $writer => $name) { ?> |
| 97 | + <option value="<?php echo htmlspecialchars($writer) ?>"><?php echo htmlspecialchars($name) ?></option> |
| 98 | + <?php } ?> |
| 99 | + </select> |
92 | 100 | <?php } ?> |
93 | | - <table style="width:100%; background-color: transparent;"><tr><td style="text-align:right"><input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>"<?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?> /></td></tr></table> |
| 101 | + </td><td style="text-align:right"> |
| 102 | + <input id="downloadButton" type="submit" value="<?php echo $buttonLabel ?>"<?php if (count($this->data['collection']['items']) == 0) { ?> disabled="disabled"<?php } ?> /> |
| 103 | + </td></tr></tbody></table> |
94 | 104 | </form> |
95 | 105 | </div> |
96 | 106 | |