xref: /template/sprintdoc/detail.php (revision f2a0ea7b7df1ef33f18e553628b9b3af76a3d9f0)
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="#">&lt; &gt;<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                                <?php
143
144
145                                /**
146                                 * FIXME implement proper pagetools as in https://www.dokuwiki.org/_detail/wiki:dokuwiki-128.png
147                                 * after the new svg-page-tool mechanism has been merged into master
148                                 *
149                                 * see https://cosmocode.jira.com/browse/SPR-837
150                                 */
151                                include('tpl/nav-page-tools.php');
152                                ?>
153
154                            </div>
155                            <div id="dokuwiki__content" class="page main-content">
156
157                                <div id="spr__meta-box"></div>
158
159        <?php if($ERROR): print $ERROR; ?>
160        <?php else: ?>
161
162            <?php if($REV) echo p_locale_xhtml('showrev');?>
163            <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1>
164
165
166                <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
167
168                <div class="img_detail">
169                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
170
171                    <?php if(function_exists('tpl_img_meta')): ?>
172                        <?php
173                        tpl_img_meta();
174
175                        /** @var helper_plugin_spatialhelper_index $spatial */
176                        $spatial = plugin_load('helper', 'spatialhelper_index');
177                        if ($spatial && plugin_load('helper', 'geophp')) {
178                            global $IMG;
179                            $point = $spatial->getCoordsFromExif($IMG);
180                            if ($point) {
181                                $long = $point->getX();
182                                $lat = $point->getY();
183                                $latShort = round($lat,3);
184                                $longShort = round($long,3);
185
186                                $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
187                                $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;
188                                echo '<dl>';
189                                echo '<dt title="Open Street Maps">OSM:</dt><dd>';
190                                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>';
191                                echo '</dd>';
192                                echo '</dl>';
193                            }
194                        }
195                        ?>
196                    <?php else: /* deprecated since Release 2014-05-05 */ ?>
197                        <dl>
198                            <?php
199                                $config_files = getConfigFiles('mediameta');
200                                foreach ($config_files as $config_file) {
201                                    if(@file_exists($config_file)) {
202                                        include($config_file);
203                                    }
204                                }
205
206                                foreach($fields as $key => $tag){
207                                    $t = array();
208                                    if (!empty($tag[0])) {
209                                        $t = array($tag[0]);
210                                    }
211                                    if(is_array($tag[3])) {
212                                        $t = array_merge($t,$tag[3]);
213                                    }
214                                    $value = tpl_img_getTag($t);
215                                    if ($value) {
216                                        echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
217                                        if ($tag[2] == 'date') {
218                                            echo dformat($value);
219                                        } else {
220                                            echo hsc($value);
221                                        }
222                                        echo '</dd>';
223                                    }
224                                }
225                            ?>
226                        </dl>
227                    <?php endif; ?>
228                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
229                </div>
230            <p class="back">
231                <?php tpl_action('mediaManager', 1) ?><br />
232                &larr; <?php tpl_action('img_backto', 1) ?>
233            </p>
234
235                            </div><!-- .main-content -->
236                        </div><!-- .col -->
237                    </div><!-- .row -->
238                </div><!-- .container -->
239            </div><!-- /.content -->
240
241
242        <?php endif; ?>
243    </div>
244    </div><!-- /wrapper -->
245
246
247
248    <!-- ********** FOOTER ********** -->
249
250    <div id="dokuwiki__footer">
251        <div class="container">
252            <div class="row">
253                <div class="col-xs-12">
254
255                    <div class="main-footer">
256                        <p>
257                            <?php
258
259
260                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
261                            /* copyright */
262                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
263                            tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
264                            ?>
265                        </p>
266                    </div>
267
268                </div>
269            </div>
270        </div>
271    </div><!-- /footer -->
272
273
274    <?php tpl_includeFile('footer.html') ?>
275</div><!-- .dokuwiki__site -->
276
277<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
278
279</body>
280</html>
281