1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-30 10:39:44 +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,
documentId: docId,
categoryId: l.get('id')
}
};
toLink.push(t);
});
@ -80,7 +80,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
folderId: folderId,
documentId: docId,
categoryId: l.get('id')
}
};
toUnlink.pushObject(t);
});

View file

@ -31,6 +31,14 @@
.documents-list {
margin-bottom: 50px;
> .caption {
text-transform: uppercase;
color: $color-gray;
font-weight: bold;
font-size: 1.0rem;
margin: 0 0 10px 0;
}
.document-item {
margin: 0 0 25px 0;
padding: 25px 15px;
@ -133,10 +141,39 @@
}
}
.category-filter {
margin-bottom: 30px;
> .selected {
@extend .button-nav;
.space-filter {
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)}}
<div class="documents-list">
<div class="caption">Documents</div>
{{#each documents key="id" as |document|}}
<div id="document-{{document.id}}">
<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')}}>
<h1 class="space-name">{{folder.name}}</h1>
<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>
{{else}}

View file

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