From f1494f18931ad354a05755c2c8dbfef1d51bfe87 Mon Sep 17 00:00:00 2001 From: vdigital Date: Sun, 29 Apr 2007 19:04:57 +0000 Subject: Bug 0000684: History [Search] - Add a thumbnail display. git-svn-id: http://piwigo.org/svn/trunk@1991 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/history.php | 40 +++++++++++++++++++++++++++++----- template/yoga/admin/default-layout.css | 32 +++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 5 deletions(-) diff --git a/admin/history.php b/admin/history.php index 0c8f34c33..cdfe5ee81 100644 --- a/admin/history.php +++ b/admin/history.php @@ -413,7 +413,10 @@ SELECT id, IF(name IS NULL, file, name) AS label, filesize, - high_filesize + high_filesize, + file, + path, + tn_ext FROM '.IMAGES_TABLE.' WHERE id IN ('.implode(',', array_keys($image_ids)).') ;'; @@ -421,7 +424,10 @@ SELECT $label_of_image = array(); $filesize_of_image = array(); $high_filesize_of_image = array(); - + $file_of_image = array(); + $path_of_image = array(); + $tn_ext_of_image = array(); + $result = pwg_query($query); while ($row = mysql_fetch_array($result)) { @@ -436,6 +442,10 @@ SELECT { $high_filesize_of_image[ $row['id'] ] = $row['high_filesize']; } + + $file_of_image[ $row['id'] ] = $row['file']; + $path_of_image[ $row['id'] ] = $row['path']; + $tn_ext_of_image[ $row['id'] ] = $row['tn_ext']; } // echo '
'; print_r($high_filesize_of_image); echo '
'; @@ -551,9 +561,29 @@ SELECT ) ); - $image_string = ''; - $image_string.= '('.$line['image_id'].')'; - + // (1258) + $element = array( + 'id' => $line['image_id'], + 'file' => $file_of_image[$line['image_id']], + 'path' => $path_of_image[$line['image_id']], + 'tn_ext' => $tn_ext_of_image[$line['image_id']], + ); + $image_string = ''; + if (!isset($conf['history_no_thumb']) or $conf['history_no_thumb']) { + $thumb_mode = "over"; + if (isset($conf['history_no_hover']) and $conf['history_no_hover']) { + $thumb_mode = "thumbnail"; + } + $image_string = '' + .'('.$line['image_id'].') '; + } + else { + $image_string= ''; + $image_string.= '('.$line['image_id'].')'; + } + if (isset($label_of_image[$line['image_id']])) { $image_string.= ' '.$label_of_image[$line['image_id']]; diff --git a/template/yoga/admin/default-layout.css b/template/yoga/admin/default-layout.css index 3040e91ff..09d03e8c8 100644 --- a/template/yoga/admin/default-layout.css +++ b/template/yoga/admin/default-layout.css @@ -203,3 +203,35 @@ ul.tabsheet li { border-radius: 6px 6px 0px 0px; /* round corners with CSS3 compliant browsers */ padding: 5px 2em 2px 2em; } + +.over{ +position: relative; +z-index: 0; +} + +.over:hover{ +background-color: transparent; +z-index: 50; +} + +.over span{ /*CSS for enlarged image*/ +position: absolute; +background-color: #eee; +padding: 5px; +left: -1000px; +border: 1px solid #69c; +visibility: hidden; +color: black; +text-decoration: none; +} + +.over span img{ /*CSS for enlarged image*/ +border-width: 0; +padding: 2px; +} + +.over:hover span{ /*CSS for enlarged image on hover*/ +visibility: visible; +top: 0; +left: 60px; /*position where enlarged image should offset horizontally */ +} -- cgit v1.2.3