feature 2561: redesign on album administration screen.
* only one form on the screen and several tabs * simpler URL pattern : page=album-123-properties / page=album-123-sort_order / page=album-123-permissions * action to associate all photos of an album to another (new) virtual album was removed. This can be easily done with the new Batch Manager * notification by email on an album still has to be moved on a new dedicated tab * action icons (jump to album, manage photos, manage sub-albums, delete album...) replaced by plain text links git-svn-id: http://piwigo.org/svn/trunk@13013 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
9c4a478b75
commit
ae6a63bee0
15 changed files with 257 additions and 421 deletions
12
admin.php
12
admin.php
|
@ -120,6 +120,18 @@ if (isset($_GET['page']) and preg_match('/^plugin-([^-]*)(?:-(.*))?$/', $_GET['p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ?page=album-134-properties is an clean alias of
|
||||||
|
// ?page=album&cat_id=134&tab=properties
|
||||||
|
if (isset($_GET['page']) and preg_match('/^album-(\d+)(?:-(.*))?$/', $_GET['page'], $matches))
|
||||||
|
{
|
||||||
|
$_GET['page'] = 'album';
|
||||||
|
$_GET['cat_id'] = $matches[1];
|
||||||
|
if (isset($matches[2]))
|
||||||
|
{
|
||||||
|
$_GET['tab'] = $matches[2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_GET['page'])
|
if (isset($_GET['page'])
|
||||||
and preg_match('/^[a-z_]*$/', $_GET['page'])
|
and preg_match('/^[a-z_]*$/', $_GET['page'])
|
||||||
and is_file(PHPWG_ROOT_PATH.'admin/'.$_GET['page'].'.php'))
|
and is_file(PHPWG_ROOT_PATH.'admin/'.$_GET['page'].'.php'))
|
||||||
|
|
92
admin/album.php
Normal file
92
admin/album.php
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
<?php
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
// | Piwigo - a PHP based photo gallery |
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
// | Copyright(C) 2008-2012 Piwigo Team http://piwigo.org |
|
||||||
|
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
|
||||||
|
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
// | This program is free software; you can redistribute it and/or modify |
|
||||||
|
// | it under the terms of the GNU General Public License as published by |
|
||||||
|
// | the Free Software Foundation |
|
||||||
|
// | |
|
||||||
|
// | This program is distributed in the hope that it will be useful, but |
|
||||||
|
// | WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||||
|
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
||||||
|
// | General Public License for more details. |
|
||||||
|
// | |
|
||||||
|
// | You should have received a copy of the GNU General Public License |
|
||||||
|
// | along with this program; if not, write to the Free Software |
|
||||||
|
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
|
||||||
|
// | USA. |
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
|
||||||
|
if( !defined("PHPWG_ROOT_PATH") )
|
||||||
|
{
|
||||||
|
die ("Hacking attempt!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
// | Basic checks |
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
|
||||||
|
check_status(ACCESS_ADMINISTRATOR);
|
||||||
|
|
||||||
|
check_input_parameter('cat_id', $_GET, false, PATTERN_ID);
|
||||||
|
|
||||||
|
$admin_album_base_url = get_root_url().'admin.php?page=album-'.$_GET['cat_id'];
|
||||||
|
|
||||||
|
$query = '
|
||||||
|
SELECT *
|
||||||
|
FROM '.CATEGORIES_TABLE.'
|
||||||
|
WHERE id = '.$_GET['cat_id'].'
|
||||||
|
;';
|
||||||
|
$category = pwg_db_fetch_assoc(pwg_query($query));
|
||||||
|
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
// | Tabs |
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
|
||||||
|
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
|
||||||
|
|
||||||
|
$page['tab'] = 'properties';
|
||||||
|
|
||||||
|
if (isset($_GET['tab']))
|
||||||
|
{
|
||||||
|
$page['tab'] = $_GET['tab'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$tabsheet = new tabsheet();
|
||||||
|
$tabsheet->add('properties', l10n('Properties'), $admin_album_base_url.'-properties');
|
||||||
|
$tabsheet->add('sort_order', l10n('Manage photo ranks'), $admin_album_base_url.'-sort_order');
|
||||||
|
|
||||||
|
if ('private' == $category['status'])
|
||||||
|
{
|
||||||
|
$tabsheet->add('permissions', l10n('Permissions'), $admin_album_base_url.'-permissions');
|
||||||
|
}
|
||||||
|
|
||||||
|
$tabsheet->select($page['tab']);
|
||||||
|
$tabsheet->assign();
|
||||||
|
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
// | Load the tab |
|
||||||
|
// +-----------------------------------------------------------------------+
|
||||||
|
|
||||||
|
if ('properties' == $page['tab'])
|
||||||
|
{
|
||||||
|
include(PHPWG_ROOT_PATH.'admin/cat_modify.php');
|
||||||
|
}
|
||||||
|
elseif ('sort_order' == $page['tab'])
|
||||||
|
{
|
||||||
|
include(PHPWG_ROOT_PATH.'admin/element_set_ranks.php');
|
||||||
|
}
|
||||||
|
elseif ('permissions' == $page['tab'])
|
||||||
|
{
|
||||||
|
$_GET['cat'] = $_GET['cat_id'];
|
||||||
|
include(PHPWG_ROOT_PATH.'admin/cat_perm.php');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
include(PHPWG_ROOT_PATH.'admin/album_'.$page['tab'].'.php');
|
||||||
|
}
|
||||||
|
?>
|
|
@ -297,7 +297,7 @@ foreach ($categories as $category)
|
||||||
),
|
),
|
||||||
|
|
||||||
'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'],
|
'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'],
|
||||||
'U_EDIT' => $base_url.'cat_modify&cat_id='.$category['id'],
|
'U_EDIT' => $base_url.'album-'.$category['id'],
|
||||||
|
|
||||||
'IS_VIRTUAL' => empty($category['dir'])
|
'IS_VIRTUAL' => empty($category['dir'])
|
||||||
);
|
);
|
||||||
|
|
|
@ -163,7 +163,10 @@ if (isset($_POST['submit']))
|
||||||
move_categories( array($_GET['cat_id']), $_POST['parent'] );
|
move_categories( array($_GET['cat_id']), $_POST['parent'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push($page['infos'], l10n('Album updated successfully'));
|
// we redirect to hide/show the "permissions" tab if the category status
|
||||||
|
// has changed
|
||||||
|
$_SESSION['page_infos'] = array(l10n('Album updated successfully'));
|
||||||
|
redirect($admin_album_base_url);
|
||||||
}
|
}
|
||||||
elseif (isset($_POST['set_random_representant']))
|
elseif (isset($_POST['set_random_representant']))
|
||||||
{
|
{
|
||||||
|
@ -178,75 +181,7 @@ UPDATE '.CATEGORIES_TABLE.'
|
||||||
;';
|
;';
|
||||||
pwg_query($query);
|
pwg_query($query);
|
||||||
}
|
}
|
||||||
elseif (isset($_POST['submitAdd']))
|
|
||||||
{
|
|
||||||
$output_create = create_virtual_category(
|
|
||||||
$_POST['virtual_name'],
|
|
||||||
(0 == $_POST['parent'] ? null : $_POST['parent'])
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isset($output_create['error']))
|
|
||||||
{
|
|
||||||
array_push($page['errors'], $output_create['error']);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Virtual album creation succeeded
|
|
||||||
//
|
|
||||||
// Add the information in the information list
|
|
||||||
array_push($page['infos'], $output_create['info']);
|
|
||||||
|
|
||||||
// Link the new category to the current category
|
|
||||||
associate_categories_to_categories(
|
|
||||||
array($_GET['cat_id']),
|
|
||||||
array($output_create['id'])
|
|
||||||
);
|
|
||||||
|
|
||||||
// information
|
|
||||||
array_push(
|
|
||||||
$page['infos'],
|
|
||||||
sprintf(
|
|
||||||
l10n('Album photos associated to the following albums: %s'),
|
|
||||||
'<ul><li>'
|
|
||||||
.get_cat_display_name_from_id($output_create['id'])
|
|
||||||
.'</li></ul>'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif (isset($_POST['submitDestinations'])
|
|
||||||
and isset($_POST['destinations'])
|
|
||||||
and count($_POST['destinations']) > 0)
|
|
||||||
{
|
|
||||||
associate_categories_to_categories(
|
|
||||||
array($_GET['cat_id']),
|
|
||||||
$_POST['destinations']
|
|
||||||
);
|
|
||||||
|
|
||||||
$category_names = array();
|
|
||||||
foreach ($_POST['destinations'] as $category_id)
|
|
||||||
{
|
|
||||||
array_push(
|
|
||||||
$category_names,
|
|
||||||
get_cat_display_name_from_id($category_id)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
array_push(
|
|
||||||
$page['infos'],
|
|
||||||
sprintf(
|
|
||||||
l10n('Album photos associated to the following albums: %s'),
|
|
||||||
'<ul><li>'.implode('</li><li>', $category_names).'</li></ul>'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$query = '
|
|
||||||
SELECT *
|
|
||||||
FROM '.CATEGORIES_TABLE.'
|
|
||||||
WHERE id = '.$_GET['cat_id'].'
|
|
||||||
;';
|
|
||||||
$category = pwg_db_fetch_assoc( pwg_query( $query ) );
|
|
||||||
// nullable fields
|
// nullable fields
|
||||||
foreach (array('comment','dir','site_id', 'id_uppercat') as $nullable)
|
foreach (array('comment','dir','site_id', 'id_uppercat') as $nullable)
|
||||||
{
|
{
|
||||||
|
@ -268,13 +203,13 @@ $category['has_images'] = pwg_db_num_rows($result)>0 ? true : false;
|
||||||
// Navigation path
|
// Navigation path
|
||||||
$navigation = get_cat_display_name_cache(
|
$navigation = get_cat_display_name_cache(
|
||||||
$category['uppercats'],
|
$category['uppercats'],
|
||||||
get_root_url().'admin.php?page=cat_modify&cat_id='
|
get_root_url().'admin.php?page=album-'
|
||||||
);
|
);
|
||||||
|
|
||||||
$form_action = get_root_url().'admin.php?page=cat_modify&cat_id='.$_GET['cat_id'];
|
$form_action = $admin_album_base_url.'-properties';
|
||||||
|
|
||||||
//----------------------------------------------------- template initialization
|
//----------------------------------------------------- template initialization
|
||||||
$template->set_filename( 'categories', 'cat_modify.tpl');
|
$template->set_filename( 'album_properties', 'cat_modify.tpl');
|
||||||
|
|
||||||
$base_url = get_root_url().'admin.php?page=';
|
$base_url = get_root_url().'admin.php?page=';
|
||||||
$cat_list_url = $base_url.'cat_list';
|
$cat_list_url = $base_url.'cat_list';
|
||||||
|
@ -303,8 +238,6 @@ $template->assign(
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
'MAIL_CONTENT' => empty($_POST['mail_content'])
|
|
||||||
? '' : stripslashes($_POST['mail_content']),
|
|
||||||
'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'],
|
'U_CHILDREN' => $cat_list_url.'&parent_id='.$category['id'],
|
||||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_modify',
|
'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_modify',
|
||||||
|
|
||||||
|
@ -317,14 +250,6 @@ if ($conf['activate_comments'])
|
||||||
$template->assign('CAT_COMMENTABLE', boolean_to_string($category['commentable']));
|
$template->assign('CAT_COMMENTABLE', boolean_to_string($category['commentable']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ('private' == $category['status'])
|
|
||||||
{
|
|
||||||
$template->assign( 'U_MANAGE_PERMISSIONS',
|
|
||||||
$base_url.'cat_perm&cat='.$category['id']
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// manage album elements link
|
// manage album elements link
|
||||||
if ($category['has_images'])
|
if ($category['has_images'])
|
||||||
{
|
{
|
||||||
|
@ -332,7 +257,42 @@ if ($category['has_images'])
|
||||||
'U_MANAGE_ELEMENTS',
|
'U_MANAGE_ELEMENTS',
|
||||||
$base_url.'batch_manager&cat='.$category['id']
|
$base_url.'batch_manager&cat='.$category['id']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$query = '
|
||||||
|
SELECT
|
||||||
|
COUNT(image_id),
|
||||||
|
MIN(DATE(date_available)),
|
||||||
|
MAX(DATE(date_available))
|
||||||
|
FROM '.IMAGES_TABLE.'
|
||||||
|
JOIN '.IMAGE_CATEGORY_TABLE.' ON image_id = id
|
||||||
|
WHERE category_id = '.$category['id'].'
|
||||||
|
;';
|
||||||
|
list($image_count, $min_date, $max_date) = pwg_db_fetch_row(pwg_query($query));
|
||||||
|
|
||||||
|
if ($min_date == $max_date)
|
||||||
|
{
|
||||||
|
$intro = sprintf(
|
||||||
|
l10n('This album contains %d photos, added on %s.'),
|
||||||
|
$image_count,
|
||||||
|
format_date($min_date)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$intro = sprintf(
|
||||||
|
l10n('This album contains %d photos, added between %s and %s.'),
|
||||||
|
$image_count,
|
||||||
|
format_date($min_date),
|
||||||
|
format_date($max_date)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$intro = l10n('This album contains no photo.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign('INTRO', $intro);
|
||||||
|
|
||||||
$template->assign(
|
$template->assign(
|
||||||
'U_MANAGE_RANKS',
|
'U_MANAGE_RANKS',
|
||||||
|
@ -352,9 +312,7 @@ else
|
||||||
$category['cat_full_dir'] = get_complete_dir($_GET['cat_id']);
|
$category['cat_full_dir'] = get_complete_dir($_GET['cat_id']);
|
||||||
$template->assign(
|
$template->assign(
|
||||||
array(
|
array(
|
||||||
'CAT_FULL_DIR' => preg_replace('/\/$/',
|
'CAT_FULL_DIR' => preg_replace('/\/$/', '', $category['cat_full_dir'])
|
||||||
'',
|
|
||||||
$category['cat_full_dir'] )
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -430,144 +388,8 @@ SELECT id,name,uppercats,global_rank
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create virtual in parent and link
|
|
||||||
$query = '
|
|
||||||
SELECT id,name,uppercats,global_rank
|
|
||||||
FROM '.CATEGORIES_TABLE.'
|
|
||||||
;';
|
|
||||||
display_select_cat_wrapper(
|
|
||||||
$query,
|
|
||||||
array(),
|
|
||||||
'create_new_parent_options'
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// destination categories
|
|
||||||
$query = '
|
|
||||||
SELECT id,name,uppercats,global_rank
|
|
||||||
FROM '.CATEGORIES_TABLE.'
|
|
||||||
WHERE id != '.$category['id'].'
|
|
||||||
;';
|
|
||||||
display_select_cat_wrapper(
|
|
||||||
$query,
|
|
||||||
array(),
|
|
||||||
'category_destination_options'
|
|
||||||
);
|
|
||||||
|
|
||||||
// info by email to an access granted group of category informations
|
|
||||||
if (isset($_POST['submitEmail']) and !empty($_POST['group']))
|
|
||||||
{
|
|
||||||
set_make_full_url();
|
|
||||||
|
|
||||||
/* TODO: if $category['representative_picture_id']
|
|
||||||
is empty find child representative_picture_id */
|
|
||||||
if (!empty($category['representative_picture_id']))
|
|
||||||
{
|
|
||||||
$query = '
|
|
||||||
SELECT id, file, path, representative_ext
|
|
||||||
FROM '.IMAGES_TABLE.'
|
|
||||||
WHERE id = '.$category['representative_picture_id'].'
|
|
||||||
;';
|
|
||||||
|
|
||||||
$result = pwg_query($query);
|
|
||||||
if (pwg_db_num_rows($result) > 0)
|
|
||||||
{
|
|
||||||
$element = pwg_db_fetch_assoc($result);
|
|
||||||
|
|
||||||
$img_url = '<a href="'.
|
|
||||||
make_picture_url(array(
|
|
||||||
'image_id' => $element['id'],
|
|
||||||
'image_file' => $element['file'],
|
|
||||||
'category' => $category
|
|
||||||
))
|
|
||||||
.'" class="thumblnk"><img src="'.DerivativeImage::thumb_url($element).'"></a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($img_url))
|
|
||||||
{
|
|
||||||
$img_url = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO Mettre un array pour traduction subjet
|
|
||||||
pwg_mail_group(
|
|
||||||
$_POST['group'],
|
|
||||||
get_str_email_format(true), /* TODO add a checkbox in order to choose format*/
|
|
||||||
get_l10n_args('[%s] Visit album %s',
|
|
||||||
array($conf['gallery_title'], $category['name'])),
|
|
||||||
'cat_group_info',
|
|
||||||
array
|
|
||||||
(
|
|
||||||
'IMG_URL' => $img_url,
|
|
||||||
'CAT_NAME' => $category['name'],
|
|
||||||
'LINK' => make_index_url(
|
|
||||||
array(
|
|
||||||
'category' => array(
|
|
||||||
'id' => $category['id'],
|
|
||||||
'name' => $category['name'],
|
|
||||||
'permalink' => $category['permalink']
|
|
||||||
))),
|
|
||||||
'CPL_CONTENT' => empty($_POST['mail_content'])
|
|
||||||
? '' : stripslashes($_POST['mail_content'])
|
|
||||||
),
|
|
||||||
'' /* TODO Add listbox in order to choose Language selected */);
|
|
||||||
|
|
||||||
unset_make_full_url();
|
|
||||||
|
|
||||||
$query = '
|
|
||||||
SELECT
|
|
||||||
name
|
|
||||||
FROM '.GROUPS_TABLE.'
|
|
||||||
WHERE id = '.$_POST['group'].'
|
|
||||||
;';
|
|
||||||
list($group_name) = pwg_db_fetch_row(pwg_query($query));
|
|
||||||
|
|
||||||
array_push(
|
|
||||||
$page['infos'],
|
|
||||||
sprintf(
|
|
||||||
l10n('An information email was sent to group "%s"'),
|
|
||||||
$group_name
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('private' == $category['status'])
|
|
||||||
{
|
|
||||||
$query = '
|
|
||||||
SELECT
|
|
||||||
group_id
|
|
||||||
FROM '.GROUP_ACCESS_TABLE.'
|
|
||||||
WHERE cat_id = '.$category['id'].'
|
|
||||||
;';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$query = '
|
|
||||||
SELECT
|
|
||||||
id AS group_id
|
|
||||||
FROM '.GROUPS_TABLE.'
|
|
||||||
;';
|
|
||||||
}
|
|
||||||
$group_ids = array_from_query($query, 'group_id');
|
|
||||||
|
|
||||||
if (count($group_ids) > 0)
|
|
||||||
{
|
|
||||||
$query = '
|
|
||||||
SELECT
|
|
||||||
id,
|
|
||||||
name
|
|
||||||
FROM '.GROUPS_TABLE.'
|
|
||||||
WHERE id IN ('.implode(',', $group_ids).')
|
|
||||||
ORDER BY name ASC
|
|
||||||
;';
|
|
||||||
$template->assign('group_mail_options',
|
|
||||||
simple_hash_from_query($query, 'id', 'name')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
trigger_action('loc_end_cat_modify');
|
trigger_action('loc_end_cat_modify');
|
||||||
|
|
||||||
//----------------------------------------------------------- sending html code
|
//----------------------------------------------------------- sending html code
|
||||||
$template->assign_var_from_handle('ADMIN_CONTENT', 'categories');
|
$template->assign_var_from_handle('ADMIN_CONTENT', 'album_properties');
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -166,10 +166,10 @@ $template->assign(
|
||||||
'CATEGORIES_NAV' =>
|
'CATEGORIES_NAV' =>
|
||||||
get_cat_display_name_from_id(
|
get_cat_display_name_from_id(
|
||||||
$page['cat'],
|
$page['cat'],
|
||||||
'admin.php?page=cat_modify&cat_id='
|
'admin.php?page=album-'
|
||||||
),
|
),
|
||||||
'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_perm',
|
'U_HELP' => get_root_url().'admin/popuphelp.php?page=cat_perm',
|
||||||
'F_ACTION' => get_root_url().'admin.php?page=cat_perm&cat='.$page['cat']
|
'F_ACTION' => $admin_album_base_url.'-permissions',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ elseif ($category['image_order']!='')
|
||||||
// Navigation path
|
// Navigation path
|
||||||
$navigation = get_cat_display_name_cache(
|
$navigation = get_cat_display_name_cache(
|
||||||
$category['uppercats'],
|
$category['uppercats'],
|
||||||
get_root_url().'admin.php?page=cat_modify&cat_id='
|
get_root_url().'admin.php?page=album-'
|
||||||
);
|
);
|
||||||
|
|
||||||
$template->assign(
|
$template->assign(
|
||||||
|
|
|
@ -1991,6 +1991,7 @@ function get_active_menu($menu_page)
|
||||||
case 'batch_manager':
|
case 'batch_manager':
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case 'album':
|
||||||
case 'cat_list':
|
case 'cat_list':
|
||||||
case 'cat_modify':
|
case 'cat_modify':
|
||||||
case 'cat_move':
|
case 'cat_move':
|
||||||
|
|
|
@ -252,7 +252,7 @@ SELECT
|
||||||
WHERE category_id = '.$category_id.'
|
WHERE category_id = '.$category_id.'
|
||||||
;';
|
;';
|
||||||
list($count) = pwg_db_fetch_row(pwg_query($query));
|
list($count) = pwg_db_fetch_row(pwg_query($query));
|
||||||
$category_name = get_cat_display_name_from_id($category_id, 'admin.php?page=cat_modify&cat_id=');
|
$category_name = get_cat_display_name_from_id($category_id, 'admin.php?page=album-');
|
||||||
|
|
||||||
// information
|
// information
|
||||||
array_push(
|
array_push(
|
||||||
|
|
|
@ -360,7 +360,7 @@ while ($row = pwg_db_fetch_assoc($result))
|
||||||
$name =
|
$name =
|
||||||
get_cat_display_name_cache(
|
get_cat_display_name_cache(
|
||||||
$row['uppercats'],
|
$row['uppercats'],
|
||||||
get_root_url().'admin.php?page=cat_modify&cat_id=',
|
get_root_url().'admin.php?page=album-',
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1,209 +1,108 @@
|
||||||
|
|
||||||
{include file='include/autosize.inc.tpl'}
|
|
||||||
{include file='include/resize.inc.tpl'}
|
|
||||||
|
|
||||||
<div class="titrePage">
|
<div class="titrePage">
|
||||||
<h2>{'Edit album'|@translate}</h2>
|
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> › {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>{$CATEGORIES_NAV}</h3>
|
|
||||||
|
|
||||||
<ul class="categoryActions">
|
|
||||||
{if cat_admin_access($CAT_ID)}
|
|
||||||
<li><a href="{$U_JUMPTO}" title="{'jump to album'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" alt="{'jump to album'|@translate}"></a></li>
|
|
||||||
{/if}
|
|
||||||
{if isset($U_MANAGE_ELEMENTS) }
|
|
||||||
<li><a href="{$U_MANAGE_ELEMENTS}" title="{'manage album photos'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_elements.png" alt="{'Photos'|@translate}"></a></li>
|
|
||||||
{/if}
|
|
||||||
<li><a href="{$U_MANAGE_RANKS}" title="{'Manage photo ranks'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/ranks.png" alt="{'ranks'|@translate}"></a></li>
|
|
||||||
<li><a href="{$U_CHILDREN}" title="{'manage sub-albums'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_children.png" alt="{'sub-albums'|@translate}"></a></li>
|
|
||||||
{if isset($U_MANAGE_PERMISSIONS) }
|
|
||||||
<li><a href="{$U_MANAGE_PERMISSIONS}" title="{'Edit album permissions'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_permissions.png" alt="{'Permissions'|@translate}"></a></li>
|
|
||||||
{/if}
|
|
||||||
{if isset($U_SYNC) }
|
|
||||||
<li><a href="{$U_SYNC}" title="{'Synchronize'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/synchronize.png" alt="{'Synchronize'|@translate}"></a></li>
|
|
||||||
{/if}
|
|
||||||
{if isset($U_DELETE) }
|
|
||||||
<li><a href="{$U_DELETE}" title="{'delete album'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_delete.png" alt="{'delete album'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"></a></li>
|
|
||||||
{/if}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<form action="{$F_ACTION}" method="POST" id="catModify">
|
<form action="{$F_ACTION}" method="POST" id="catModify">
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{'Informations'|@translate}</legend>
|
<legend>{'Informations'|@translate}</legend>
|
||||||
<table>
|
|
||||||
|
|
||||||
{if isset($CAT_FULL_DIR) }
|
<table style="width:100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td><strong>{'Directory'|@translate}</strong></td>
|
<td style="width:1%;padding-right:10px;text-align:center;">
|
||||||
<td class="row1">{$CAT_FULL_DIR}</td>
|
{if isset($representant) }
|
||||||
</tr>
|
{if isset($representant.picture) }
|
||||||
{/if}
|
<a href="{$representant.picture.URL}"><img src="{$representant.picture.SRC}" alt="" style="border:2px solid #ddd"></a>
|
||||||
|
{else}
|
||||||
<tr>
|
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_representant_random.png" alt="{'Random photo'|@translate}">
|
||||||
<td><strong>{'Name'|@translate}</strong></td>
|
{/if}
|
||||||
<td>
|
|
||||||
<input type="text" class="large" name="name" value="{$CAT_NAME}" maxlength="60">
|
{if $representant.ALLOW_SET_RANDOM }
|
||||||
|
<p style="text-align:center;"><input class="submit" type="submit" name="set_random_representant" value="Refresh" title="{'Find a new representant by random'|@translate}"></p>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if isset($representant.ALLOW_DELETE) }
|
||||||
|
<p><input class="submit" type="submit" name="delete_representant" value="{'Delete Representant'|@translate}"></p>
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
<td style="vertical-align:top;border-left:2px solid #ddd;padding-left:10px;">
|
||||||
<td><strong>{'Description'|@translate}</strong></td>
|
<p>{$INTRO}</p>
|
||||||
<td>
|
<ul style="padding-left:15px;">
|
||||||
<textarea cols="50" rows="5" name="comment" id="comment" class="description">{$CAT_COMMENT}</textarea>
|
{if cat_admin_access($CAT_ID)}
|
||||||
|
<li><a href="{$U_JUMPTO}">{'jump to album'|@translate} →</a></li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if isset($U_MANAGE_ELEMENTS) }
|
||||||
|
<li><a href="{$U_MANAGE_ELEMENTS}">{'manage album photos'|@translate}</a></li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<li><a href="{$U_CHILDREN}">{'manage sub-albums'|@translate}</a></li>
|
||||||
|
|
||||||
|
{if isset($U_SYNC) }
|
||||||
|
<li><a href="{$U_SYNC}">{'Synchronize'|@translate}</a> ({'Directory'|@translate} = {$CAT_FULL_DIR})</li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{if isset($U_DELETE) }
|
||||||
|
<li><a href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete album'|@translate}</a></li>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<legend>{'Properties'|@translate}</legend>
|
||||||
|
<p>
|
||||||
|
<strong>{'Name'|@translate}</strong>
|
||||||
|
<br>
|
||||||
|
<input type="text" class="large" name="name" value="{$CAT_NAME}" maxlength="60">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>{'Description'|@translate}</strong>
|
||||||
|
<br>
|
||||||
|
<textarea cols="50" rows="5" name="comment" id="comment" class="description">{$CAT_COMMENT}</textarea>
|
||||||
|
</p>
|
||||||
|
|
||||||
{if isset($move_cat_options) }
|
{if isset($move_cat_options) }
|
||||||
<fieldset id="move">
|
<p>
|
||||||
<legend>{'Move'|@translate}</legend>
|
<strong>{'Parent album'|@translate}</strong>
|
||||||
{'Parent album'|@translate}
|
<br>
|
||||||
<select class="categoryDropDown" name="parent">
|
<select class="categoryDropDown" name="parent">
|
||||||
<option value="0">------------</option>
|
<option value="0">------------</option>
|
||||||
{html_options options=$move_cat_options selected=$move_cat_options_selected }
|
{html_options options=$move_cat_options selected=$move_cat_options_selected }
|
||||||
</select>
|
</select>
|
||||||
</fieldset>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<fieldset id="options">
|
<p>
|
||||||
<legend>{'Options'|@translate}</legend>
|
<strong>{'Access type'|@translate}</strong>
|
||||||
<table>
|
<br>
|
||||||
<tr>
|
{html_radios name='status' values=$status_values output=$status_values|translate selected=$CAT_STATUS}
|
||||||
<td><strong>{'Access type'|@translate}</strong>
|
</p>
|
||||||
<td>
|
|
||||||
{html_radios name='status' values=$status_values output=$status_values|translate selected=$CAT_STATUS}
|
<p>
|
||||||
</td>
|
<strong>{'Lock'|@translate}</strong>
|
||||||
</tr>
|
<br>
|
||||||
<tr>
|
{html_radios name='visible' values='true,false'|@explode output='No,Yes'|@explode|translate selected=$CAT_VISIBLE}
|
||||||
<td><strong>{'Lock'|@translate}</strong>
|
</p>
|
||||||
<td>
|
|
||||||
{html_radios name='visible' values='true,false'|@explode output='No,Yes'|@explode|translate selected=$CAT_VISIBLE}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{if isset($CAT_COMMENTABLE)}
|
{if isset($CAT_COMMENTABLE)}
|
||||||
<tr>
|
<p>
|
||||||
<td><strong>{'Comments'|@translate}</strong>
|
<strong>{'Comments'|@translate}</strong>
|
||||||
<td>
|
<br>
|
||||||
{html_radios name='commentable' values='false,true'|@explode output='No,Yes'|@explode|translate selected=$CAT_COMMENTABLE}
|
{html_radios name='commentable' values='false,true'|@explode output='No,Yes'|@explode|translate selected=$CAT_COMMENTABLE}
|
||||||
</td>
|
</p>
|
||||||
</tr>
|
|
||||||
{/if}
|
{/if}
|
||||||
</table>
|
|
||||||
|
<p style="margin:0">
|
||||||
|
<input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
|
||||||
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<p style="text-align:center;">
|
|
||||||
<input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
|
|
||||||
<input class="submit" type="reset" value="{'Reset'|@translate}" name="reset">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{if isset($representant) }
|
|
||||||
<fieldset id="representant">
|
|
||||||
<legend>{'Representant'|@translate}</legend>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
{if isset($representant.picture) }
|
|
||||||
<a href="{$representant.picture.URL}"><img src="{$representant.picture.SRC}" alt=""></a>
|
|
||||||
{else}
|
|
||||||
<img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/category_representant_random.png" alt="{'Random photo'|@translate}">
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
{if $representant.ALLOW_SET_RANDOM }
|
|
||||||
<p><input class="submit" type="submit" name="set_random_representant" value="{'Find a new representant by random'|@translate}"></p>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{if isset($representant.ALLOW_DELETE) }
|
|
||||||
<p><input class="submit" type="submit" name="delete_representant" value="{'Delete Representant'|@translate}"></p>
|
|
||||||
{/if}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form action="{$F_ACTION}" method="POST" id="links">
|
|
||||||
|
|
||||||
<fieldset id="linkAllNew">
|
|
||||||
<legend>{'Link all album photos to a new album'|@translate}</legend>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>{'Virtual album name'|@translate}</td>
|
|
||||||
<td><input type="text" class="large" name="virtual_name"></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{'Parent album'|@translate}</td>
|
|
||||||
<td>
|
|
||||||
<select class="categoryDropDown" name="parent">
|
|
||||||
<option value="0">------------</option>
|
|
||||||
{html_options options=$create_new_parent_options }
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<input class="submit" type="submit" value="{'Submit'|@translate}" name="submitAdd">
|
|
||||||
<input class="submit" type="reset" value="{'Reset'|@translate}" name="reset">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset id="linkAllExist">
|
|
||||||
<legend>{'Link all album photos to some existing albums'|@translate}</legend>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>{'Albums'|@translate}</td>
|
|
||||||
<td>
|
|
||||||
<select class="categoryList" name="destinations[]" multiple="multiple" size="5">
|
|
||||||
{html_options options=$category_destination_options }
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<input class="submit" type="submit" value="{'Submit'|@translate}" name="submitDestinations">
|
|
||||||
<input class="submit" type="reset" value="{'Reset'|@translate}" name="reset">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
{if isset($group_mail_options)}
|
|
||||||
<fieldset id="emailCatInfo">
|
|
||||||
<legend>{'Send an information email to group members'|@translate}</legend>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td><strong>{'Group'|@translate}</strong></td>
|
|
||||||
<td>
|
|
||||||
<select name="group">
|
|
||||||
{html_options options=$group_mail_options}
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><strong>{'Mail content'|@translate}</strong></td>
|
|
||||||
<td>
|
|
||||||
<textarea cols="50" rows="5" name="mail_content" id="mail_content" class="description">{$MAIL_CONTENT}</textarea>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<input class="submit" type="submit" value="{'Submit'|@translate}" name="submitEmail">
|
|
||||||
<input class="submit" type="reset" value="{'Reset'|@translate}" name="reset">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<div class="titrePage">
|
<div class="titrePage">
|
||||||
<h2>{'Edit album permissions'|@translate}</h2>
|
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> › {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>{$CATEGORIES_NAV}</h3>
|
|
||||||
|
|
||||||
<form action="{$F_ACTION}" method="post" id="categoryPermissions">
|
<form action="{$F_ACTION}" method="post" id="categoryPermissions">
|
||||||
|
|
||||||
<h4>{'Groups'|@translate}</h4>
|
<h4>{'Groups'|@translate}</h4>
|
||||||
|
|
|
@ -37,9 +37,9 @@ jQuery('.clipwrapper').tipTip({
|
||||||
});
|
});
|
||||||
{/literal}{/footer_script}
|
{/literal}{/footer_script}
|
||||||
|
|
||||||
<h2>{'Manage photo ranks'|@translate}</h2>
|
<div class="titrePage">
|
||||||
|
<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> › {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
|
||||||
<h3>{$CATEGORIES_NAV}</h3>
|
</div>
|
||||||
|
|
||||||
<form action="{$F_ACTION}" method="post">
|
<form action="{$F_ACTION}" method="post">
|
||||||
{if !empty($thumbnails)}
|
{if !empty($thumbnails)}
|
||||||
|
|
|
@ -219,6 +219,12 @@ LI.menuLi {
|
||||||
|
|
||||||
FORM#catModify TABLE { width: auto; }
|
FORM#catModify TABLE { width: auto; }
|
||||||
|
|
||||||
|
#catModify p {
|
||||||
|
line-height: 20px;
|
||||||
|
margin: 0 0 1.5em;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
FIELDSET.elementEdit .thumb {
|
FIELDSET.elementEdit .thumb {
|
||||||
display: block;
|
display: block;
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -787,7 +793,7 @@ UL.thumbnails SPAN.wrap2 {
|
||||||
#themesContent H3 {font-size:16px; text-align:left; border-bottom:1px solid #444; letter-spacing:1px; margin:5px;}
|
#themesContent H3 {font-size:16px; text-align:left; border-bottom:1px solid #444; letter-spacing:1px; margin:5px;}
|
||||||
.themeBoxes {min-height:0;text-align:left;}
|
.themeBoxes {min-height:0;text-align:left;}
|
||||||
|
|
||||||
h2 { letter-spacing:2px; font-weight:bold;}
|
h2 { letter-spacing:1px; font-weight:bold;}
|
||||||
h2:lang(en) { text-transform:capitalize; }
|
h2:lang(en) { text-transform:capitalize; }
|
||||||
|
|
||||||
#pluginsMenuSeparator {width:80%; margin:5px auto;}
|
#pluginsMenuSeparator {width:80%; margin:5px auto;}
|
||||||
|
|
|
@ -843,4 +843,7 @@ $lang['Save visits in history for'] = 'Save visits in history for';
|
||||||
$lang['simple visitors'] = 'simple visitors';
|
$lang['simple visitors'] = 'simple visitors';
|
||||||
$lang['registered users'] = 'registered users';
|
$lang['registered users'] = 'registered users';
|
||||||
$lang['administrators'] = 'administrators';
|
$lang['administrators'] = 'administrators';
|
||||||
|
$lang['This album contains %d photos, added on %s.'] = 'This album contains %d photos, added on %s.';
|
||||||
|
$lang['This album contains %d photos, added between %s and %s.'] = 'This album contains %d photos, added between %s and %s.';
|
||||||
|
$lang['This album contains no photo.'] = 'This album contains no photo.';
|
||||||
?>
|
?>
|
|
@ -856,4 +856,7 @@ $lang['Save visits in history for'] = 'Historiser les visites des ';
|
||||||
$lang['simple visitors'] = 'simple visiteurs';
|
$lang['simple visitors'] = 'simple visiteurs';
|
||||||
$lang['registered users'] = 'utilisateurs enregistrés';
|
$lang['registered users'] = 'utilisateurs enregistrés';
|
||||||
$lang['administrators'] = 'administrateurs';
|
$lang['administrators'] = 'administrateurs';
|
||||||
|
$lang['This album contains %d photos, added on %s.'] = 'Cet album contient %d photos, ajoutées le %s.';
|
||||||
|
$lang['This album contains %d photos, added between %s and %s.'] = 'Cet album contient %d photos, ajoutées entre le %s et le %s..';
|
||||||
|
$lang['This album contains no photo.'] = 'Cet album ne contient pas de photo.';
|
||||||
?>
|
?>
|
Loading…
Reference in a new issue