1<?php
2/**
3 * Ad Hominem Template
4 *
5 * @link     https://ad.hominem.info/
6 * @author   Sascha Leib <sascha@leib.be>
7 * @author   Anika Henke <anika@selfthinker.org>
8 * @author   Clarence Lee <clarencedglee@gmail.com>
9 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
10 */
11
12ini_set('display_errors', 0);
13ini_set('display_startup_errors', 0);
14error_reporting(0);
15
16if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
17
18require_once('my_template.php');
19
20$htmlLang = ' lang="' . $conf['lang'] . ( $lang['direction'] != 'ltr' ? '" dir="'. $lang['direction'] : '') . '"';
21
22?><!DOCTYPE html>
23<html<?php echo $htmlLang ?>>
24<head>
25	<meta charset="UTF-8" />
26	<title><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)) ?> &ndash; <?php echo str_replace(' ', ' ', strip_tags($conf['title'])) ?></title>
27<?php my_metaheaders() ?>
28	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
29<?php my_favicons() ?>
30<?php tpl_includeFile('meta.html') ?>
31</head>
32<body class="mediadetail <?php echo trim(tpl_classes()); ?>">
33	<div id="skip-link">
34		<a href="#main-content"><?php echo $lang['skip_to_content']; ?></a>
35	</div>
36	<div id="header-layout">
37		<header>
38			<div id="siteLogo">
39				<?php my_sitelogo(); ?>
40
41				<h2 class="title"><?php tpl_link( my_homelink(), htmlentities($conf['title']), ''); ?></h2>
42				<p class="claim"><?php echo $conf['tagline']; ?></p>
43			</div>
44			<div id="globalTools">
45				<div id="gUserTools">
46					<h3 class="sronly"><?php echo $lang['user_tools']; ?></h3>
47					<ul>
48<?php my_userinfo(str_repeat(chr(9),6)); ?>
49					</ul>
50				</div>
51			</div>
52			<div id="phSearch">
53<?php include('tpl_searchform.php'); ?>
54			</div>
55			<div id="phTools"><!-- placeholder for additional tools --></div>
56			<div id="phInclude"><?php tpl_includeFile('header.html') ?></div>
57		</header>
58	</div>
59    <div id="main-layout">
60		<div id="sidebar" class="toggle hide">
61			<button class="tg_button" title="<?php echo $lang['sidebar'] ?>"><span><?php echo $lang['sidebar'] ?></span></button>
62			<div class="tg_content">
63				<nav id="sbNavigation">
64<!-- - - - - - - - - SIDEBAR CONTENT - - - - - - - -->
65<?php
66					tpl_flush();
67					tpl_includeFile('sidebarheader.html');
68					tpl_include_page($conf['sidebar'], true, true);
69					tpl_includeFile('sidebarfooter.html');
70?>				</nav>
71<!-- - - - - - - - - END OF SIDEBAR CONTENT  - - - - - - - -->
72				<div id="sbBreadcrumbs">
73<?php		if($conf['breadcrumbs']) { my_breadcrumbs(str_repeat(chr(9),4)); } ?>
74				</div>
75			</div>
76		</div>
77		<main id="dokuwiki__top">
78			<header>
79<?php			my_toc(str_repeat(chr(9),4));
80				tpl_flush();
81				tpl_includeFile('pageheader.html');
82				if($conf['youarehere']) { my_youarehere(str_repeat(chr(9),4)); }
83?>			</header>
84			<article id="main-content">
85<!-- - - - - - - - - MEDIA DETAIL CONTENT - - - - - - - -->
86<?php
87
88					html_msgarea();
89
90					tpl_flush();
91					tpl_includeFile('pageheader.html');
92
93					if($ERROR): ?>
94				<h1><?php echo $ERROR; ?></h1>
95<?php				else:
96						if($REV) echo p_locale_xhtml('showrev');
97?>				<figure class="print-wide">
98					<h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
99
100					<p class="center"><?php tpl_img(1088,800); /* parameters: maximum width, maximum height (and more) */ ?></p>
101					<figcaption>
102
103						<table class="img_detail">
104							<tbody>
105						<?php my_img_meta(str_repeat(chr(9),8)); ?>
106								<tr><th><?php echo $lang['reference']; ?></th>
107									<td><ul><?php
108										$media_usage = ft_mediause($IMG,true);
109										if(count($media_usage) > 0){
110											foreach($media_usage as $path){
111												echo '<li>'.html_wikilink($path).'</li>';
112											}
113										}else{
114											echo '<li>'.$lang['nothingfound'].'</li>';
115										}
116									?></ul>
117								</td></tr>
118								<tr><td></td><td><small><?php echo $lang['media_acl_warning']; ?></small></td></tr>
119							</tbody>
120						</table>
121						<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
122					<?php endif; ?>
123					</figcaption>
124				</figure><?php tpl_flush() ?>
125			</article>
126			<footer>
127<?php tpl_includeFile('pagefooter.html') ?>
128			</footer>
129		</main>
130	</div>
131	<div id="footer-layout">
132		<footer>
133			<div id="ftPlaceholder" class="ftSection"></div>
134			<div id="ftInclude" class="ftSection">
135<?php tpl_includeFile('footer.html'); ?>
136			</div>
137			<div id="ftSiteTools" class="ftSection">
138				<h4><?php echo $lang['site_tools']; ?></h4>
139				<ul>
140					<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
141
142				</ul>
143			</div>
144			<div id="ftPageTools" class="ftSection">
145				<h4><?php echo $lang['page_tools']; ?></h4>
146				<ul>
147					<?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems('', false); ?>
148
149				</ul>
150			</div>
151<?php include('tpl_footer.php') ?>
152		</footer>
153	</div>
154<?php my_cookiebanner("\t"); ?>
155	<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
156	<div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
157</body>
158</html>