mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
fixes #235, show/hide edit/caddie/representative icons on index.php or picture.php
This commit is contained in:
30
picture.php
30
picture.php
@@ -797,7 +797,7 @@ if ($conf['picture_metadata_icon'])
|
||||
// admin links
|
||||
if (is_admin())
|
||||
{
|
||||
if (isset($page['category']))
|
||||
if (isset($page['category']) and $conf['picture_representative_icon'])
|
||||
{
|
||||
$template->assign(
|
||||
array(
|
||||
@@ -808,19 +808,23 @@ if (is_admin())
|
||||
);
|
||||
}
|
||||
|
||||
$url_admin =
|
||||
get_root_url().'admin.php?page=photo-'.$page['image_id']
|
||||
.(isset($page['category']) ? '&cat_id='.$page['category']['id'] : '')
|
||||
;
|
||||
if ($conf['picture_edit_icon'])
|
||||
{
|
||||
$url_admin =
|
||||
get_root_url().'admin.php?page=photo-'.$page['image_id']
|
||||
.(isset($page['category']) ? '&cat_id='.$page['category']['id'] : '')
|
||||
;
|
||||
|
||||
$template->assign(
|
||||
array(
|
||||
'U_CADDIE' => add_url_params($url_self,
|
||||
array('action'=>'add_to_caddie')
|
||||
),
|
||||
'U_PHOTO_ADMIN' => $url_admin,
|
||||
)
|
||||
);
|
||||
$template->assign('U_PHOTO_ADMIN', $url_admin);
|
||||
}
|
||||
|
||||
if ($conf['picture_caddie_icon'])
|
||||
{
|
||||
$template->assign(
|
||||
'U_CADDIE',
|
||||
add_url_params($url_self, array('action'=>'add_to_caddie'))
|
||||
);
|
||||
}
|
||||
|
||||
$template->assign('available_permission_levels', get_privacy_level_options());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user