1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 21:15:24 +02:00

Spaces view

This commit is contained in:
Harvey Kandola 2018-05-23 15:57:30 +01:00
parent 95323c90ee
commit a453052087
7 changed files with 88 additions and 94 deletions

View file

@ -36,8 +36,6 @@
<div class="dropdown-menu" aria-labelledby="top-nav-hamburger">
{{#if (eq appMeta.edition 'Community')}}
{{#link-to "folders" class="dropdown-item"}}Spaces{{/link-to}}
{{#link-to "folders" class="dropdown-item"}}Spaces{{/link-to}}
{{#link-to "folders" class="dropdown-item"}}Spaces{{/link-to}}
{{/if}}
{{#if (eq appMeta.edition 'Enterprise')}}
{{#link-to "folders" class="dropdown-item"}}Spaces{{/link-to}}

View file

@ -1,49 +1,39 @@
<div class="container">
<div class="row">
<div class="col">
<div class="mt-4 mb-5">
<div class="view-spaces">
<div class="heading">EVERYONE <div class="counter">({{publicFolders.length}})</div></div>
{{#unless hasPublicFolders}}
<p class="empty">No global spaces</p>
{{/unless}}
<ul class="list clearfix">
{{#each publicFolders as |folder|}}
{{#link-to 'folder.index' folder.id folder.slug}}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
<div class="view-spaces">
<div class="heading">EVERYONE <div class="counter">({{publicFolders.length}})</div></div>
{{#unless hasPublicFolders}}
<p class="empty">No global spaces</p>
{{/unless}}
<ul class="list clearfix">
{{#each publicFolders as |folder|}}
{{#link-to 'folder.index' folder.id folder.slug}}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
{{#if session.authenticated}}
<div class="heading">TEAM <div class="counter">({{protectedFolders.length}})</div></div>
{{#unless hasProtectedFolders}}
<p class="empty">No team spaces</p>
{{/unless}}
<ul class="list clearfix">
{{#each protectedFolders as |folder|}}
{{#link-to 'folder.index' folder.id folder.slug}}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
{{#if session.authenticated}}
<div class="heading">TEAM <div class="counter">({{protectedFolders.length}})</div></div>
{{#unless hasProtectedFolders}}
<p class="empty">No team spaces</p>
{{/unless}}
<ul class="list clearfix">
{{#each protectedFolders as |folder|}}
{{#link-to 'folder.index' folder.id folder.slug}}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
<div class="heading">PERSONAL <div class="counter">({{privateFolders.length}})</div></div>
{{#unless hasPrivateFolders}}
<p class="empty">No personal spaces</p>
{{/unless}}
<ul class="list clearfix">
{{#each privateFolders as |folder|}}
{{#link-to 'folder.index' folder.id folder.slug}}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
{{/if}}
</div>
</div>
</div>
</div>
<div class="heading">PERSONAL <div class="counter">({{privateFolders.length}})</div></div>
{{#unless hasPrivateFolders}}
<p class="empty">No personal spaces</p>
{{/unless}}
<ul class="list clearfix">
{{#each privateFolders as |folder|}}
{{#link-to 'folder.index' folder.id folder.slug}}
<li class="item">{{ folder.name }}</li>
{{/link-to}}
{{/each}}
</ul>
{{/if}}
</div>

View file

@ -1,40 +1,34 @@
{{#toolbar/t-toolbar}}
{{#toolbar/t-links selectItem="spaces"}}
{{/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>
{{#if session.isEditor}}
<button type="button" class="btn btn-success font-weight-bold my-3" 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="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 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>
</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>
{{/if}}
{{/toolbar/t-actions}}
{{/toolbar/t-toolbar}}
</div>
</div>
{{/if}}