xref: /template/sprintdoc/detail.php (revision 5c6ddbf8b29351dbab45fb87cd45106e942d7e06)
1<!DOCTYPE html>
2<?php
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();
13header('X-UA-Compatible: IE=edge,chrome=1');
14
15?>
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 id="dokuwiki__top" class="<?php echo tpl_classes(); ?> wide-content showSidebar">
32<div id="dokuwiki__site">
33    <?php include('tpl/nav-direct.php') ?>
34
35
36    <div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
37        <?php
38        tpl_includeFile('header.html');
39        ?>
40
41        <div id="dokuwiki__header" class="header no-print">
42            <div class="container">
43                <div class="row">
44                    <div class="col-xs-12">
45                        <div class="claim main-sidebar">
46                            <?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))){
47
48                                /* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
49                                include('tpl/main-sidebar-logo.php');
50                            } ?>
51                            <?php if ($conf['tagline']): ?>
52                                <p class="claim"><?php echo $conf['tagline'] ?></p>
53                            <?php endif ?>
54
55                        </div><!-- .headings -->
56                    </div><!-- .col -->
57                </div><!-- .row -->
58            </div><!-- .container -->
59        </div><!-- .header -->
60
61        <div class="sr-only nav-area-head">
62            <h5 class="sr-only" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
63        </div><!-- .nav-area-head -->
64
65        <div class="tools">
66            <div class="container">
67                <div class="row">
68                    <div class="col-xs-12">
69
70                        <div class="sidebarheader main-sidebar">
71                            <?php
72                            tpl_includeFile('sidebarheader.html')
73                            ?>
74                        </div><!-- .sidebarheader -->
75
76                        <div class="search main-sidebar">
77                            <?php
78                            include('tpl/main-sidebar-search.php');
79                            ?>
80                        </div><!-- .search -->
81
82                        <div id="dokuwiki__aside">
83                            <?php
84                            include('tpl/main-sidebar-nav.php');
85                            ?>
86                        </div><!-- .aside -->
87
88                    </div><!-- .col -->
89                </div><!-- .row -->
90            </div><!-- .container -->
91        </div><!-- .tools -->
92
93        <div class="top-header">
94            <div class="container">
95                <div class="row">
96                    <div class="col-xs-12">
97
98                        <?php
99                        $showTools = true;
100                        include('tpl/nav-usertools-buttons.php');
101                        tpl_includeFile('header.html');
102                        ?>
103
104                    </div><!-- .col -->
105                </div><!-- .row -->
106            </div><!-- .container -->
107        </div><!-- /top-header -->
108
109
110        <div id="dokuwiki__detail">
111        <?php html_msgarea() ?>
112
113            <div class="content group">
114                <div class="container">
115                    <div class="row">
116                        <div class="col-xs-12">
117                            <div class="breadcrumbs" data-do="<?php echo $ACT?>">
118
119                                <div class="togglelink page_main-content">
120                                    <a href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
121                                </div>
122
123                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo  tpl_getLang('head_menu_status')  ?></h6>
124
125                                <?php
126
127                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
128                                /* page quality / page tasks */
129                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
130                                include('tpl/nav-page-quality-tasks.php');
131                                ?>
132
133                                <?php
134                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
135                                /* breadcrumb */
136                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
137                                include('tpl/nav-breadcrumb.php');
138                                ?>
139
140                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo  $lang['page_tools']  ?></h6>
141
142                                <nav id="dokuwiki__pagetools">
143                                    <div class="tools">
144                                        <ul>
145                                            <?php
146                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('mediaManager') . '</li>';
147                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('img_backto') . '</li>';
148                                            ?>
149                                        </ul>
150                                    </div>
151                                </nav>
152
153                            </div>
154                            <div id="dokuwiki__content" class="page main-content">
155
156                                <div id="spr__meta-box"></div>
157
158        <?php if($ERROR): print $ERROR; ?>
159        <?php else: ?>
160
161            <?php if($REV) echo p_locale_xhtml('showrev');?>
162            <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1>
163
164
165                <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
166
167                <div class="img_detail">
168                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
169
170                    <?php if(function_exists('tpl_img_meta')): ?>
171                        <?php
172                        tpl_img_meta();
173
174                        /** @var helper_plugin_spatialhelper_index $spatial */
175                        $spatial = plugin_load('helper', 'spatialhelper_index');
176                        if ($spatial && plugin_load('helper', 'geophp')) {
177                            global $IMG;
178                            $point = $spatial->getCoordsFromExif($IMG);
179                            if ($point) {
180                                $long = $point->getX();
181                                $lat = $point->getY();
182                                $latShort = round($lat,3);
183                                $longShort = round($long,3);
184
185                                $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
186                                $srcOSM = 'https://www.openstreetmap.org/export/embed.html?bbox='.($long-0.004).','.($lat-0.002).','.($long+0.004).','.($lat+0.002).'&layer=mapnik&marker='.$lat.','.$long;
187                                echo '<dl>';
188                                echo '<dt title="Open Street Maps">OSM:</dt><dd>';
189                                echo '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$srcOSM.'" style="border: 1px solid black"></iframe><br/><small><a href="'.$hrefOSM.'">View Larger Map</a></small>';
190                                echo '</dd>';
191                                echo '</dl>';
192                            }
193                        }
194                        ?>
195                    <?php else: /* deprecated since Release 2014-05-05 */ ?>
196                        <dl>
197                            <?php
198                                $config_files = getConfigFiles('mediameta');
199                                foreach ($config_files as $config_file) {
200                                    if(@file_exists($config_file)) {
201                                        include($config_file);
202                                    }
203                                }
204
205                                foreach($fields as $key => $tag){
206                                    $t = array();
207                                    if (!empty($tag[0])) {
208                                        $t = array($tag[0]);
209                                    }
210                                    if(is_array($tag[3])) {
211                                        $t = array_merge($t,$tag[3]);
212                                    }
213                                    $value = tpl_img_getTag($t);
214                                    if ($value) {
215                                        echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
216                                        if ($tag[2] == 'date') {
217                                            echo dformat($value);
218                                        } else {
219                                            echo hsc($value);
220                                        }
221                                        echo '</dd>';
222                                    }
223                                }
224                            ?>
225                        </dl>
226                    <?php endif; ?>
227                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
228                </div>
229                            </div><!-- .main-content -->
230                        </div><!-- .col -->
231                    </div><!-- .row -->
232                </div><!-- .container -->
233            </div><!-- /.content -->
234
235
236        <?php endif; ?>
237    </div>
238    </div><!-- /wrapper -->
239
240
241
242    <!-- ********** FOOTER ********** -->
243
244    <div id="dokuwiki__footer">
245        <div class="container">
246            <div class="row">
247                <div class="col-xs-12">
248
249                    <div class="main-footer">
250                        <p>
251                            <?php
252
253
254                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
255                            /* copyright */
256                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
257                            tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
258                            ?>
259                        </p>
260                    </div>
261
262                </div>
263            </div>
264        </div>
265    </div><!-- /footer -->
266
267
268    <?php tpl_includeFile('footer.html') ?>
269</div><!-- .dokuwiki__site -->
270
271<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
272
273</body>
274</html>
275