1<?php 2/** 3 * Template header, included in the main and detail files 4 */ 5 6// must be run from within DokuWiki 7if (!defined('DOKU_INC')) die(); 8?> 9 10<!-- HEADER --> 11<div id="weltis__header"><div class="header group"> 12 <?php tpl_includeFile('header.html') ?> 13 14 <!-- HEADINGS --> 15 <div class="headings group"> 16 <div class="titlehead group"> 17 <?php 18 $logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize); 19 20 echo '<img class="logo" src="'.$logo.'" width="32" height="32"/>' 21 ?> 22 <h1 class="title"><?php 23 tpl_link( 24 wl(), 25 '<span>'.$conf['title'].'</span>', 26 'accesskey="h" title="[H]"' 27 ); 28 ?></h1> 29 </div> 30 <?php if ($conf['tagline']): ?> 31 <p class="tagline group"><?php echo $conf['tagline']; ?></p> 32 <?php endif ?> 33 </div> 34 35 <!-- TOOLS --> 36 <div class="tools group"> 37 <!-- USER TOOLS --> 38 <?php if ($conf['useacl']): ?> 39 <div id="weltis__usertools"> 40 <?php 41 $userIcon = tpl_getMediaFile(array('images/user.png'), false); 42 43 echo '<a class="menuhead" href="#"><img src="'.$userIcon.'" width="16" height="16"/></a>'; 44 ?> 45 <ul class="menulist"> 46 <?php if (!empty($_SERVER['REMOTE_USER'])): ?> 47 <span class="user"> 48 <?php tpl_userinfo(); /* 'Logged in as ...' */ ?> 49 </span> 50 <?php endif ?> 51 <?php 52 tpl_toolsevent('usertools', array( 53 tpl_action('admin', true, 'li', true), 54 tpl_action('profile', true, 'li', true), 55 tpl_action('register', true, 'li', true), 56 tpl_action('login', true, 'li', true) 57 )); 58 ?> 59 </ul> 60 </div> 61 <?php endif ?> 62 63 <!-- SITE TOOLS --> 64 <div id="weltis__sitetools"> 65 <?php 66 $siteIcon = tpl_getMediaFile(array('images/site.png'), false); 67 68 echo '<a class="menuhead" href="#"><img src="'.$siteIcon.'" width="16" height="16"/></a>'; 69 ?> 70 <ul class="menulist"> 71 <span><?php tpl_searchform(); ?></span> 72 <?php 73 tpl_toolsevent('sitetools', array( 74 tpl_action('recent', true, 'li', true), 75 tpl_action('media', true, 'li', true), 76 tpl_action('index', true, 'li', true) 77 )); 78 ?> 79 </ul> 80 </div> 81 82 <!-- PAGE TOOLS --> 83 <div id="weltis__pagetools"> 84 <?php 85 $pageIcon = tpl_getMediaFile(array('images/page.png'), false); 86 87 echo '<a class="menuhead" href="#"><img src="'.$pageIcon.'" width="16" height="16"/></a>'; 88 ?> 89 <ul class="menulist"> 90 <?php 91 // tpl_toolsevent('pagetools', array( 92 // tpl_action('edit', true, 'li', true), 93 // tpl_action('revert', true, 'li', true), 94 // tpl_action('revisions', true, 'li', true), 95 // tpl_action('backlink', true, 'li', true), 96 // tpl_action('subscribe', true, 'li', true) 97 // )); 98 99 $data = array( 100 'view' => 'main', 101 'items' => array( 102 'edit' => tpl_action('edit', true, 'li', true, '<span>', '</span>'), 103 'revert' => tpl_action('revert', true, 'li', true, '<span>', '</span>'), 104 'revisions' => tpl_action('revisions', true, 'li', true, '<span>', '</span>'), 105 'backlink' => tpl_action('backlink', true, 'li', true, '<span>', '</span>'), 106 'subscribe' => tpl_action('subscribe', true, 'li', true, '<span>', '</span>') 107 ) 108 ); 109 110 // the page tools can be amended through a custom plugin hook 111 $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); 112 if($evt->advise_before()){ 113 foreach($evt->data['items'] as $k => $html) echo $html; 114 } 115 $evt->advise_after(); 116 unset($data); 117 unset($evt); 118 ?> 119 </ul> 120 </div> 121 </div> 122 123 <!-- BREADCRUMBS --> 124 <?php if($conf['breadcrumbs'] || $conf['youarehere']): ?> 125 <div class="breadcrumbs group"> 126 <?php if($conf['youarehere']): ?> 127 <div class="youarehere"><?php tpl_youarehere() ?></div> 128 <?php endif ?> 129 <?php if($conf['breadcrumbs']): ?> 130 <div class="trace"><?php tpl_breadcrumbs('—') ?></div> 131 <?php endif ?> 132 </div> 133 <?php endif ?> 134</div></div> 135 136