diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-08-01 17:00:07 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-08-01 17:00:07 +0000 |
commit | 4b181b746fa3660f63de96373caf66686cc470b4 (patch) | |
tree | a2b71753b2d1421b5e54d425f54561db3fb8c1e6 /admin/batch_manager_global.php | |
parent | a7895bf67b2596ddef101bf7b11ab9b53ab32b9e (diff) |
merge -r17289 from trunk to 2.4: 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/branches/2.4@17290 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/batch_manager_global.php')
-rw-r--r-- | admin/batch_manager_global.php | 23 |
1 files changed, 11 insertions, 12 deletions
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( |