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();
12header('X-UA-Compatible: IE=edge,chrome=1');
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(array('favicon', 'mobile')) ?>
26    <?php tpl_includeFile('meta.html') ?>
27</head>
28
29<body>
30	<?php include(__DIR__.'/analytics.php') ?>
31
32    <!--[if lte IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
33    <div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?>">
34
35        <?php include('tpl_header.php') ?>
36
37        <div class="wrapper group" id="dokuwiki__detail">
38
39            <!-- ********** CONTENT ********** -->
40            <div id="dokuwiki__content"><div class="pad group">
41
42                <?php if(!$ERROR): ?>
43                    <div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span></div>
44                <?php endif; ?>
45
46                <div class="page group">
47                    <?php tpl_flush() ?>
48                    <?php tpl_includeFile('pageheader.html') ?>
49                    <!-- detail start -->
50                    <?php
51                    if($ERROR):
52                        echo '<h1>'.$ERROR.'</h1>';
53                    else: ?>
54
55                        <h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
56
57                        <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
58
59                        <div class="img_detail">
60                            <?php tpl_img_meta(); ?>
61                        </div>
62                        <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
63                    <?php endif; ?>
64                </div>
65                <!-- detail stop -->
66                <?php tpl_includeFile('pagefooter.html') ?>
67                <?php tpl_flush() ?>
68
69                <?php /* doesn't make sense like this; @todo: maybe add tpl_imginfo()?
70                <div class="docInfo"><?php tpl_pageinfo(); ?></div>
71                */ ?>
72
73            </div></div><!-- /content -->
74
75            <hr class="a11y" />
76
77            <!-- PAGE ACTIONS -->
78            <?php if (!$ERROR): ?>
79                <div id="dokuwiki__pagetools">
80                    <h3 class="a11y"><?php echo $lang['page_tools']; ?></h3>
81                    <div class="tools">
82                        <ul>
83                            <?php
84                                $data = array(
85                                    'view' => 'detail',
86                                    'items' => array(
87                                        'mediaManager' => tpl_action('mediaManager', 1, 'li', 1, '<span>', '</span>'),
88                                        'img_backto' =>   tpl_action('img_backto',   1, 'li', 1, '<span>', '</span>'),
89                                    )
90                                );
91
92                                // the page tools can be amended through a custom plugin hook
93                                $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data);
94                                if($evt->advise_before()) {
95                                    foreach($evt->data['items'] as $k => $html) echo $html;
96                                }
97                                $evt->advise_after();
98                                unset($data);
99                                unset($evt);
100                            ?>
101                        </ul>
102                    </div>
103                </div>
104            <?php endif; ?>
105        </div><!-- /wrapper -->
106
107        <?php include('tpl_footer.php') ?>
108    </div></div><!-- /site -->
109
110    <!--[if ( lte IE 7 | IE 8 ) ]></div><![endif]-->
111</body>
112</html>
113