diff options
author | ghi <dokuwiki@imz.re> | 2015-02-17 11:08:15 +0100 |
---|---|---|
committer | ghi <dokuwiki@imz.re> | 2015-02-17 11:08:15 +0100 |
commit | 7d0b7e5ed7aa0f9c56def8f6c9866aa4fc8315b8 (patch) | |
tree | 08330b0a548a402caeb02ee7a185e745386ad45d /lib/tpl/dokuwiki/detail.php | |
parent | d6dc28be40fb3202a3df69458db164e20999ac2b (diff) | |
parent | f8803275a58a05b29e4029cc539a6f8c60ad2ea5 (diff) | |
download | rpg-7d0b7e5ed7aa0f9c56def8f6c9866aa4fc8315b8.tar.gz rpg-7d0b7e5ed7aa0f9c56def8f6c9866aa4fc8315b8.tar.bz2 |
Merge https://github.com/splitbrain/dokuwiki into html_showrev_output
Diffstat (limited to 'lib/tpl/dokuwiki/detail.php')
-rw-r--r-- | lib/tpl/dokuwiki/detail.php | 56 |
1 files changed, 10 insertions, 46 deletions
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php index ec846f6fd..d4f9c39d1 100644 --- a/lib/tpl/dokuwiki/detail.php +++ b/lib/tpl/dokuwiki/detail.php @@ -49,43 +49,13 @@ header('X-UA-Compatible: IE=edge,chrome=1'); 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"> - <dl> - <?php - // @todo: logic should be transferred to backend - $config_files = getConfigFiles('mediameta'); - foreach ($config_files as $config_file) { - if(@file_exists($config_file)) { - include($config_file); - } - } - - foreach($fields as $key => $tag){ - $t = array(); - if (!empty($tag[0])) { - $t = array($tag[0]); - } - if(is_array($tag[3])) { - $t = array_merge($t,$tag[3]); - } - $value = tpl_img_getTag($t); - if ($value) { - echo '<dt>'.$lang[$tag[1]].':</dt><dd>'; - if ($tag[2] == 'date') { - echo dformat($value); - } else { - echo hsc($value); - } - echo '</dd>'; - } - } - ?> - </dl> + <?php tpl_img_meta(); ?> </div> <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?> <?php endif; ?> @@ -109,23 +79,17 @@ header('X-UA-Compatible: IE=edge,chrome=1'); <div class="tools"> <ul> <?php - $data = array(); - $data['view'] = 'detail'; - - // View in media manager; @todo: transfer logic to backend - $imgNS = getNS($IMG); - $authNS = auth_quickaclcheck("$imgNS:*"); - if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) { - $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG)); - $data['items']['mediaManager'] = '<li><a href="'.$mmURL.'" class="mediaManager"><span>'.$lang['img_manager'].'</span></a></li>'; - } - - // Back to [ID]; @todo: transfer logic to backend - $data['items']['img_backto'] = '<li><a href="'.wl($ID).'" class="back"><span>'.$lang['img_backto'].' '.$ID.'</span></a></li>'; + $data = array( + 'view' => 'detail', + 'items' => array( + 'mediaManager' => tpl_action('mediaManager', true, 'li', true, '<span>', '</span>'), + 'img_backto' => tpl_action('img_backto', true, 'li', true, '<span>', '</span>'), + ) + ); // the page tools can be amended through a custom plugin hook $evt = new Doku_Event('TEMPLATE_PAGETOOLS_DISPLAY', $data); - if($evt->advise_before()){ + if($evt->advise_before()) { foreach($evt->data['items'] as $k => $html) echo $html; } $evt->advise_after(); |