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