From dd63cd2b93bfa75cc2c13a50047278aaa94f4c9a Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 22 Jan 2012 15:58:03 +0000 Subject: integrated image detail page into main layout --- css/_imgdetail.css | 10 ++-- css/design.css | 6 +++ detail.php | 132 ++++++++++++++++++++++++++++++++--------------------- main.php | 79 +------------------------------- tpl_footer.php | 6 +++ tpl_header.php | 72 +++++++++++++++++++++++++++++ 6 files changed, 170 insertions(+), 135 deletions(-) create mode 100644 tpl_footer.php create mode 100644 tpl_header.php diff --git a/css/_imgdetail.css b/css/_imgdetail.css index d6cc4abaf..a3e0f55f5 100755 --- a/css/_imgdetail.css +++ b/css/_imgdetail.css @@ -8,14 +8,11 @@ #dokuwiki__detail h1 { } -#dokuwiki__detail div.content { -} - -#dokuwiki__detail div.content img { +#dokuwiki__detail img { float: left; - margin-right: 1.5em; + margin: 0 1.5em .5em 0; } -#dokuwiki__detail div.content div.img_detail { +#dokuwiki__detail div.img_detail { float: left; } @@ -29,4 +26,5 @@ } #dokuwiki__detail p.back { + clear: both; } diff --git a/css/design.css b/css/design.css index 1b596d590..026c5e3c0 100755 --- a/css/design.css +++ b/css/design.css @@ -366,6 +366,12 @@ } +/*____________ changes to _imgdetail ____________*/ + +#dokuwiki__detail { + padding: 0; +} + /*____________ JS popup ____________*/ .JSpopup { diff --git a/detail.php b/detail.php index 03f83a860..f3951e7bc 100755 --- a/detail.php +++ b/detail.php @@ -11,6 +11,8 @@ if (!defined('DOKU_INC')) die(); @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ +$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER['REMOTE_USER'] ); +$showSidebar = tpl_getConf('sidebarID') && page_exists(tpl_getConf('sidebarID')) && ($ACT=='show'); ?> + -
- - + + are added to make it possible to e.g. style a page differently if it's in edit mode, + see http://www.dokuwiki.org/devel:action_modes for a list of action modes */ ?> + +
-

+ -
- +
-
-

+ +
+ + -
- - 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]); + + +

+ + + +
+

+ +
+ '.$lang[$tag[1]].':
'; - if ($tag[2] == 'date') { - echo dformat($value); - } else { - echo hsc($value); + + 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 '
'.$lang[$tag[1]].':
'; + if ($tag[2] == 'date') { + echo dformat($value); + } else { + echo hsc($value); + } + echo '
'; } - echo ''; } + ?> +
+ +
+ +

+ = AUTH_UPLOAD) && function_exists('media_managerURL')) { + $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG)); + echo ''.$lang['img_manager'].'
'; } ?> -

- -
-
-
- -

- = AUTH_UPLOAD) && function_exists('media_managerURL')) { - $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG)); - echo ''.$lang['img_manager'].'
'; - } - ?> - ← -

- - -
+ ← +

+ + + + + + + +
+
+ +
+ + +
+ - diff --git a/main.php b/main.php index d843a18e4..5ec7f72d4 100755 --- a/main.php +++ b/main.php @@ -38,78 +38,8 @@ $showSidebar = tpl_getConf('sidebarID') && page_exists(tpl_getConf('sidebarID'))
- - - - -
- -
-

'.$conf['title'].'', - 'accesskey="h" title="[H]"' - ) /* @todo: obviously don't use tpl_getFavicon, but make a new function (or use a config option?) */ ?>

- -

- - -
    -
  • -
-
- -
- - -
-

-
    - would be: tpl_action('edit',0,'li') */ - if ($_SERVER['REMOTE_USER']) { - echo '
  • '; - tpl_userinfo(); /* 'Logged in as ...' */ - echo '
  • '; - } - tpl_action('admin', 1, 'li'); - tpl_action('profile', 1, 'li'); - tpl_action('register', 1, 'li'); - tpl_action('login', 1, 'li'); - ?> -
-
- - - -
-

- -
    - -
-
-
- - - - - - -
-
+
@@ -161,12 +91,7 @@ $showSidebar = tpl_getConf('sidebarID') && page_exists(tpl_getConf('sidebarID'))
- - - - +
diff --git a/tpl_footer.php b/tpl_footer.php new file mode 100644 index 000000000..fcc9d21c7 --- /dev/null +++ b/tpl_footer.php @@ -0,0 +1,6 @@ + + + + diff --git a/tpl_header.php b/tpl_header.php new file mode 100644 index 000000000..d782c051a --- /dev/null +++ b/tpl_header.php @@ -0,0 +1,72 @@ + + + + +
+ +
+

'.$conf['title'].'', + 'accesskey="h" title="[H]"' + ) /* @todo: obviously don't use tpl_getFavicon, but make a new function (or use a config option?) */ ?>

+ +

+ + +
    +
  • +
+
+ +
+ + +
+

+
    + would be: tpl_action('edit',0,'li') */ + if ($_SERVER['REMOTE_USER']) { + echo '
  • '; + tpl_userinfo(); /* 'Logged in as ...' */ + echo '
  • '; + } + tpl_action('admin', 1, 'li'); + tpl_action('profile', 1, 'li'); + tpl_action('register', 1, 'li'); + tpl_action('login', 1, 'li'); + ?> +
+
+ + + +
+

+ +
    + +
+
+ +
+ + + + + + +
+
-- cgit v1.2.3