Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/207408
Change subject: Stop showing redundant links from content_navigation ...................................................................... Stop showing redundant links from content_navigation Bug: T95659 Change-Id: Ie9c6e1cbe5578aa7327267ada0eca4d8aa84d0f3 --- M templates/Skin.php M templates/sidebar.template 2 files changed, 23 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Blueprint refs/changes/08/207408/1 diff --git a/templates/Skin.php b/templates/Skin.php index eb77a4d..2b9a794 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -196,21 +196,20 @@ ); return ''.$cx['funcs']['v']($cx, $in, array('headelement')).' - <div id="side-menu"> '.' <h1 class="firstHeading" id="firstHeading">'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('title')), ENT_QUOTES, 'UTF-8').'</h1> <ul class="content-links"> -'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('content_navigation','views')), $in, true, function($cx, $in) {return ' <li> - <a - href="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('href')), ENT_QUOTES, 'UTF-8').'" - class="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('class')), ENT_QUOTES, 'UTF-8').'" - '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('rel')))) ? 'rel="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('rel')), ENT_QUOTES, 'UTF-8').'"' : '').' - '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('id')))) ? 'id="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('id')), ENT_QUOTES, 'UTF-8').'"' : '').' - > - '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' - </a> - </li> -';}).' <li> +'.$cx['funcs']['sec']($cx, $cx['funcs']['v']($cx, $in, array('content_navigation','views')), $in, true, function($cx, $in) {return ''.((!$cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('redundant')))) ? ' <li> + <a + href="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('href')), ENT_QUOTES, 'UTF-8').'" + class="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('class')), ENT_QUOTES, 'UTF-8').'" + '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('rel')))) ? 'rel="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('rel')), ENT_QUOTES, 'UTF-8').'"' : '').' + '.(($cx['funcs']['ifvar']($cx, $cx['funcs']['v']($cx, $in, array('id')))) ? 'id="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('id')), ENT_QUOTES, 'UTF-8').'"' : '').' + > + '.htmlentities((string)$cx['funcs']['v']($cx, $in, array('text')), ENT_QUOTES, 'UTF-8').' + </a> + </li> +' : '').'';}).' <li> <a href="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('content_navigation','namespaces','talk','href')), ENT_QUOTES, 'UTF-8').'" class="'.htmlentities((string)$cx['funcs']['v']($cx, $in, array('content_navigation','namespaces','talk','class')), ENT_QUOTES, 'UTF-8').'" diff --git a/templates/sidebar.template b/templates/sidebar.template index 460d107..47f822e 100644 --- a/templates/sidebar.template +++ b/templates/sidebar.template @@ -1,16 +1,18 @@ <h1 class="firstHeading" id="firstHeading">{{title}}</h1> <ul class="content-links"> {{#each content_navigation.views}} - <li> - <a - href="{{href}}" - class="{{class}}" - {{#if rel}}rel="{{rel}}"{{/if}} - {{#if id}}id="{{id}}"{{/if}} - > - {{text}} - </a> - </li> + {{#unless redundant}} + <li> + <a + href="{{href}}" + class="{{class}}" + {{#if rel}}rel="{{rel}}"{{/if}} + {{#if id}}id="{{id}}"{{/if}} + > + {{text}} + </a> + </li> + {{/unless}} {{/each}} <li> <a -- To view, visit https://gerrit.wikimedia.org/r/207408 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9c6e1cbe5578aa7327267ada0eca4d8aa84d0f3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Prtksxna <psax...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits