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
+3 -2
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'];
}
@@ -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>
+2 -1
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;