Issue #2037 Display new icon-cone on dashboard and album manager

This commit is contained in:
Willy "Linty
2023-11-10 17:53:52 +01:00
parent ee98f408a2
commit f98ba25555
5 changed files with 28 additions and 3 deletions

View File

@@ -148,7 +148,7 @@ $template->assign("POS_PREF", $conf['newcat_default_position']); //TODO use user
//Get all albums
$query = '
SELECT id,name,`rank`,status, uppercats, lastmodified
SELECT id,name,`rank`,status, visible, uppercats, lastmodified
FROM '.CATEGORIES_TABLE.'
;';
@@ -201,6 +201,7 @@ function assocToOrderedTree($assocT)
$orderedCat['name'] = $cat['cat']['name'];
$orderedCat['status'] = $cat['cat']['status'];
$orderedCat['id'] = $cat['cat']['id'];
$orderedCat['visible'] = $cat['cat']['visible'];
$orderedCat['nb_images'] = isset($nb_photos_in[$cat['cat']['id']]) ? $nb_photos_in[$cat['cat']['id']] : 0;
$orderedCat['last_updates'] = $cat['cat']['lastmodified'];
$orderedCat['has_not_access'] = isset($is_forbidden[$cat['cat']['id']]);

View File

@@ -160,7 +160,7 @@ if (!empty($category['id_uppercat']))
}
// We show or hide this warning in JS
$page['warnings'][] = l10n('This album is currently locked, visible only to administrators.').'<span class="icon-key unlock-album">'.l10n('Unlock it').'</span>';
$page['warnings'][] = l10n('This album is currently locked, visible only to administrators.').'<span class="icon-cone unlock-album">'.l10n('Unlock it').'</span>';
$template->assign(
array(

View File

@@ -73,6 +73,24 @@ if ($nb_orphans > 0)
$page['warnings'][] = $message;
}
// locked album ?
$query = '
SELECT COUNT(*)
FROM '.CATEGORIES_TABLE.'
WHERE visible =\'false\'
;';
list($locked_album) = pwg_db_fetch_row(pwg_query($query));
if ($locked_album > 0)
{
$locked_album_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&section=visible';
$message = '<a href="'.$locked_album_url.'"><i class="icon-cone"></i>';
$message.= l10n('Locked album').'</a>';
$message.= '<span class="adminMenubarCounter">'.$locked_album.'</span>';
$page['warnings'][] = $message;
}
fs_quick_check();
// +-----------------------------------------------------------------------+

View File

@@ -307,7 +307,12 @@ function createAlbumNode(node, li) {
node.status = 'private';
title += 'icon-lock';
}
title += '"><p class="move-cat-title" title="'+node.name+'">%name%</p> <span class="icon-pencil"></span> </span>';
title += '">';
if (node.visible == 'false' || node.parent.visble == 'false') {
node.visble = 'false';
title += '<span class="tiptip icon-cone" title="'+ tiptip_locked_album +'" style="font-size: 16px"></span>';
}
title += '<p class="move-cat-title" title="'+node.name+'">%name%</p> <span class="icon-pencil"></span> </span>';
toggler_cont = "<div class='move-cat-toogler' data-id=%id%>%content%</div>";
toggler_close = "<span class='icon-left-open'></span>";
toggler_open = "<span class='icon-down-open'></span>";

View File

@@ -49,6 +49,7 @@ str_album_name_empty = '{'Album name must not be empty'|@translate|escape:javasc
const add_album_root_title = '{'Create a new album at root'|@translate|escape:javascript}';
const add_sub_album_of = '{'Create a sub-album of "%s"'|@translate|escape:javascript}';
const tiptip_locked_album = "{'Locked album'|translate|escape:javascript}";
{/footer_script}
{combine_script id='jquery.tipTip' load='footer' path='themes/default/js/plugins/jquery.tipTip.minified.js'}