/** * Return an array for a tools menu * * @author Giuseppe Di Terlizzi <*****@*****.**> * * @return array of tools */ function bootstrap3_tools_menu($add_icons = true) { $individual = bootstrap3_conf('showIndividualTool'); $tools = bootstrap3_tools($add_icons); $result = array(); foreach ($individual as $tool) { if (!isset($_SERVER['REMOTE_USER']) && $tool == 'user') { continue; } $result[$tool] = $tools[$tool]; } return $result; }
/** * Return an array for a tools menu * * @author Giuseppe Di Terlizzi <*****@*****.**> * * @return array of tools */ function bootstrap3_tools_menu() { $tools = bootstrap3_tools(); foreach ($tools as $id => $menu) { foreach ($menu['items'] as $action => $item) { $tools[$id]['menu'][$action] = bootstrap3_action_item($action, $item['icon']); } } return $tools; }
<?php /** * DokuWiki Bootstrap3 Template: Page Tools * * @link http://dokuwiki.org/template:bootstrap3 * @author Giuseppe Di Terlizzi <*****@*****.**> * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ // must be run from within DokuWiki if (!defined('DOKU_INC')) { die; } if (bootstrap3_conf('showPageTools')) { ?> <div id="dw__pagetools" class="hidden-print panel panel-default"> <div class="tools"> <ul class="nav nav-stacked nav-pills"> <?php $tools = bootstrap3_tools(); unset($tools['page']['menu']['top']); $tools_menu = bootstrap3_toolsevent('pagetools', $tools['page']['menu'], 'main', true); $tools_menu = str_replace(array('class="action', '</i>', '</a>'), array('class="action text-muted', '</i><span class="sr-only">', '</span></a>'), $tools_menu); echo $tools_menu; ?> </ul> </div> </div> <?php }