xref: /template/sprintdoc/detail.php (revision fa31b96cc4fcf7b1ac51920ced1fb7822903d1f3)
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)) {
18    $JSINFO = array();
19}
20
21?>
22<html class="edge no-js" lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>">
23<head>
24<?php
25/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
26/* meta and link relations */
27/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
28?>
29<meta charset="utf-8" />
30<meta name="viewport" content="width=device-width, initial-scale=1.0" />
31<?php tpl_metaheaders() ?>
32<?php
33
34
35/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
36/* page title */
37/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
38?>
39<title><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?> [<?php echo strip_tags($conf['title']) ?>]</title>
40
41<script type="text/javascript">(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
42<?php
43
44
45/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
46/* favicons */
47/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
48?>
49<?php
50include('tpl/favicon_tiles.php');
51?>
52<?php
53
54
55/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
56/* Include Hook: meta.html */
57/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
58?>
59<?php tpl_includeFile('meta.html') ?>
60</head>
61
62<body id="dokuwiki__top" class="<?php echo tpl_classes(); ?> wide-content showSidebar">
63<div id="dokuwiki__site">
64    <?php include('tpl/nav-direct.php') ?>
65
66
67    <div class="page-wrapper <?php echo ($showSidebar) ? 'hasSidebar' : ''; ?>">
68        <?php
69        tpl_includeFile('header.html');
70        ?>
71
72        <div id="dokuwiki__header" class="header no-print">
73            <div class="container">
74                <div class="row">
75                    <div class="col-xs-12">
76                        <div class="claim main-sidebar">
77                            <?php if (tpl_getConf('logo') && file_exists(mediaFN(tpl_getConf('logo')))) {
78
79                                /* upload your logo into the data/media folder (root of the media manager) and replace 'logo.png' in der template config accordingly: */
80                                include('tpl/main-sidebar-logo.php');
81                            } ?>
82                            <?php if ($conf['tagline']): ?>
83                                <p class="claim"><?php echo $conf['tagline'] ?></p>
84                            <?php endif ?>
85
86                        </div><!-- .headings -->
87                    </div><!-- .col -->
88                </div><!-- .row -->
89            </div><!-- .container -->
90        </div><!-- .header -->
91
92        <div class="sr-only nav-area-head">
93            <h5 class="sr-only" aria-level="1"><?php echo tpl_getLang('nav-area-head') ?></h5>
94        </div><!-- .nav-area-head -->
95
96        <div class="tools">
97            <div class="container">
98                <div class="row">
99                    <div class="col-xs-12">
100
101                        <div class="sidebarheader main-sidebar">
102                            <?php
103                            tpl_includeFile('sidebarheader.html')
104                            ?>
105                        </div><!-- .sidebarheader -->
106
107                        <div class="search main-sidebar">
108                            <?php
109                            include('tpl/main-sidebar-search.php');
110                            ?>
111                        </div><!-- .search -->
112
113                        <div id="dokuwiki__aside">
114                            <?php
115                            include('tpl/main-sidebar-nav.php');
116                            ?>
117                        </div><!-- .aside -->
118
119                    </div><!-- .col -->
120                </div><!-- .row -->
121            </div><!-- .container -->
122        </div><!-- .tools -->
123
124        <div class="top-header">
125            <div class="container">
126                <div class="row">
127                    <div class="col-xs-12">
128
129                        <?php
130                        $showTools = true;
131                        include('tpl/nav-usertools-buttons.php');
132                        tpl_includeFile('header.html');
133                        ?>
134
135                    </div><!-- .col -->
136                </div><!-- .row -->
137            </div><!-- .container -->
138        </div><!-- /top-header -->
139
140
141        <div id="dokuwiki__detail">
142            <?php html_msgarea() ?>
143
144            <div class="content group">
145                <div class="container">
146                    <div class="row">
147                        <div class="col-xs-12">
148                            <div class="breadcrumbs" data-do="<?php echo $ACT ?>">
149
150                                <div class="togglelink page_main-content">
151                                    <a href="#"><span
152                                            class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle') ?></span></a>
153                                </div>
154
155                                <h6 class="sr-only" role="heading"
156                                    aria-level="2"><?php echo tpl_getLang('head_menu_status') ?></h6>
157
158                                <?php
159
160                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
161                                /* page quality / page tasks */
162                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
163                                include('tpl/nav-page-quality-tasks.php');
164                                ?>
165
166                                <?php
167                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
168                                /* breadcrumb */
169                                /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
170                                include('tpl/nav-breadcrumb.php');
171                                ?>
172
173                                <h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['page_tools'] ?></h6>
174
175                                <nav id="dokuwiki__pagetools">
176                                    <div class="tools">
177                                        <ul>
178                                            <?php
179                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('mediaManager') . '</li>';
180                                            echo '<li>' . dokuwiki\template\sprintdoc\tpl::pageToolAction('img_backto') . '</li>';
181                                            ?>
182                                        </ul>
183                                    </div>
184                                </nav>
185
186                            </div>
187                            <div id="dokuwiki__content" class="page main-content">
188
189                                <div id="spr__meta-box"></div>
190
191                                <?php if ($ERROR): print $ERROR; ?>
192                                <?php else: ?>
193
194                                <?php if ($REV) {
195                                    echo p_locale_xhtml('showrev');
196                                } ?>
197                                <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?></h1>
198                                <div class="img-link">
199                                    <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
200                                </div>
201
202                                <div class="img_detail"><?php
203                                    $simple_title = hsc(tpl_img_getTag('simple.title'));
204                                    if(strlen($simple_title) > 0) { ?>
205                                    <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2><?php
206                                    }
207                                    ?>
208
209                                    <?php
210                                    tpl_img_meta();
211
212                                    /** @var helper_plugin_spatialhelper_index $spatial */
213                                    $spatial = plugin_load('helper', 'spatialhelper_index');
214                                    if ($spatial && plugin_load('helper', 'geophp')) {
215                                        global $IMG;
216                                        $point = $spatial->getCoordsFromExif($IMG);
217                                        if ($point) {
218                                            $long = $point->getX();
219                                            $lat = $point->getY();
220                                            $latShort = round($lat, 3);
221                                            $longShort = round($long, 3);
222
223                                            $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long";
224                                            $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;
225                                            echo '<dl>';
226                                            echo '<dt title="Open Street Maps">OSM:</dt><dd>';
227                                            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>';
228                                            echo '</dd>';
229                                            echo '</dl>';
230                                        }
231                                    }
232                                    ?>
233                                    <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
234                                </div>
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    <!-- ********** FOOTER ********** -->
248
249    <div id="dokuwiki__footer">
250        <div class="container">
251            <div class="row">
252                <div class="col-xs-12">
253
254                    <div class="main-footer">
255                        <p>
256                            <?php
257
258
259                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
260                            /* copyright */
261                            /* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */
262                            tpl_license($img = false, $imgonly = false, $return = false, $wrap = false);
263                            ?>
264                        </p>
265                    </div>
266
267                </div>
268            </div>
269        </div>
270    </div><!-- /footer -->
271
272
273    <?php tpl_includeFile('footer.html') ?>
274</div><!-- .dokuwiki__site -->
275
276<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
277
278</body>
279</html>
280