1<?php
2/**
3 * DokuWiki Starter Template
4 *
5 * @link     http://dokuwiki.org/template:starter
6 * @author   Anika Henke <anika@selfthinker.org>
7 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
8 */
9
10if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
11@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
12
13?><!DOCTYPE html>
14<html xml:lang="<?php echo $conf['lang'] ?>" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
15<head>
16    <meta charset="UTF-8" />
17    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
18    <title>
19        <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
20        [<?php echo strip_tags($conf['title'])?>]
21    </title>
22    <?php @require_once(dirname(__FILE__).'/head-css.php'); ?>
23</head>
24<body>
25    <div id="dokuwiki__detail" class="dokuwiki container">
26        <div class="row"><?php html_msgarea() ?></div>
27
28        <?php if($ERROR){ print '<div class="row">'.$ERROR.'</div>'; }else{ ?>
29        <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?></h1>
30            <div class="content row">
31                <div class="col-sm-9">
32                    <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
33                </div>
34
35                <div class="img_detail col-sm-3"><div class="panel panel-default">
36                    <div class="panel-heading">
37                        <h3 class="panel-title"><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h3>
38                    </div>
39
40                    <div class="details panel-body">
41                        <p><?php
42                            $config_files = getConfigFiles('mediameta');
43                            foreach ($config_files as $config_file) {
44                                if(@file_exists($config_file)) {
45                                    include($config_file);
46                                }
47                            }
48
49                            foreach($fields as $key => $tag){
50                                $t = array();
51                                if (!empty($tag[0])) {
52                                    $t = array($tag[0]);
53                                }
54                                if(is_array($tag[3])) {
55                                    $t = array_merge($t,$tag[3]);
56                                }
57                                $value = tpl_img_getTag($t);
58                                if ($value) {
59                                    echo '<span class="item-label "'.$lang[$tag[1]].'">'.$lang[$tag[1]].':</span> <b>';
60                                    if ($tag[2] == 'date') {
61                                        echo dformat($value);
62                                    } else if ($tag[1] == 'img_width' || $tag[1] == 'img_height') {
63                                        echo hsc($value);
64                                        echo 'px';
65                                    } else {
66                                        echo hsc($value);
67                                    }
68                                    echo '</b><br />';
69                                }
70                            }
71                        ?></p>
72                    </div>
73                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
74                </div></div>
75            </div><!-- /.content -->
76            <div class="btn-group">
77                <a class="btn btn-default" href="<?php print DOKU_REL . 'doku.php/' . $ID; ?>" class="btn">&larr; <?php print $lang['img_backto'] . ' ' . $ID?></a>
78                <?php
79                    $imgNS = getNS($IMG);
80                    $authNS = auth_quickaclcheck("$imgNS:*");
81                    if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
82                        $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
83                        echo '<a class="btn btn-default" href="'.$mmURL.'">'.$lang['img_manager'].'</a>';
84                    }
85                ?>
86            </div>
87        <?php } ?>
88    </div>
89
90    <?php @require_once(dirname(__FILE__).'/tail-js.php'); ?>
91</body>
92</html>
93
94