function buildContentActionUrls () {
global $wgTitle, $wgUser, $wgRequest;
$action = $wgRequest->getText( 'action' );
+ $section = $wgRequest->getText( 'section' );
$oldid = $wgRequest->getVal( 'oldid' );
$diff = $wgRequest->getVal( 'diff' );
$content_actions = array();
if ( $wgTitle->userCanEdit() ) {
$oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : '';
+ $istalk = ( Namespace::isTalk( $wgTitle->getNamespace()) );
+ $istalkclass = $istalk?' istalk':'';
$content_actions['edit'] = array(
- 'class' => ($action == 'edit' or $action == 'submit') ? 'selected' : '',
+ 'class' => ((($action == 'edit' or $action == 'submit') and $section != 'new') ? 'selected' : '').$istalkclass,
'text' => wfMsg('edit'),
'href' => $this->makeUrl($this->thispage, 'action=edit'.$oid),
'ttip' => wfMsg('tooltip-edit'),
'akey' => wfMsg('accesskey-edit')
);
+ if ( $istalk ) {
+ $content_actions['addsection'] = array(
+ 'class' => $section == 'new'?'selected':'',
+ 'text' => wfMsg('addsection'),
+ 'href' => $this->makeUrl($this->thispage, 'action=edit§ion=new'),
+ 'ttip' => wfMsg('tooltip-addsection'),
+ 'akey' => wfMsg('accesskey-addsection')
+ );
+ }
} else {
$oid = ( $oldid && ! isset( $diff ) ) ? "&oldid={$oldid}" : '';
$content_actions['edit'] = array('class' => ($action == 'edit') ? 'selected' : '',
'specialpage' => 'Special Page',
'personaltools' => 'Personal tools',
"postcomment" => "Post a comment",
+"addsection" => "+",
"articlepage" => "View article",
"subjectpage" => "View subject", # For compatibility
'talk' => 'Discussion',
'accesskey-article' => 'a',
'accesskey-talk' => 't',
'accesskey-edit' => 'e',
+'accesskey-addsection' => '+',
'accesskey-viewsource' => 'e',
'accesskey-history' => 'h',
-'accesskey-protect' => '-',
+'accesskey-protect' => '=',
'accesskey-delete' => 'd',
'accesskey-undelete' => 'd',
'accesskey-move' => 'm',
'tooltip-article' => 'View the article [alt-a]',
'tooltip-talk' => 'Discussion about the article [alt-t]',
'tooltip-edit' => 'You can edit this page. Please use the preview button before saving. [alt-e]',
+'tooltip-addsection' => 'Add a comment to this page. [alt-+]',
'tooltip-viewsource' => 'This page is protected. You can view it\'s source. [alt-e]',
'tooltip-history' => 'Past versions of this page, [alt-h]',
-'tooltip-protect' => 'Protect this page [alt--]',
+'tooltip-protect' => 'Protect this page [alt-=]',
'tooltip-delete' => 'Delete this page [alt-d]',
'tooltip-undelete' => "Restore $1 deleted edits to this page [alt-d]",
'tooltip-move' => 'Move this page [alt-m]',
text-decoration: none;
}
#p-cactions h5 { display: none; }
+#p-cactions li.istalk { margin-right: 0; }
+#p-cactions li.istalk a { padding-right: 0.5em; }
+#p-cactions #ca-addsection a {
+ padding-left: 0.4em;
+ padding-right: 0.4em;
+}
/* offsets to distinguish the tab groups */
li#ca-talk { margin-right: 1.6em; }
li#ca-watch { margin-left: 1.6em; }