feature 2564: redesign on photo administration screen.

* one screen with several tabs (for now: properties + coi)

* double select boxes for album associations and representation have been
  converted to simple multiple select boxes with jQuery Chosen

* more details about the photo in an introduction text


git-svn-id: http://piwigo.org/svn/trunk@13077 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2012-02-10 10:52:07 +00:00
parent 62bfdd3f97
commit bea45c89b6
17 changed files with 741 additions and 300 deletions

View file

@ -1530,6 +1530,37 @@ DELETE
update_category($categories);
}
/**
* Disssociate images from all categories except their storage category and
* associate to new categories.
*
* @param array images
* @param array categories
* @return void
*/
function move_images_to_categories($images, $categories)
{
if (count($images) == 0)
{
return false;
}
// let's first break links with all albums but their "storage album"
$query = '
DELETE '.IMAGE_CATEGORY_TABLE.'.*
FROM '.IMAGE_CATEGORY_TABLE.'
JOIN '.IMAGES_TABLE.' ON image_id=id
WHERE id IN ('.implode(',', $images).')
AND (storage_category_id IS NULL OR storage_category_id != category_id)
;';
pwg_query($query);
if (is_array($categories) and count($categories) > 0)
{
associate_images_to_categories($images, $categories);
}
}
/**
* Associate images associated to a list of source categories to a list of
* destination categories.
@ -1987,6 +2018,7 @@ function get_active_menu($menu_page)
switch ($menu_page)
{
case 'photo':
case 'photos_add':
case 'rating':
case 'tags':