diff --git a/web/frontend/src/Job.root.svelte b/web/frontend/src/Job.root.svelte index 8216ed0..17588fb 100644 --- a/web/frontend/src/Job.root.svelte +++ b/web/frontend/src/Job.root.svelte @@ -326,13 +326,13 @@ - - {#if $initq.data} - - {/if} - + {#if $initq.data} + + + + {/if}
diff --git a/web/frontend/src/job/TagManagement.svelte b/web/frontend/src/job/TagManagement.svelte index d3d343e..f358c71 100644 --- a/web/frontend/src/job/TagManagement.svelte +++ b/web/frontend/src/job/TagManagement.svelte @@ -186,81 +186,130 @@ {/if} - - - - Search using "type: name". If no tag matches your search, a - button for creating a new one will appear. - -
-
    - {#each allTagsFiltered as tag} - - - - - {#if pendingChange === tag.id} - - {:else if job.tags.find((t) => t.id == tag.id)} - - {:else} - - {/if} - - + + + + + + + Search using "type: name". If no tag matches your search, a + button for creating a new one will appear. + + + +
    + {#if usedTagsFiltered.length > 0} + + {#each usedTagsFiltered as utag} + + + + + {#if pendingChange === utag.id} + + {:else} + + {/if} + + + {/each} + + {:else if filterTerm !== ""} + + + No attached tags matching. + + {:else} - - No tags matching - - {/each} -
-
+ + + Job has no attached tags. + + + {/if} + + {#if unusedTagsFiltered.length > 0} + + {#each unusedTagsFiltered as uutag} + + + + + {#if pendingChange === uutag.id} + + {:else} + + {/if} + + + {/each} + + {:else if filterTerm !== ""} + + + No unused tags matching. + + + {:else} + + + No unused tags available. + + + {/if} + + {#if newTagType && newTagName && isNewTag(newTagType, newTagName)} -
- - {#if roles && authlevel >= roles.admin} - + Add new tag: + + + + {#if isAdmin} + + + + + + + {/if} -
- {:else if allTagsFiltered.length == 0} - Search Term is not a valid Tag (type: name) +
+ {:else if filterTerm !== "" && allTagsFiltered.length == 0} + + Search Term is not a valid Tag (type: name) + + {:else if filterTerm == "" && unusedTagsFiltered.length == 0} + + Type "type: name" into the search field to create a new tag. + {/if} @@ -271,6 +320,7 @@ + {:else} @@ -399,9 +449,8 @@ {/if}