xref: /template/sprintdoc/detail.php (revision 6db1065031a4537e99d5b01284cf973804a6c379)
1<!DOCTYPE html>
2<?php
3/**
4 * DokuWiki sprintDoc Detail Template
5 *
6 * @link     FIXME
7 * @author   Jana Deutschlaender <deutschlaender@cosmocode.de>
8 * @author   Michael Grosse <grosse@cosmocode.de>
9 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
10 */
11use dokuwiki\template\sprintdoc\Template;
12
13if (!defined('DOKU_INC')) die();                        /* must be run from within DokuWiki */
14header('X-UA-Compatible: IE=edge,chrome=1');
15
16global $JSINFO;
17if (empty($JSINFO['template'])) {
18    $JSINFO['template'] = array();
19}
20$JSINFO['template']['sprintdoc'] = array('sidebar_toggle_elements' => tpl_getConf('sidebar_sections'));
21
22$showTools = true;
23$showSidebar =  true;
24
25?>
26<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
27<head>
28<?php
29
30
31/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
32/* meta and link relations */
33/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
34?>
35<meta charset="utf-8" />
36<meta name="viewport" content="width=device-width, initial-scale=1.0" />
37<?php tpl_metaheaders() ?>
38<?php
39
40
41/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
42/* page title */
43/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
44?>
45<title><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?> [<?php echo strip_tags($conf['title']) ?>]</title>
46
47<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
48<?php
49
50
51/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
52/* favicons */
53/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
54?>
55<?php
56include('tpl/favicon_tiles.php');
57?>
58<?php
59
60
61/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
62/* Include Hook: meta.html */
63/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
64?>
65<?php tpl_includeFile('meta.html') ?>
66</head>
67
68<body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> wide-content showSidebar">
69<div id="dokuwiki__site">
70    <?php
71
72
73/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
74/* template Include: tpl/nav-direct */
75/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
76    ?>
77    <?php include('tpl/nav-direct.php') ?>
78
79
80    <div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
81        <?php
82
83
84/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
85/* Include Hook: header.html */
86/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
87            tpl_includeFile('header.html');
88        ?>
89
90        <div id="dokuwiki__header" class="header no-print">
91            <div class="container">
92                <div class="row">
93                    <div class="col-xs-12">
94                        <div class="claim main-sidebar">
95                            <?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))) {
96
97
98/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
99/* Logo */
100/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
101/* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
102                                include('tpl/main-sidebar-logo.php');
103                            } ?>
104                            <div class="main-title">
105                                <?php if ($conf['title']):
106
107
108/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
109/* Wiki Title Mobile */
110/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
111                                    <p class="title mobile-only"><?php echo $conf['title'] ?></p>
112                                <?php endif ?>
113                            </div><!-- .main-title -->
114
115                        </div><!-- .headings -->
116                    </div><!-- .col -->
117                    <div class="col-xs-12">
118                        <div class="main-title desktop-only">
119                            <?php if ($conf['title']):
120
121
122/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
123/* Wiki Title Desktop */
124/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
125                                <p class="title"><?php echo $conf['title'] ?></p>
126                            <?php endif ?>
127                            <?php if ($conf['tagline']):
128
129
130/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
131/* Wiki Tagline Desktop */
132/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */ ?>
133                                <p class="claim"><?php echo $conf['tagline'] ?></p>
134                            <?php endif ?>
135                        </div><!-- .main-title -->
136                    </div><!-- .col -->
137
138                </div><!-- .row -->
139            </div><!-- .container -->
140        </div><!-- .header -->
141        <?php
142
143
144/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
145/* headline menu area (Accessibility ) */
146/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
147        ?>
148        <div class="sr-only nav-area-head">
149            <h5 class="sr-only" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
150        </div><!-- .nav-area-head -->
151
152        <div class="tools">
153            <div class="container">
154                <div class="row">
155                    <div class="col-xs-12">
156
157
158                        <div class="search main-sidebar">
159                            <?php
160
161
162/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
163/* search form */
164/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
165                            include('tpl/main-sidebar-search.php');
166                            ?>
167                        </div><!-- .search -->
168
169                        <div class="sidebarheader main-sidebar">
170                            <?php
171
172
173/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
174/* Include Hook: sidebarheader.html */
175/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
176                            tpl_includeFile('sidebarheader.html')
177                            ?>
178                        </div><!-- .sidebarheader -->
179
180
181                        <div id="dokuwiki__aside">
182                            <?php
183
184
185/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
186/* sidebar */
187/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
188                            include('tpl/main-sidebar-nav.php');
189                            ?>
190                        </div><!-- .aside -->
191
192                    </div><!-- .col -->
193                </div><!-- .row -->
194            </div><!-- .container -->
195        </div><!-- .tools -->
196
197        <div class="top-header">
198            <div class="container">
199                <div class="row">
200                    <div class="col-xs-12">
201
202                        <?php
203
204
205/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
206/* User Tools but no MagicMatcher Bar */
207/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
208                        $showTools = true;
209                        include('tpl/nav-usertools-buttons.php');
210
211
212/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
213/* Include Hook: header.html */
214/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
215                        tpl_includeFile('header.html');
216                        ?>
217
218                    </div><!-- .col -->
219                </div><!-- .row -->
220            </div><!-- .container -->
221        </div><!-- /top-header -->
222
223
224        <div id="dokuwiki__detail">
225
226            <?php tpl_flush(); /* flush the output buffer */ ?>
227
228            <div class="content group">
229                <div class="container">
230                    <div class="row">
231                        <div class="col-xs-12">
232                            <div class="breadcrumbs" data-do="<?php echo $ACT ?>">
233
234                                <div class="togglelink page_main-content">
235                                    <a href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle') ?></span></a>
236                                </div>
237
238                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
239
240                                <?php
241
242
243/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
244/* breadcrumb */
245/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
246                                include('tpl/nav-breadcrumb.php');
247                                ?>
248
249                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['page_tools'] ?></h6>
250
251                                <?php
252
253
254/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
255/* page tools */
256/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
257                                ?>
258                                <nav id="dokuwiki__pagetools">
259                                    <div class="tools">
260                                        <ul>
261                                            <?php
262                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('mediaManager') . '</li>';
263                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('img_backto') . '</li>';
264                                            ?>
265                                        </ul>
266                                    </div>
267                                </nav>
268
269                            </div>
270                            <div id="dokuwiki__content" class="page main-content">
271
272                                <div id="spr__meta-box"></div>
273                                <div class="msg-area"><?php html_msgarea();/*msg('Information.', 0);msg('Success', 1);msg('Notification', 2);msg('Fehler', -1);*/ ?></div>
274
275
276                                <?php if ($ERROR): print $ERROR; ?>
277                                <?php else: ?>
278
279                                <?php if ($REV) {
280                                    echo p_locale_xhtml('showrev');
281                                } ?>
282
283                                <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?></h1>
284                                <?php
285
286
287/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
288/* image */
289/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
290                                ?>
291                                <div class="img-link">
292                                    <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
293                                </div>
294                                <?php
295
296
297/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
298/* meta data of image */
299/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
300                                ?>
301                                <div class="img_detail">
302                                    <?php
303                                        $simple_title = hsc(tpl_img_getTag('simple.title'));
304                                        if(strlen($simple_title) > 0) {
305                                    ?>
306                                    <h4><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h4>
307                                    <?php
308                                        } else {
309                                            echo '<h4>' . tpl_getLang('meta_data') . '</h4>';
310                                        }
311                                    ?>
312
313                                    <?php
314                                    tpl_img_meta();
315
316
317/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
318/* open street maps if geo data is available */
319/** @var helper_plugin_spatialhelper_index $spatial */
320/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
321                                    $spatial = plugin_load('helper', 'spatialhelper_index');
322                                    if ($spatial && plugin_load('helper', 'geophp')) {
323                                        global $IMG;
324                                        $point = $spatial->getCoordsFromExif($IMG);
325                                        if ($point) {
326                                            $long = $point->getX();
327                                            $lat = $point->getY();
328                                            $latShort = round($lat, 3);
329                                            $longShort = round($long, 3);
330
331                                            $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
332                                            $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;
333                                            echo '<div class="os-map">';
334                                            echo '<h4 lang="en">OSM (Open Street Maps):</h4>';
335                                            echo '<iframe width="100%" height="350" frameborder="0" src="' . $srcOSM . '"></iframe><br/><p><a class="button" target="_blank" title="' . tpl_getLang('osm_zoom_link_title') . '" href="' . $hrefOSM . '">' . tpl_getLang('osm_zoom_link_text') . '</a></p>';
336                                            echo '</div>';
337                                        }
338                                    }
339                                    ?>
340                                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
341                                </div>
342                            </div><!-- .main-content -->
343                        </div><!-- .col -->
344                    </div><!-- .row -->
345                </div><!-- .container -->
346            </div><!-- /.content -->
347
348
349        <?php endif; ?>
350        </div>
351    </div><!-- /wrapper -->
352
353
354    <!-- ********** FOOTER ********** -->
355
356    <div id="dokuwiki__footer">
357        <div class="container">
358            <div class="row">
359                <div class="col-xs-12">
360
361                    <div class="main-footer">
362                        <p>
363                            <?php
364
365
366/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
367/* copyright */
368/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
369                            tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
370                            ?>
371                        </p>
372                    </div>
373
374                </div>
375            </div>
376        </div>
377    </div><!-- /footer -->
378
379
380    <?php tpl_includeFile('footer.html') ?>
381</div><!-- .dokuwiki__site -->
382
383<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
384
385</body>
386</html>
387