1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 07:39:43 +02:00
documize/gui/app/templates/components/folder/space-view.hbs
2018-12-12 13:35:16 +00:00

35 lines
No EOL
1.3 KiB
Handlebars

<div class="view-space">
<div class="filter-caption mt-4">{{documents.length}} documents</div>
<ul class="tabnav-control tabnav-control-centered w-75">
<li class="tab tab-vertical {{if spaceSelected "selected"}}" {{action "onDocumentFilter" "space" space.id}}>All ({{documents.length}})</li>
{{#if hasCategories}}
{{#if (gt rootDocCount 0)}}
<li class="tab tab-vertical text-truncate {{if uncategorizedSelected "selected"}}" {{action "onDocumentFilter" "uncategorized" space.id}}>Uncategorized ({{rootDocCount}})</li>
{{/if}}
{{/if}}
</ul>
</div>
<div class="view-space">
<div class="filter-caption mt-5">
{{categories.length}}
{{#if (gt categories.length 1) }}
categories
{{else if (eq categories.length 0) }}
categories
{{else}}
category
{{/if}}
</div>
<ul class="tabnav-control tabnav-control-centered w-75">
{{#each categories as |cat|}}
<li class="tab tab-vertical text-truncate {{if cat.selected "selected"}}" {{action "onDocumentFilter" "category" cat.id}}>{{cat.category}} ({{cat.docCount}})</li>
{{/each}}
</ul>
{{#if spaceSettings}}
<div class="text-center {{if (gt categories.length 0) "mt-4"}}">
{{#link-to "folder.settings" space.id space.slug (query-params tab="categories") class="btn btn-secondary bold-700"}}{{categoryLinkName}}{{/link-to}}
</div>
{{/if}}
</div>