Categories
Sub-divide spaces and secure document access with categories
{{#each category as |cat|}}
{{#if cat.editMode}}
{{focus-input id=(concat 'edit-category-' cat.id) type="text" value=cat.category class="input-inline"}}
{{else}}
{{cat.category}}
{{cat.documents}} {{if (eq cat.documents 1) 'document' 'documents' }}, {{cat.users}} {{if (eq cat.users 1) 'person' 'people' }}
{{/if}}
{{#if cat.editMode}}
close
{{else}}
person
edit
delete
{{#dropdown-dialog target=(concat 'delete-category-' cat.id) position="bottom right" button="Delete" color="flat-red" onAction=(action 'onDelete' cat.id)}}

Are you sure you want to delete category {{cat.category}}?

{{/dropdown-dialog}}
{{/if}}
{{else}}
No categories defined yet
{{/each}}
Provide a short name
{{focus-input id="new-category-name" type="text" value=newCategory}}
add