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();
12
13?><!DOCTYPE html>
14<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
15 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__detail" class="<?php echo tpl_classes(); ?>">
31        <?php html_msgarea() ?>
32
33        <?php if($ERROR): print $ERROR; ?>
34        <?php else: ?>
35
36            <main class="content group">
37                <?php if($REV) echo p_locale_xhtml('showrev');?>
38                <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1>
39
40                <?php tpl_img(900, 700); ?>
41
42                <div class="img_detail">
43                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
44
45                    <?php if(function_exists('tpl_img_meta')): ?>
46                        <?php tpl_img_meta(); ?>
47                    <?php else: /* deprecated since Release 2014-05-05 */ ?>
48                        <dl>
49                            <?php
50                                $config_files = getConfigFiles('mediameta');
51                                foreach ($config_files as $config_file) {
52                                    if(@file_exists($config_file)) {
53                                        include($config_file);
54                                    }
55                                }
56
57                                foreach($fields as $key => $tag){
58                                    $t = array();
59                                    if (!empty($tag[0])) {
60                                        $t = array($tag[0]);
61                                    }
62                                    if(is_array($tag[3])) {
63                                        $t = array_merge($t,$tag[3]);
64                                    }
65                                    $value = tpl_img_getTag($t);
66                                    if ($value) {
67                                        echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
68                                        if ($tag[2] == 'date') {
69                                            echo dformat($value);
70                                        } else {
71                                            echo hsc($value);
72                                        }
73                                        echo '</dd>';
74                                    }
75                                }
76                            ?>
77                        </dl>
78                    <?php endif; ?>
79                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
80                </div>
81            </main><!-- /.content -->
82
83            <nav>
84                <ul>
85                    <?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems('action ', false); ?>
86                </ul>
87            </nav>
88        <?php endif; ?>
89    </div>
90</body>
91</html>
92