detail.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. // must be run from within DokuWiki
  10. if (!defined('DOKU_INC')) die();
  11. ?><!DOCTYPE html>
  12. <html lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
  13. <head>
  14. <meta charset="utf-8" />
  15. <title>
  16. <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
  17. [<?php echo strip_tags($conf['title'])?>]
  18. </title>
  19. <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
  20. <?php tpl_metaheaders()?>
  21. <meta name="viewport" content="width=device-width,initial-scale=1" />
  22. <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
  23. <?php tpl_includeFile('meta.html') ?>
  24. </head>
  25. <body>
  26. <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?>">
  27. <?php include('tpl_header.php') ?>
  28. <div class="wrapper group" id="dokuwiki__detail">
  29. <!-- ********** CONTENT ********** -->
  30. <main id="dokuwiki__content"><div class="pad group">
  31. <?php html_msgarea() ?>
  32. <?php if(!$ERROR): ?>
  33. <div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span></div>
  34. <?php endif; ?>
  35. <div class="page group">
  36. <?php tpl_flush() ?>
  37. <?php tpl_includeFile('pageheader.html') ?>
  38. <!-- detail start -->
  39. <?php
  40. if($ERROR):
  41. echo '<h1>'.$ERROR.'</h1>';
  42. else: ?>
  43. <?php if($REV) echo p_locale_xhtml('showrev');?>
  44. <h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
  45. <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
  46. <div class="img_detail">
  47. <?php tpl_img_meta(); ?>
  48. <dl>
  49. <?php
  50. echo '<dt>'.$lang['reference'].':</dt>';
  51. $media_usage = ft_mediause($IMG,true);
  52. if(count($media_usage) > 0){
  53. foreach($media_usage as $path){
  54. echo '<dd>'.html_wikilink($path).'</dd>';
  55. }
  56. }else{
  57. echo '<dd>'.$lang['nothingfound'].'</dd>';
  58. }
  59. ?>
  60. </dl>
  61. <p><?php echo $lang['media_acl_warning']; ?></p>
  62. </div>
  63. <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
  64. <?php endif; ?>
  65. </div>
  66. <!-- detail stop -->
  67. <?php tpl_includeFile('pagefooter.html') ?>
  68. <?php tpl_flush() ?>
  69. <?php /* doesn't make sense like this; @todo: maybe add tpl_imginfo()?
  70. <div class="docInfo"><?php tpl_pageinfo(); ?></div>
  71. */ ?>
  72. </div></main><!-- /content -->
  73. <hr class="a11y" />
  74. <!-- PAGE ACTIONS -->
  75. <?php if (!$ERROR): ?>
  76. <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading">
  77. <h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3>
  78. <div class="tools">
  79. <ul>
  80. <?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems(); ?>
  81. </ul>
  82. </div>
  83. </nav>
  84. <?php endif; ?>
  85. </div><!-- /wrapper -->
  86. <?php include('tpl_footer.php') ?>
  87. </div></div><!-- /site -->
  88. </body>
  89. </html>