1<?php
2
3/**
4 * DokuWiki Image Detail Page
5 *
6 * @author   Andreas Gohr <andi@splitbrain.org>
7 * @author   Anika Henke <anika@selfthinker.org>
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
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(['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(__DIR__ . '/tpl_header.php') ?>
33
34        <div class="wrapper group" id="dokuwiki__detail">
35
36            <!-- ********** CONTENT ********** -->
37            <main 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 ($media_usage !== []) {
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></main><!-- /content -->
86
87            <hr class="a11y" />
88
89            <!-- PAGE ACTIONS -->
90            <?php if (!$ERROR) : ?>
91                <nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading">
92                    <h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3>
93                    <div class="tools">
94                        <ul>
95                            <?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems(); ?>
96                        </ul>
97                    </div>
98                </nav>
99            <?php endif; ?>
100        </div><!-- /wrapper -->
101
102        <?php include(__DIR__ . '/tpl_footer.php') ?>
103    </div></div><!-- /site -->
104</body>
105</html>
106