forked from giterlizzi/dokuwiki-template-bootstrap3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
detail.php
executable file
·187 lines (149 loc) · 7.32 KB
/
detail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php
/**
* DokuWiki Bootstrap3 Template: Image Detail Page
*
* @link http://dokuwiki.org/template:bootstrap3
* @author Andreas Gohr <[email protected]>
* @author Anika Henke <[email protected]>
* @author Giuseppe Di Terlizzi <[email protected]>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
@require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
header('X-UA-Compatible: IE=edge,chrome=1');
include_once(dirname(__FILE__).'/tpl_global.php'); // Include template global variables
?><!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
<head>
<meta charset="UTF-8" />
<title><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?> [<?php echo strip_tags($conf['title'])?>]</title>
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
<?php tpl_includeFile('meta.html') ?>
<?php tpl_metaheaders()?>
<?php bootstrap3_google_analytics() ?>
<!--[if lt IE 9]>
<script type="text/javascript" src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script type="text/javascript" src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="<?php echo trim(implode(' ', $body_classes)) ?>">
<!--[if IE 8 ]><div id="IE8"><![endif]-->
<header id="dokuwiki__header" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid' : '' ?>">
<?php tpl_includeFile('topheader.html') ?>
<?php require_once('tpl_navbar.php'); ?>
<?php tpl_includeFile('header.html') ?>
</header>
<div id="dokuwiki__detail" class="dokuwiki container<?php echo (bootstrap3_is_fluid_container()) ? '-fluid' : '' ?>">
<?php tpl_includeFile('social.html') ?>
<?php require_once('tpl_breadcrumbs.php'); ?>
<p class="pageId text-right">
<?php if(bootstrap3_conf('showPageId')): ?><span class="label label-primary"><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span><?php endif; ?>
</p>
<div id="dw__msgarea">
<?php bootstrap3_html_msgarea() ?>
</div>
<main role="main">
<div class="<?php echo ($page_on_panel ? 'panel panel-default' : 'no-panel') ?>">
<div class="page <?php echo ($page_on_panel ? 'panel-body' : '') ?>">
<?php require_once('tpl_page_icons.php'); ?>
<?php if ($ERROR): print $ERROR; ?>
<?php else: ?>
<?php if($REV) echo p_locale_xhtml('showrev');?>
<h1 class="page-header">
<i class="fa fa-picture-o text-muted"></i> <?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?>
</h1>
<p class="pull-right hidden-print list-inline">
<button type="button" class="btn btn-primary btn-xs" title="Info" data-toggle="modal" data-target="#detail-dialog"><i class="fa fa-fw fa-info-circle"></i></button>
<a href="<?php echo ml($IMG, array('cache'=> $INPUT->str('cache'),'rev'=>$REV), true, '&'); ?>" target="_blank" class="btn btn-default btn-xs" title="<?php echo $lang['js']['mediadirect']; ?>"><i class="fa fa-fw fa-arrows-alt"></i></a>
</p>
<?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?>
<hr class="hidden-print" />
<div class="hidden-print pull-right">
<?php
$back_to = bootstrap3_action_item('img_backto', 'fa fa-fw fa-arrow-left', true);
$media_mgr = bootstrap3_action_item('mediaManager', 'fa fa-fw fa-picture-o', true);
$back_to = str_replace('action', 'action btn btn-success', $back_to);
$media_mgr = str_replace('action', 'action btn btn-default', $media_mgr);
echo $back_to . "\n" . $media_mgr;
?>
</div>
<div class="modal fade" tabindex="-1" id="detail-dialog" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="<?php echo $lang['js']['mediaclose']; ?>"><span aria-hidden="true">×</span></button>
<h4 class="modal-title"><i class="fa fa-fw fa-info-circle text-primary"></i> <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></h4>
</div>
<div class="modal-body">
<?php
tpl_img_meta();
//Comment in for Debug
//dbg(tpl_img_getTag('Simple.Raw'));
?>
<hr/>
<dl class="dl-horizontal">
<?php
echo '<dt>'.$lang['reference'].':</dt>';
$media_usage = ft_mediause($IMG, true);
if (count($media_usage) > 0){
foreach($media_usage as $path){
echo '<dd>'.html_wikilink($path).'</dd>';
}
} else {
echo '<dd>'.$lang['nothingfound'].'</dd>';
}
?>
</dl>
<?php if (isset($lang['media_acl_warning'])): // This message is available from release 2015-08-10 "Detritus" ?>
<div class="alert alert-warning">
<i class="fa fa-warning"></i> <?php echo $lang['media_acl_warning']; ?>
</div>
<?php endif; ?>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo $lang['js']['mediaclose']; ?></button>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>
</main>
<div class="small text-right">
<?php if (bootstrap3_conf('showLoginOnFooter')): ?>
<span class="loginLink hidden-print">
<?php echo tpl_action('login', 1, 0, 1, '<i class="fa fa-sign-in"></i> '); ?>
</span>
<?php endif; ?>
</div>
<?php if ($conf['license']): ?>
<div id="dw__license" class="text-center small" <?php ((bootstrap3_conf('semantic')) ? 'itemprop="license"' : '') ?>>
<?php echo tpl_license('') ?>
</div>
<?php endif; ?>
<?php
// DokuWiki badges
require_once('tpl_badges.php');
// Footer hook
tpl_includeFile('footer.html');
// Footer DokuWiki page
require_once('tpl_footer.php');
// Cookie-Law banner
require_once('tpl_cookielaw.php');
?>
<a href="#dokuwiki__top" class="back-to-top hidden-print btn btn-default btn-sm" title="<?php echo $lang['skip_to_content'] ?>" accesskey="t"><i class="fa fa-chevron-up"></i></a>
<div id="screen__mode"><?php /* helper to detect CSS media query in script.js */ ?>
<span class="visible-xs"></span>
<span class="visible-sm"></span>
<span class="visible-md"></span>
<span class="visible-lg"></span>
</div>
</div>
<!--[if IE 8 ]></div><![endif]-->
</body>
</html>