mirror of
https://github.com/documize/community.git
synced 2025-07-23 23:29:42 +02:00
Move add section into section toolbar
This commit is contained in:
parent
0707bdd3d6
commit
c69020f1e6
6 changed files with 32 additions and 34 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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}}
|
||||
{{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}}
|
||||
{{/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}}
|
||||
|
||||
{{#if canEdit}}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{{#if categories}}
|
||||
{{#each categories as |cat|}}
|
||||
{{#if cat}}
|
||||
<div class="category">
|
||||
<i class="dicon {{constants.Icon.Category}}" />
|
||||
<div class="name">{{cat}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{/if}}
|
Loading…
Add table
Add a link
Reference in a new issue