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

Move add section into section toolbar

This commit is contained in:
sauls8t 2019-01-23 15:46:27 +00:00
parent 0707bdd3d6
commit c69020f1e6
6 changed files with 32 additions and 34 deletions

View file

@ -45,7 +45,6 @@ export default Component.extend(ModalMixin, Notifer, {
// get categories
this.get('categorySvc').getAll(this.get('space.id')).then((c) => {
this.set('category', c);
// get summary of documents and users for each category in space
this.get('categorySvc').getSummary(this.get('space.id')).then((s) => {
c.forEach((cat) => {

View file

@ -47,12 +47,20 @@
width: 5px;
display: inline-block;
}
> i.add-section {
color: map-get($yellow-shades, 500);
&:hover {
color: map-get($yellow-shades, 700);
}
}
}
}
.start-section {
@extend .no-select;
text-align: right;
text-align: center;
margin: 0.5rem 0;
display: block;

View file

@ -28,7 +28,8 @@
onDeletePage=(action "onDeletePage")
onSavePageAsBlock=(action "onSavePageAsBlock")
onPageLevelChange=(action onPageLevelChange)
onPageSequenceChange=(action onPageSequenceChange)}}
onPageSequenceChange=(action onPageSequenceChange)
onShowSectionWizard=(action onShowSectionWizard)}}
<div class="wysiwyg">
{{section/base-renderer page=page}}

View file

@ -12,6 +12,10 @@
<div class="section-heading no-print" id="page-toolbar-{{ page.id }}">
<div class="section-toolbar">
{{#if canEdit}}
<i class="add-section dicon {{constants.Icon.Plus}}" {{action "onShowSectionWizard" page}}>
{{#attach-tooltip showDelay=1000}}Insert section above{{/attach-tooltip}}
</i>
<div class="gap"/>
<i class="dicon {{constants.Icon.Edit}}" {{action "onEdit"}} />
{{/if}}
{{#if hasMenuPermissions}}

View file

@ -1,14 +1,6 @@
{{#if hasPages}}
{{#each pages key="id" as |item|}}
{{#if canEdit}}
<div class="start-section">
<i class="dicon {{constants.Icon.Plus}}" {{action "onShowSectionWizard" item.page}}>
{{#attach-tooltip showDelay=1000}}Insert section here{{/attach-tooltip}}
</i>
</div>
{{else}}
{{ui/ui-spacer size=100}}
{{/if}}
{{ui/ui-spacer size=100}}
{{document/document-page
roles=roles
pages=pages
@ -27,17 +19,9 @@
onDeletePage=(action "onDeletePage")
onSavePageAsBlock=(action "onSavePageAsBlock")
onPageLevelChange=(action onPageLevelChange)
onPageSequenceChange=(action onPageSequenceChange)}}
onPageSequenceChange=(action onPageSequenceChange)
onShowSectionWizard=(action "onShowSectionWizard")}}
{{/each}}
{{#if canEdit}}
<div class="start-section">
<i class="dicon {{constants.Icon.Plus}}" {{action "onShowSectionWizard"}}>
{{#attach-tooltip showDelay=1000}}Insert section here{{/attach-tooltip}}
</i>
</div>
{{/if}}
{{#if showLikes}}
<div class="vote-box no-print">
{{#if voteThanks}}
@ -53,14 +37,14 @@
{{/if}}
</div>
{{/if}}
{{else}}
{{#if canEdit}}
<div class="start-section">
<i class="dicon {{constants.Icon.Plus}}" {{action "onShowSectionWizard"}}>
{{#attach-tooltip showDelay=1000}}Insert section here{{/attach-tooltip}}
</i>
</div>
{{/if}}
{{/if}}
{{#if canEdit}}
<div class="start-section">
<i class="dicon {{constants.Icon.Plus}}" {{action "onShowSectionWizard"}}>
{{#attach-tooltip showDelay=1000}}Insert section here{{/attach-tooltip}}
</i>
</div>
{{/if}}
{{#if canEdit}}

View file

@ -1,8 +1,10 @@
{{#if categories}}
{{#each categories as |cat|}}
<div class="category">
<i class="dicon {{constants.Icon.Category}}" />
<div class="name">{{cat}}</div>
</div>
{{#if cat}}
<div class="category">
<i class="dicon {{constants.Icon.Category}}" />
<div class="name">{{cat}}</div>
</div>
{{/if}}
{{/each}}
{{/if}}