related to #1644 Conform UI for linked albums

This commit is contained in:
Matthieu Leproux
2022-09-20 16:09:40 +02:00
parent f3e34767fd
commit fb197e6a3e
2 changed files with 2 additions and 2 deletions

View File

@@ -374,7 +374,7 @@ while ($row = pwg_db_fetch_assoc($result))
$template->assign('STORAGE_CATEGORY', $name);
}
$related_categories[$row['category_id']] = array('name' => $name, 'isVirtual' => !isset($row['dir']));
$related_categories[$row['category_id']] = array('name' => $name, 'unlinkable' => $row['category_id'] != $storage_category_id);
$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['name']}</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['unlinkable']}<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>