jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/336053 )
Change subject: Button re-styling; adding feature edit buttons ...................................................................... Button re-styling; adding feature edit buttons Making the bottom buttons non-primary to avoid theme clashes. Also adding icons. For the feature buttons, making them in-line with the section headers. Also adding "edit" button which mysterious disappeared during the transition. Change-Id: I7ea8558e8c45790613e2605905244a1bd28ad115 --- M includes/content/CollaborationHubContent.php M modules/ext.CollaborationKit.hub.styles.less 2 files changed, 21 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Isarra: Looks good to me, approved diff --git a/includes/content/CollaborationHubContent.php b/includes/content/CollaborationHubContent.php index 439f753..62a0041 100644 --- a/includes/content/CollaborationHubContent.php +++ b/includes/content/CollaborationHubContent.php @@ -456,14 +456,16 @@ $html .= new OOUI\ButtonWidget( [ 'label' => wfMessage( 'collaborationkit-hub-manage' )->inContentLanguage()->text(), 'href' => $title->getLocalURL( [ 'action' => 'edit' ] ), - 'flags' => [ 'primary', 'progressive' ] + 'flags' => [ 'progressive' ], + 'icon' => 'edit' ] ); // TODO make sure they have create permission, too $html .= new OOUI\ButtonWidget( [ 'label' => wfMessage( 'collaborationkit-hub-addpage' )->inContentLanguage()->text(), 'href' => SpecialPage::getTitleFor( 'CreateHubFeature' )->getFullUrl( [ 'collaborationhub' => $title->getFullText() ] ), - 'flags' => [ 'primary', 'progressive' ] + 'flags' => [ 'progressive' ], + 'icon' => 'add' ] ); } @@ -610,6 +612,11 @@ $sectionLinks[ 'viewLink' ][ 'title' ] = $spTitle->getLinkURL(); $sectionLinks[ 'viewLink' ][ 'msg' ] = wfMessage( 'collaborationkit-hub-subpage-view' )->inContentLanguage()->text(); $sectionLinks[ 'viewLink' ][ 'icon' ] = 'search'; + + $sectionLinks[ 'editLink' ] = []; + $sectionLinks[ 'editLink' ][ 'title' ] = $spTitle->getEditURL(); + $sectionLinks[ 'editLink' ][ 'msg' ] = wfMessage( 'edit' )->inContentLanguage()->text(); + $sectionLinks[ 'editLink' ][ 'icon' ] = 'edit'; } foreach ( $sectionLinks as $sectionLink ) { $sectionLinksText .= $this->makeEditSectionLink( $sectionLink[ 'title' ], $sectionLink[ 'msg' ], $sectionLink[ 'icon' ] ); @@ -633,7 +640,9 @@ $spPage ) ); - $html .= $sectionLinksText; + if ( $sectionLinksText !== '' ) { + $html .= Html::rawElement( 'div', [ 'class' => 'mw-ck-hub-section-buttons' ], $sectionLinksText ); + } OutputPage::setupOOUI(); return $html; @@ -648,6 +657,7 @@ */ protected function makeEditSectionLink( $link, $message, $icon ) { $html = new OOUI\ButtonWidget( [ + 'classes' => [ 'mw-ck-hub-section-button' ], 'label' => $message, 'href' => $link, 'framed' => false, diff --git a/modules/ext.CollaborationKit.hub.styles.less b/modules/ext.CollaborationKit.hub.styles.less index 2c14341..b5bcb8b 100644 --- a/modules/ext.CollaborationKit.hub.styles.less +++ b/modules/ext.CollaborationKit.hub.styles.less @@ -1,8 +1,5 @@ -// I dunno what to name things. - @import "ext.CollaborationKit.mixins.less"; -// ARGH .mw-ck-hub-toc { clear: both; margin: 1em 0 2em; @@ -63,6 +60,7 @@ clear: left; h2 { + display: inline; margin: 0; padding: 0 0 .25em; border-bottom-style: none; @@ -71,6 +69,13 @@ border-right-style: none; } } + .mw-ck-hub-section-buttons { + display: inline; + margin-left: 2em; + } + .mw-ck-hub-section-button { + margin: -.2em 1em 0 0; + } } .mw-ck-collaborationhub ul { display: inline-block; -- To view, visit https://gerrit.wikimedia.org/r/336053 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7ea8558e8c45790613e2605905244a1bd28ad115 Gerrit-PatchSet: 7 Gerrit-Project: mediawiki/extensions/CollaborationKit Gerrit-Branch: master Gerrit-Owner: Harej <jamesmh...@gmail.com> Gerrit-Reviewer: Isarra <zhoris...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits