xref: /template/ad-hominem/detail.php (revision dcc0f219d5246aee0edbf32b613d814e8d7f3420)
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" />
29<?php tpl_includeFile('meta.html') ?>
30</head>
31<body class="mediadetail <?php echo trim(tpl_classes()); ?>">
32	<div id="skip-link">
33		<a href="#main-content"><?php echo $lang['skip_to_content']; ?></a>
34	</div>
35	<div id="header-layout">
36		<header>
37			<div id="siteLogo">
38				<?php
39					// get logo either out of the template images folder or data/media folder
40					$logoSize = array();
41					$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/sitelogo.svg'), false, $logoSize);
42					tpl_link( wl(),
43						'<img src="'.$logo.'" ' . $logoSize[3] . ' alt="' . htmlentities($conf['title']) . '" />', 'accesskey="h" title="[H]" class="logo"');
44				?>
45
46				<h2 class="title"><?php tpl_link( wl(), htmlentities($conf['title']), ''); ?></h2>
47				<p class="claim"><?php echo $conf['tagline']; ?></p>
48			</div>
49			<div id="globalTools">
50				<div id="gUserTools">
51					<h3 class="sronly"><?php echo $lang['user_tools']; ?></h3>
52					<ul>
53<?php my_userinfo(str_repeat(chr(9),6)); ?>
54					</ul>
55				</div>
56			</div>
57			<div id="phSearch">
58<?php include('tpl_searchform.php'); ?>
59			</div>
60			<div id="phTools"><!-- placeholder for additional tools --></div>
61			<div id="phInclude"><?php tpl_includeFile('header.html') ?></div>
62		</header>
63	</div>
64    <div id="main-layout">
65		<div id="sidebar" class="toggle hide">
66			<button class="tg_button" title="<?php echo $lang['sidebar'] ?>"><span><?php echo $lang['sidebar'] ?></span></button>
67			<div class="tg_content">
68				<nav id="sbNavigation">
69<!-- - - - - - - - - SIDEBAR CONTENT - - - - - - - -->
70<?php
71					tpl_flush();
72					tpl_includeFile('sidebarheader.html');
73					tpl_include_page($conf['sidebar'], true, true);
74					tpl_includeFile('sidebarfooter.html');
75?>				</nav>
76<!-- - - - - - - - - END OF SIDEBAR CONTENT  - - - - - - - -->
77				<div id="sbBreadcrumbs">
78<?php		if($conf['breadcrumbs']) { my_breadcrumbs(str_repeat(chr(9),4)); } ?>
79				</div>
80			</div>
81		</div>
82		<main id="dokuwiki__top">
83			<header>
84<?php			my_toc(str_repeat(chr(9),4));
85				tpl_flush();
86				tpl_includeFile('pageheader.html');
87				if($conf['youarehere']) { my_youarehere(str_repeat(chr(9),4)); }
88?>			</header>
89			<article id="main-content">
90<!-- - - - - - - - - MEDIA DETAIL CONTENT - - - - - - - -->
91<?php
92
93					html_msgarea();
94
95					tpl_flush();
96					tpl_includeFile('pageheader.html');
97
98					if($ERROR): ?>
99				<h1><?php echo $ERROR; ?></h1>
100<?php				else:
101						if($REV) echo p_locale_xhtml('showrev');
102?>				<figure class="print-wide">
103					<h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
104
105					<p class="center"><?php tpl_img(1088,800); /* parameters: maximum width, maximum height (and more) */ ?></p>
106					<figcaption>
107
108						<table class="img_detail">
109							<tbody>
110						<?php my_img_meta(str_repeat(chr(9),8)); ?>
111								<tr><th><?php echo $lang['reference']; ?></th>
112									<td><ul><?php
113										$media_usage = ft_mediause($IMG,true);
114										if(count($media_usage) > 0){
115											foreach($media_usage as $path){
116												echo '<li>'.html_wikilink($path).'</li>';
117											}
118										}else{
119											echo '<li>'.$lang['nothingfound'].'</li>';
120										}
121									?></ul>
122								</td></tr>
123								<tr><td></td><td><small><?php echo $lang['media_acl_warning']; ?></small></td></tr>
124							</tbody>
125						</table>
126						<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
127					<?php endif; ?>
128					</figcaption>
129				</figure><?php tpl_flush() ?>
130			</article>
131			<footer>
132<?php tpl_includeFile('pagefooter.html') ?>
133			</footer>
134		</main>
135	</div>
136	<div id="footer-layout">
137		<footer>
138			<div id="ftPlaceholder" class="ftSection"></div>
139			<div id="ftInclude" class="ftSection">
140<?php tpl_includeFile('footer.html'); ?>
141			</div>
142			<div id="ftSiteTools" class="ftSection">
143				<h4><?php echo $lang['site_tools']; ?></h4>
144				<ul>
145					<?php echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false); ?>
146
147				</ul>
148			</div>
149			<div id="ftPageTools" class="ftSection">
150				<h4><?php echo $lang['page_tools']; ?></h4>
151				<ul>
152					<?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems('', false); ?>
153
154				</ul>
155			</div>
156<?php include('tpl_footer.php') ?>
157		</footer>
158	</div>
159	<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>
160	<div id="screen__mode" class="no"></div><?php /* helper to detect CSS media query in script.js */ ?>
161</body>
162</html>