Index: trunk/phase3/includes/SkinPHPTal.php |
— | — | @@ -33,15 +33,16 @@ |
34 | 34 | |
35 | 35 | function initPage() { |
36 | 36 | $this->skinname = "davinci"; |
| 37 | + $this->template = "xhtml_slim"; |
37 | 38 | } |
38 | 39 | |
39 | 40 | function outputPage( &$out ) { |
40 | 41 | global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut; |
41 | 42 | global $wgScriptPath, $wgStyleSheetPath, $wgLanguageCode, $wgUseNewInterlanguage; |
42 | | - global $wgOutputEncoding, $wgUseDatabaseMessages, $action; |
| 43 | + global $wgOutputEncoding, $wgUseDatabaseMessages, $action, $oldid, $diff; |
43 | 44 | |
44 | 45 | $this->initPage(); |
45 | | - $tpl = new PHPTAL($this->skinname . '.pt', 'templates'); |
| 46 | + $tpl = new PHPTAL($this->template . '.pt', 'templates'); |
46 | 47 | #if ( $wgUseDatabaseMessages ) { // uncomment this to fall back to GetText |
47 | 48 | |
48 | 49 | $tpl->setTranslator(new MediaWiki_I18N()); |
— | — | @@ -53,6 +54,7 @@ |
54 | 55 | $tpl->setRef( "thispage", &$thispage ); |
55 | 56 | $tpl->set( "subtitle", $out->getSubtitle() ); |
56 | 57 | $tpl->setRef( 'charset', $wgOutputEncoding); |
| 58 | + $tpl->setRef( 'skinname', $this->skinname ); |
57 | 59 | |
58 | 60 | $loggedin = $wgUser->getID() != 0; |
59 | 61 | $tpl->setRef( "loggedin", &$loggedin ); |
— | — | @@ -85,6 +87,8 @@ |
86 | 88 | $tpl->setRef( "skin", &$this); |
87 | 89 | $tpl->set( "logo", $this->logoText() ); |
88 | 90 | $tpl->set( "pagestats", $this->pageStats() ); |
| 91 | + $tpl->set( "disclaimer", $this->disclaimerLink() ); |
| 92 | + $tpl->set( "about", $this->aboutLink() ); |
89 | 93 | |
90 | 94 | $tpl->setRef( "debug", &$out->mDebugtext ); |
91 | 95 | $tpl->set( "reporttime", $out->reportTime() ); |
— | — | @@ -162,15 +166,21 @@ |
163 | 167 | 'akey' => wfMsg('accesskey-talk')); |
164 | 168 | |
165 | 169 | if ( $wgTitle->userCanEdit() ) { |
| 170 | + if ( $oldid && ! isset( $diff ) ) { |
| 171 | + $oid = "&oldid={$oldid}"; |
| 172 | + } |
166 | 173 | $content_actions['edit'] = array('class' => ($action == 'edit' or $action == 'submit') ? 'selected' : '', |
167 | 174 | 'text' => wfMsg('edit'), |
168 | | - 'href' => $this->makeUrl($thispage, 'action=edit'), |
| 175 | + 'href' => $this->makeUrl($thispage, 'action=edit'.$oid), |
169 | 176 | 'ttip' => wfMsg('tooltip-edit'), |
170 | 177 | 'akey' => wfMsg('accesskey-edit')); |
171 | 178 | } else { |
| 179 | + if ( $oldid && ! isset( $diff ) ) { |
| 180 | + $oid = "&oldid={$oldid}"; |
| 181 | + } |
172 | 182 | $content_actions['edit'] = array('class' => ($action == 'edit') ? 'selected' : '', |
173 | 183 | 'text' => wfMsg('viewsource'), |
174 | | - 'href' => $this->makeUrl($thispage, 'action=edit'), |
| 184 | + 'href' => $this->makeUrl($thispage, 'action=edit'.$oid), |
175 | 185 | 'ttip' => wfMsg('tooltip-edit'), |
176 | 186 | 'akey' => wfMsg('accesskey-edit')); |
177 | 187 | } |
— | — | @@ -333,7 +343,16 @@ |
334 | 344 | function initPage() { |
335 | 345 | SkinPHPTal::initPage(); |
336 | 346 | $this->skinname = "davinci"; |
| 347 | + $this->template = "xhtml_slim"; |
337 | 348 | } |
338 | 349 | } |
339 | 350 | |
| 351 | + class SkinMono extends SkinPHPTal { |
| 352 | + function initPage() { |
| 353 | + SkinPHPTal::initPage(); |
| 354 | + $this->skinname = "mono"; |
| 355 | + $this->template = "xhtml_slim"; |
| 356 | + } |
| 357 | + } |
| 358 | + |
340 | 359 | ?> |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | if( $wgUsePHPTal ) { |
22 | 22 | #$wgValidSkinNames[] = "PHPTal"; |
23 | 23 | $wgValidSkinNames['davinci'] = "DaVinci"; |
| 24 | + $wgValidSkinNames['mono'] = "Mono"; |
24 | 25 | } |
25 | 26 | |
26 | 27 | include_once( "RecentChange.php" ); |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -99,7 +99,8 @@ |
100 | 100 | 'cologneblue' => "Cologne Blue", |
101 | 101 | 'smarty' => "Paddington", |
102 | 102 | 'montparnasse' => "Montparnasse", |
103 | | - 'davinci' => "DaVinci" |
| 103 | + 'davinci' => "DaVinci", |
| 104 | + 'mono' => "Mono" |
104 | 105 | ); |
105 | 106 | |
106 | 107 | /* private */ $wgMathNamesEn = array( |