1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 07:09:43 +02:00
documize/gui/app/templates/components/toolbar/for-spaces.hbs
2018-01-24 13:23:11 +00:00

41 lines
2 KiB
Handlebars

{{#toolbar/t-toolbar}}
{{#toolbar/t-links}}
{{#link-to "folders" class="link selected" tagName="li"}}Spaces{{/link-to}}
{{/toolbar/t-links}}
{{#toolbar/t-actions}}
{{#if session.isEditor}}
<button type="button" class="btn btn-success font-weight-bold" data-toggle="modal" data-target="#add-space-modal" data-backdrop="static">+ SPACE</button>
<div class="modal" tabindex="-1" role="dialog" id="add-space-modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">Add Space</div>
<div class="modal-body">
<form onsubmit={{action 'onAddSpace'}}>
<div class="form-group">
<label for="new-space-name">Space Name</label>
{{input type='text' id="new-space-name" class="form-control mousetrap" placeholder="Space name" value=spaceName}}
<small id="emailHelp" class="form-text text-muted">Characters and numbers only</small>
</div>
<div class="form-group">
<label for="clone-space-dropdown">Clone Space</label>
{{ui-select id="clone-space-dropdown" content=spaces prompt="select space" action=(action 'onCloneSpaceSelect') optionValuePath="id" optionLabelPath="name" selection=clonedSpace}}
<small id="emailHelp" class="form-text text-muted">Copy templates, permissions, documents from existing space</small>
<div class="margin-top-10" />
{{#if hasClone}}
{{#ui/ui-checkbox selected=copyTemplate}}Copy templates{{/ui/ui-checkbox}}
{{#ui/ui-checkbox selected=copyPermission}}Copy permissions{{/ui/ui-checkbox}}
{{#ui/ui-checkbox selected=copyDocument}}Copy documents{{/ui/ui-checkbox}}
{{/if}}
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" onclick={{action 'onAddSpace'}}>Add</button>
</div>
</div>
</div>
</div>
{{/if}}
{{/toolbar/t-actions}}
{{/toolbar/t-toolbar}}