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