1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-30 02:29:43 +02:00

space view labels

This commit is contained in:
Harvey Kandola 2017-10-05 19:33:59 -04:00
parent 604bdf78da
commit b2138d6bdb
5 changed files with 66 additions and 22 deletions

View file

@ -69,7 +69,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
folderId: folderId, folderId: folderId,
documentId: docId, documentId: docId,
categoryId: l.get('id') categoryId: l.get('id')
} };
toLink.push(t); toLink.push(t);
}); });
@ -80,7 +80,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
folderId: folderId, folderId: folderId,
documentId: docId, documentId: docId,
categoryId: l.get('id') categoryId: l.get('id')
} };
toUnlink.pushObject(t); toUnlink.pushObject(t);
}); });

View file

@ -31,6 +31,14 @@
.documents-list { .documents-list {
margin-bottom: 50px; margin-bottom: 50px;
> .caption {
text-transform: uppercase;
color: $color-gray;
font-weight: bold;
font-size: 1.0rem;
margin: 0 0 10px 0;
}
.document-item { .document-item {
margin: 0 0 25px 0; margin: 0 0 25px 0;
padding: 25px 15px; padding: 25px 15px;
@ -133,10 +141,39 @@
} }
} }
.category-filter {
margin-bottom: 30px;
> .selected { .space-filter {
@extend .button-nav; display: inline-block;
margin: 0 30px 30px 0;
> .caption {
text-transform: uppercase;
color: $color-gray;
font-weight: bold;
font-size: 1.0rem;
margin: 0 0 10px 0;
} }
} }
.category-filter {
display: inline-block;
margin: 0 0 30px 0;
> .regular-button {
margin-right: 10px;
}
> .caption {
text-transform: uppercase;
color: $color-gray;
font-weight: bold;
font-size: 1.0rem;
margin: 0 0 10px 0;
}
}
// .category-filter {
// > .selected {
// // @extend .button-nav;
// }
// }

View file

@ -1,5 +1,6 @@
{{#if (gt documents.length 0)}} {{#if (gt documents.length 0)}}
<div class="documents-list"> <div class="documents-list">
<div class="caption">Documents</div>
{{#each documents key="id" as |document|}} {{#each documents key="id" as |document|}}
<div id="document-{{document.id}}"> <div id="document-{{document.id}}">
<div class="document-item {{if document.selected "selected-card"}}"> <div class="document-item {{if document.selected "selected-card"}}">

View file

@ -3,7 +3,9 @@
<div class="space-heading {{if permissions.spaceOwner 'cursor-pointer'}}" onclick={{if permissions.spaceOwner (action 'toggleEdit')}}> <div class="space-heading {{if permissions.spaceOwner 'cursor-pointer'}}" onclick={{if permissions.spaceOwner (action 'toggleEdit')}}>
<h1 class="space-name">{{folder.name}}</h1> <h1 class="space-name">{{folder.name}}</h1>
<div class="space-summary"> <div class="space-summary">
This space contains {{documents.length}} {{if (eq rootDocCount.length 1) 'document' 'documents'}} across {{categories.length}} {{if (eq categories.length 1) 'category' 'categories'}} This space contains {{documents.length}} {{if (eq rootDocCount.length 1) 'document' 'documents'}}
{{if (eq categories.length 1) (concat 'and ' categories.length ' category')}}
{{if (gt categories.length 1) (concat 'and ' categories.length ' categories')}}
</div> </div>
</div> </div>
{{else}} {{else}}

View file

@ -14,24 +14,28 @@
{{else}} {{else}}
{{#if hasCategories}} {{#if hasCategories}}
<div class="category-filter"> {{#if (gt rootDocCount 0)}}
{{#if (gt rootDocCount 0)}} <div class="space-filter">
<div class="regular-button button-white {{if spaceSelected 'selected'}}" <div class="caption">Space</div>
id="uncategorized-button" data-tooltip="Documents without category" data-tooltip-position="top center" <div class="regular-button button-nav {{if spaceSelected 'selected'}}" {{action 'onDocumentFilter' 'space' folder.id}} id="uncategorized-button" data-tooltip="Documents without category" data-tooltip-position="top center">
{{action 'onDocumentFilter' 'space' folder.id}}> <div class="name">{{folder.name}} ({{rootDocCount}})</div>
{{folder.name}} ({{rootDocCount}})
</div> </div>
{{/if}} </div>
{{#each categories as |cat index|}} {{/if}}
<div class="button-gap"/> {{#if (gt categories.length 0)}}
<div class="regular-button button-white {{if cat.selected 'selected'}}" {{action 'onDocumentFilter' 'category' cat.id}}> <div class="category-filter">
{{cat.category}} ({{cat.docCount}}) <div class="caption">Category</div>
</div> {{#each categories as |cat index|}}
{{/each}} <div class="regular-button button-blue {{if cat.selected 'selected'}}" {{action 'onDocumentFilter' 'category' cat.id}}>
</div> {{cat.category}} ({{cat.docCount}})
</div>
<div class="button-gap"/>
{{/each}}
</div>
{{/if}}
{{/if}} {{/if}}
{{folder/documents-list documents=filteredDocs folders=folders folder=folder {{folder/documents-list documents=filteredDocs folders=folders folder=folder
templates=templates permissions=permissions selectedDocuments=(mut selectedDocuments)}} templates=templates permissions=permissions selectedDocuments=(mut selectedDocuments)}}
{{/if}} {{/if}}