1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-25 08:09:43 +02:00
documize/gui/app/templates/components/customize/space-admin.hbs
2018-12-08 20:54:19 +00:00

60 lines
2.4 KiB
Handlebars

<div class="row">
<div class="col">
<div class="view-customize">
<h1 class="admin-heading">Manage Spaces</h1>
<h2 class="sub-heading">Delete spaces, take ownership of shared spaces and orphaned spaces</h2>
</div>
</div>
</div>
<div class="view-customize my-5">
{{#if spaces}}
<button type="button" class="btn btn-success" onclick={{action "onExport"}}>Export content</button>
<div class="space-list">
{{#each spaces as |space|}}
<div class="space row">
<div class="col-12 col-sm-8">
{{#link-to "folder" space.id space.slug class="alt"}}{{space.name}}{{/link-to}}
</div>
<div class="col-12 col-sm-4 text-right">
<div id="space-ownership-button-{{space.id}}" class="button-icon-gray align-middle" {{action "onOwner" space.id}}>
<i class="material-icons" data-toggle="modal">person_add</i>
{{#attach-tooltip showDelay=1000}}Add myself as space owner{{/attach-tooltip}}
</div>
<div class="button-icon-gap" />
<div id="space-delete-button-{{space.id}}" class="button-icon-danger align-middle" {{action "onShow" space.id}}>
<i class="material-icons" data-toggle="modal" data-target="#space-delete-modal" data-backdrop="static">delete</i>
{{#attach-tooltip showDelay=1000}}Delete space and all content{{/attach-tooltip}}
</div>
</div>
</div>
{{/each}}
</div>
<div id="space-delete-modal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">Space Deletion</div>
<div class="modal-body">
<form onsubmit={{action "onDelete"}}>
<p>Are you sure you want to delete this space and all documents?</p>
<div class="form-group">
<label for="delete-space-name">Please type space name to confirm</label>
{{input type="text" id="delete-space-name" class="form-control mousetrap" placeholder="Space name" value=deleteSpace.name}}
<small class="form-text text-muted">This will delete all documents and templates within this space!</small>
</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-danger" onclick={{action "onDelete"}}>Delete</button>
</div>
</div>
</div>
</div>
{{else}}
<p>There are no shared spaces to manage</p>
{{/if}}
</div>