1<?php 2/** 3 * DokuWiki Image Detail Page 4 * 5 * @author Andreas Gohr <andi@splitbrain.org> 6 * @author Anika Henke <anika@selfthinker.org> 7 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 8 */ 9 10// must be run from within DokuWiki 11if (!defined('DOKU_INC')) die(); 12header('X-UA-Compatible: IE=edge,chrome=1'); 13 14?><!DOCTYPE html> 15<html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> 16<head> 17 <meta charset="utf-8" /> 18 <title> 19 <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> 20 [<?php echo strip_tags($conf['title'])?>] 21 </title> 22 <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 23 <?php tpl_metaheaders()?> 24 <meta name="viewport" content="width=device-width,initial-scale=1" /> 25 <?php echo tpl_favicon(array('favicon', 'mobile')) ?> 26 <?php tpl_includeFile('meta.html') ?> 27</head> 28 29<body> 30 <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?>"> 31 32 <?php include('tpl_header.php') ?> 33 34 <div class="wrapper group" id="dokuwiki__detail"> 35 36 <!-- ********** CONTENT ********** --> 37 <div id="dokuwiki__content"><div class="pad group"> 38 <?php html_msgarea() ?> 39 40 <?php if(!$ERROR): ?> 41 <div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span></div> 42 <?php endif; ?> 43 44 <div class="page group"> 45 <?php tpl_flush() ?> 46 <?php tpl_includeFile('pageheader.html') ?> 47 <!-- detail start --> 48 <?php 49 if($ERROR): 50 echo '<h1>'.$ERROR.'</h1>'; 51 else: ?> 52 <?php if($REV) echo p_locale_xhtml('showrev');?> 53 <h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1> 54 55 <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?> 56 57 <div class="img_detail"> 58 <?php tpl_img_meta(); ?> 59 <dl> 60 <?php 61 echo '<dt>'.$lang['reference'].':</dt>'; 62 $media_usage = ft_mediause($IMG,true); 63 if(count($media_usage) > 0){ 64 foreach($media_usage as $path){ 65 echo '<dd>'.html_wikilink($path).'</dd>'; 66 } 67 }else{ 68 echo '<dd>'.$lang['nothingfound'].'</dd>'; 69 } 70 ?> 71 </dl> 72 <p><?php echo $lang['media_acl_warning']; ?></p> 73 </div> 74 <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?> 75 <?php endif; ?> 76 </div> 77 <!-- detail stop --> 78 <?php tpl_includeFile('pagefooter.html') ?> 79 <?php tpl_flush() ?> 80 81 <?php /* doesn't make sense like this; @todo: maybe add tpl_imginfo()? 82 <div class="docInfo"><?php tpl_pageinfo(); ?></div> 83 */ ?> 84 85 </div></div><!-- /content --> 86 87 <hr class="a11y" /> 88 89 <!-- PAGE ACTIONS --> 90 <?php if (!$ERROR): ?> 91 <div id="dokuwiki__pagetools"> 92 <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3> 93 <div class="tools"> 94 <ul> 95 <?php 96 $data = array( 97 'view' => 'detail', 98 'items' => array( 99 'mediaManager' => tpl_action('mediaManager', true, 'li', true, '<span>', '</span>'), 100 'img_backto' => tpl_action('img_backto', true, 'li', true, '<span>', '</span>'), 101 ) 102 ); 103 104 // the page tools can be amended through a custom plugin hook 105 $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); 106 if($evt->advise_before()) { 107 foreach($evt->data['items'] as $k => $html) echo $html; 108 } 109 $evt->advise_after(); 110 unset($data); 111 unset($evt); 112 ?> 113 </ul> 114 </div> 115 </div> 116 <?php endif; ?> 117 </div><!-- /wrapper --> 118 119 <?php include('tpl_footer.php') ?> 120 </div></div><!-- /site --> 121</body> 122</html> 123