From 4eb43c14060d0c70b7b199cc81193537309611b5 Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 1 Aug 2012 16:59:06 +0000 Subject: batch manager improvements/fixes: - when refreshing photo set, start is set to 0 (otherwise if the new set is smaller that start, it looks like it is empty) - correct positioning of thumbnails (width/height) is done in template instead of javascript (immediate instead on ready + no reflows) - less space lost on batch manager page - fix wrong page title in batch manager because of global variable $title overriden - fix language keys in element_set_ranks (capital/lowercase issue) git-svn-id: http://piwigo.org/svn/trunk@17289 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/batch_manager_global.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'admin/batch_manager_global.php') diff --git a/admin/batch_manager_global.php b/admin/batch_manager_global.php index 99641ce6f..8b6ec5b68 100644 --- a/admin/batch_manager_global.php +++ b/admin/batch_manager_global.php @@ -472,8 +472,9 @@ $template->assign( 'filter' => $_SESSION['bulk_manager_filter'], 'selection' => $collection, 'all_elements' => $page['cat_elements_id'], + 'START' => $page['start'], 'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')), - 'F_ACTION'=>$base_url.get_query_string_diff(array('cat')), + 'F_ACTION'=>$base_url.get_query_string_diff(array('cat','start')), ) ); @@ -732,7 +733,6 @@ if (count($page['cat_elements_id']) > 0) $conf['order_by'] = ' ORDER BY file, id'; } - $query = ' SELECT id,path,representative_ext,file,filesize,level,name,width,height,rotation FROM '.IMAGES_TABLE; @@ -766,31 +766,30 @@ SELECT id,path,representative_ext,file,filesize,level,name,width,height,rotation ;'; $result = pwg_query($query); + $thumb_params = ImageStdParams::get_by_type(IMG_THUMB); // template thumbnail initialization while ($row = pwg_db_fetch_assoc($result)) { $nb_thumbs_page++; $src_image = new SrcImage($row); - $title = render_element_name($row); - if ($title != get_name_from_file($row['file'])) + $ttitle = render_element_name($row); + if ($ttitle != get_name_from_file($row['file'])) { - $title.= ' ('.$row['file'].')'; + $ttitle.= ' ('.$row['file'].')'; } $template->append( - 'thumbnails', + 'thumbnails', array_merge($row, array( - 'ID' => $row['id'], - 'TN_SRC' => DerivativeImage::url(IMG_THUMB, $src_image), - 'FILE' => $row['file'], - 'TITLE' => $title, - 'LEVEL' => $row['level'], + 'thumb' => new DerivativeImage($thumb_params, $src_image), + 'TITLE' => $ttitle, 'FILE_SRC' => DerivativeImage::url(IMG_LARGE, $src_image), 'U_EDIT' => get_root_url().'admin.php?page=photo-'.$row['id'], ) - ); + )); } + $template->assign('thumb_params', $thumb_params); } $template->assign( -- cgit v1.2.3