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@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
13
14?><!DOCTYPE html>
15<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
16 lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
17<head>
18    <meta charset="UTF-8" />
19    <title>
20        <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
21        [<?php echo strip_tags($conf['title'])?>]
22    </title>
23    <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
24    <?php tpl_metaheaders()?>
25    <meta name="viewport" content="width=device-width,initial-scale=1" />
26    <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
27    <?php tpl_includeFile('meta.html') ?>
28</head>
29
30<body>
31    <div id="dokuwiki__detail" class="<?php echo tpl_classes(); ?>">
32        <?php html_msgarea() ?>
33
34        <?php if($ERROR): print $ERROR; ?>
35        <?php else: ?>
36
37            <main class="content group">
38                <?php if($REV) echo p_locale_xhtml('showrev');?>
39                <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1>
40
41                <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
42
43                <div class="img_detail">
44                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
45
46                    <?php if(function_exists('tpl_img_meta')): ?>
47                        <?php tpl_img_meta(); ?>
48                    <?php else: /* deprecated since Release 2014-05-05 */ ?>
49                        <dl>
50                            <?php
51                                $config_files = getConfigFiles('mediameta');
52                                foreach ($config_files as $config_file) {
53                                    if(@file_exists($config_file)) {
54                                        include($config_file);
55                                    }
56                                }
57
58                                foreach($fields as $key => $tag){
59                                    $t = array();
60                                    if (!empty($tag[0])) {
61                                        $t = array($tag[0]);
62                                    }
63                                    if(is_array($tag[3])) {
64                                        $t = array_merge($t,$tag[3]);
65                                    }
66                                    $value = tpl_img_getTag($t);
67                                    if ($value) {
68                                        echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
69                                        if ($tag[2] == 'date') {
70                                            echo dformat($value);
71                                        } else {
72                                            echo hsc($value);
73                                        }
74                                        echo '</dd>';
75                                    }
76                                }
77                            ?>
78                        </dl>
79                    <?php endif; ?>
80                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
81                </div>
82            </main><!-- /.content -->
83
84            <nav>
85                <ul>
86                    <?php if (file_exists(DOKU_INC . 'inc/Menu/DetailMenu.php')) {
87                        echo (new \dokuwiki\Menu\DetailMenu())->getListItems('action ', false);
88                    } else {
89                        _tpl_detailtools();
90                    } ?>
91                </ul>
92            </nav>
93
94        <?php endif; ?>
95    </div>
96</body>
97</html>
98