1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 20:15:26 +02:00

Only show space dropdown when label has 2+ spaces

This commit is contained in:
HarveyKandola 2019-06-03 17:00:32 +01:00
parent acd3dd63b5
commit 99a5418dba
2 changed files with 14 additions and 11 deletions

View file

@ -45,19 +45,19 @@
<div class="space-label">Unclassified</div>
{{else}}
<div class="space-label" style={{{model.label.bgColor}}}>{{model.label.name}}</div>
<i class="space-label-dropdown dicon {{constants.Icon.ArrowSmallDown}}">
{{#attach-popover class="ember-attacher-popper" hideOn="click clickout" showOn="click" isShown=false placement="bottom-middle"}}
<ul class="menu">
{{#each model.folders as |space|}}
{{#if (eq space.labelId model.label.id)}}
{{#if (gt model.labelSpaces.length 1)}}
<i class="space-label-dropdown dicon {{constants.Icon.ArrowSmallDown}}">
{{#attach-popover class="ember-attacher-popper" hideOn="click clickout" showOn="click" isShown=false placement="bottom-middle"}}
<ul class="menu">
{{#each model.labelSpaces as |space|}}
{{#if (not-eq space.id model.folder.id)}}
{{#link-to "folder.index" space.id space.slug class="item"}}{{space.name}}{{/link-to}}
{{/if}}
{{/if}}
{{/each}}
</ul>
{{/attach-popover}}
</i>
{{/each}}
</ul>
{{/attach-popover}}
</i>
{{/if}}
{{/if}}
{{layout/logo-heading