1<?php 2/** 3 * DokuWiki Bootstrap3 Template: Add New Page Plugin 4 * 5 * @link http://dokuwiki.org/template:bootstrap3 6 * @author Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> 7 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 */ 9 10global $ID; 11global $INFO; 12 13?> 14<ul class="nav navbar-nav" id="dw__addnewpage"> 15 <li class="dropdown"> 16 <a href="<?php wl($ID) ?>" class="dropdown-toggle" data-target="#" data-toggle="dropdown" title="<?php echo tpl_getLang('add_new_page') ?>" role="button" aria-haspopup="true" aria-expanded="false"> 17 <?php echo iconify('mdi:file-plus'); ?> <span class="hidden-lg hidden-md hidden-sm"><?php echo tpl_getLang('add_new_page') ?></span><span class="caret"></span> 18 </a> 19 <ul class="dropdown-menu" role="menu"> 20 <li class="dropdown-header hidden-xs hidden-sm"><?php echo iconify('mdi:file-plus'); ?> <?php echo tpl_getLang('add_new_page') ?></li> 21 <li> 22 <?php 23 #$current_ns = getNS($ID); 24 $current_ns = false; 25 $search = array('addnewpage', 'class="button"'); 26 $replace = array('addnewpage form-inline', 'class="btn btn-success pull-right"'); 27 // hack to keep struct plugin from rendering its output 28 $keep = $INFO['id']; 29 $INFO['id'] = $ID.'_nostruct'; 30 $form = p_render('xhtml',p_get_instructions(sprintf('{{NEWPAGE>%s}}', $current_ns)), $info); 31 $INFO['id'] = $keep; 32 $form = str_replace($search, $replace, $form); 33 34 echo $form; 35 ?> 36 </li> 37 </ul> 38 </li> 39</ul> 40