-
Notifications
You must be signed in to change notification settings - Fork 0
/
detail.php
105 lines (89 loc) · 4.05 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
<?php
/**
* DokuWiki Image Detail Page
*
* @author Andreas Gohr <[email protected]>
* @author Anika Henke <[email protected]>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();
?><!DOCTYPE html>
<html 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>
<?php tpl_metaheaders()?>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<?php echo tpl_favicon(['favicon', 'mobile']) ?>
<?php tpl_includeFile('meta.html') ?>
</head>
<body>
<div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?>">
<?php include(__DIR__ . '/tpl_header.php') ?>
<div class="wrapper group" id="dokuwiki__detail">
<!-- ********** CONTENT ********** -->
<main id="dokuwiki__content"><div class="pad group">
<?php html_msgarea() ?>
<?php if (!$ERROR) : ?>
<div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)); ?></span></div>
<?php endif; ?>
<div class="page group">
<?php tpl_flush() ?>
<?php tpl_includeFile('pageheader.html') ?>
<!-- detail start -->
<?php
if ($ERROR) :
echo '<h1>' . $ERROR . '</h1>';
else : ?>
<?php if ($REV) echo p_locale_xhtml('showrev');?>
<h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
<?php tpl_img(900, 700); /* parameters: maximum width, maximum height (and more) */ ?>
<div class="img_detail">
<?php tpl_img_meta(); ?>
<dl>
<?php
echo '<dt>' . $lang['reference'] . ':</dt>';
$media_usage = ft_mediause($IMG, true);
if ($media_usage !== []) {
foreach ($media_usage as $path) {
echo '<dd>' . html_wikilink($path) . '</dd>';
}
} else {
echo '<dd>' . $lang['nothingfound'] . '</dd>';
}
?>
</dl>
<p><?php echo $lang['media_acl_warning']; ?></p>
</div>
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
<?php endif; ?>
</div>
<!-- detail stop -->
<?php tpl_includeFile('pagefooter.html') ?>
<?php tpl_flush() ?>
<?php /* doesn't make sense like this; @todo: maybe add tpl_imginfo()?
<div class="docInfo"><?php tpl_pageinfo(); ?></div>
*/ ?>
</div></main><!-- /content -->
<hr class="a11y" />
<!-- PAGE ACTIONS -->
<?php if (!$ERROR) : ?>
<nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading">
<h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3>
<div class="tools">
<ul>
<?php echo (new \dokuwiki\Menu\DetailMenu())->getListItems(); ?>
</ul>
</div>
</nav>
<?php endif; ?>
</div><!-- /wrapper -->
<?php include(__DIR__ . '/tpl_footer.php') ?>
</div></div><!-- /site -->
</body>
</html>