Index: trunk/phase3/templates/xhtml_slim.pt |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | </script> |
23 | 23 | </head> |
24 | 24 | |
25 | | - <body> |
| 25 | + <body tal:attributes="ondblclick body-ondblclick|default"> |
26 | 26 | <div id="visual-portal-wrapper"> |
27 | 27 | |
28 | 28 | <div id="portal-column-content"> |
Index: trunk/phase3/includes/SkinPHPTal.php |
— | — | @@ -84,18 +84,20 @@ |
85 | 85 | $tpl->setRef( 'charset', $wgOutputEncoding); |
86 | 86 | $tpl->setRef( 'skinname', $this->skinname ); |
87 | 87 | $tpl->setRef( "loggedin", &$this->loggedin ); |
| 88 | + /* XXX currently unused, might get useful later |
88 | 89 | $tpl->set( "editable", ($wgTitle->getNamespace() != NS_SPECIAL ) ); |
89 | 90 | $tpl->set( "exists", $wgTitle->getArticleID() != 0 ); |
90 | 91 | $tpl->set( "watch", $wgTitle->userIsWatching() ? "unwatch" : "watch" ); |
91 | 92 | $tpl->set( "protect", count($wgTitle->getRestrictions()) ? "unprotect" : "protect" ); |
92 | 93 | $tpl->set( "helppage", wfMsg('helppage')); |
| 94 | + $tpl->set( "sysop", $wgUser->isSysop() ); |
| 95 | + */ |
93 | 96 | $tpl->setRef( "searchaction", &$wgScriptPath ); |
94 | 97 | $tpl->setRef( "stylepath", &$wgStyleSheetPath ); |
95 | 98 | $tpl->setRef( "lang", &$wgLanguageCode ); |
96 | 99 | $tpl->set( "langname", $wgLang->getLanguageName( $wgLanguageCode ) ); |
97 | 100 | $tpl->setRef( "username", &$this->username ); |
98 | 101 | $tpl->setRef( "userpage", &$this->userpage); |
99 | | - $tpl->set( "sysop", $wgUser->isSysop() ); |
100 | 102 | if( $wgUser->getNewtalk() ) { |
101 | 103 | $usertitle = Title::newFromText( $this->userpage ); |
102 | 104 | $usertalktitle = $usertitle->getTalkPage(); |
— | — | @@ -111,6 +113,7 @@ |
112 | 114 | } else { |
113 | 115 | $ntl = ""; |
114 | 116 | } |
| 117 | + |
115 | 118 | $tpl->setRef( "newtalk", &$ntl ); |
116 | 119 | $tpl->setRef( "skin", &$this); |
117 | 120 | $tpl->set( "logo", $this->logoText() ); |
— | — | @@ -136,7 +139,13 @@ |
137 | 140 | $tpl->set('language_urls', false); |
138 | 141 | } |
139 | 142 | $tpl->set('personal_urls', $this->buildPersonalUrls()); |
140 | | - $tpl->set('content_actions', $this->buildContentActionUrls()); |
| 143 | + $content_actions = $this->buildContentActionUrls(); |
| 144 | + $tpl->setRef('content_actions', &$content_actions); |
| 145 | + if($content_actions['edit']['href'] && $wgUser->getOption("editondblclick") ) { |
| 146 | + $tpl->set('body-ondblclick', 'document.location = "' .$content_actions['edit']['href'] .'";'); |
| 147 | + } else { |
| 148 | + $tpl->set('body-ondblclick', ''); |
| 149 | + } |
141 | 150 | $tpl->set( "nav_urls", $this->buildNavUrls() ); |
142 | 151 | |
143 | 152 | // execute template |