related to #1644 Added UI and translation lines for physically linked album list

This commit is contained in:
Matthieu Leproux
2022-09-19 17:25:24 +02:00
parent 4fee0544b7
commit ddaef775cf
5 changed files with 8 additions and 4 deletions

View File

@@ -350,7 +350,7 @@ $template->assign(
// categories
$query = '
SELECT category_id, uppercats
SELECT category_id, uppercats, dir
FROM '.IMAGE_CATEGORY_TABLE.' AS ic
INNER JOIN '.CATEGORIES_TABLE.' AS c
ON c.id = ic.category_id
@@ -373,7 +373,8 @@ while ($row = pwg_db_fetch_assoc($result))
{
$template->assign('STORAGE_CATEGORY', $name);
}
$related_categories[$row['category_id']] = $name;
$related_categories[$row['category_id']] = array('name' => $name, 'isVirtual' => !isset($row['dir']));
$related_categories_ids[] = $row['category_id'];
}

View File

@@ -187,7 +187,7 @@ $('#action-delete-picture').on('click', function() {
</select>
<div class="related-categories-container">
{foreach from=$related_categories item=$cat_path key=$key}
<div class="breadcrumb-item"><span class="link-path">{$cat_path}</span><span id={$key} class="icon-cancel-circled remove-item"></span></div>
<div class="breadcrumb-item"><span class="link-path">{$cat_path['name']}</span>{if $cat_path['isVirtual']}<span id={$key} class="icon-cancel-circled remove-item"></span>{else}<span id={$key} class="icon-help-circled help-item tiptip" title="{'This album is physical, it can\'t be unlinked from the picture'|translate}"></span>{/if}</div>
{/foreach}
</div>
<div class="breadcrumb-item linked-albums add-item {if $related_categories|@count < 1 } highlight {/if}"><span class="icon-plus-circled"></span>{'Add'|translate}</div>

View File

@@ -6481,7 +6481,8 @@ color:#FF7B00;
font-weight: 400;
}
.breadcrumb-item .icon-cancel-circled {
.breadcrumb-item .icon-cancel-circled,
.breadcrumb-item .help-item {
margin-left: auto !important;
cursor: pointer;
position: absolute;

View File

@@ -1316,4 +1316,5 @@ $lang['The original picture will be detected with the filename (without extensio
$lang['Delete %s format ?'] = 'Delete %s format ?';
$lang['Installed on %s, %s'] = 'Installed on %s, %s';
$lang['While restoring this plugin, it will be reset to its original parameters and associated data is going to be reset'] = 'While restoring this plugin, it will be reset to its original parameters and associated data is going to be reset';
$lang['This album is physical, it can\'t be unlinked from the picture'] = 'This album is physical, it can\'t be unlinked from the picture';
// Leave this line empty

View File

@@ -1318,4 +1318,5 @@ $lang['The original picture will be detected with the filename (without extensio
$lang['Delete %s format ?'] = 'Supprimer le format %s ?';
$lang['Installed on %s, %s'] = 'Installé le %s, %s';
$lang['While restoring this plugin, it will be reset to its original parameters and associated data is going to be reset'] = 'En restaurant ce plugin, il reviendra à son paramétrage dorigine et les données associées seront remises à zero';
$lang['This album is physical, it can\'t be unlinked from the picture'] = 'Cet album est physique, il ne peut pas être dissocié de l\'image';
// Leave this line empty