update: simplify dom for circles

This commit is contained in:
Jean-Baptiste Pasquier 2019-10-29 15:48:37 +01:00
parent c50e05530e
commit 4aa69a1605
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
3 changed files with 107 additions and 115 deletions

View File

@ -1,16 +1,9 @@
.content-box.full-width
sib-display.content-box__header(
.chat-view
sib-chat(
data-authentication='login',
data-auto-login='true',
data-bosh-service-url=`${xmpp}`,
data-debug='false',
data-locales-url='en',
bind-resources
fields='name'
class-name='name'
)
.chat-view
sib-chat(
data-authentication='login',
data-auto-login='true',
data-bosh-service-url=`${xmpp}`,
data-debug='false',
data-locales-url='en',
bind-resources
)
)

View File

@ -1,99 +1,87 @@
.content-box.full-width.with-form
sib-router(default-route='circle-profile')
sib-route(name='circle-profile')
sib-route(name='circle-edit')
sib-router(default-route='circle-profile')
sib-route(name='circle-profile')
sib-route(name='circle-edit')
#circle-profile(hidden)
include templates/hd-circle-team.pug
div.content-box__header.with-edit
sib-ac-checker(permission='acl:Read', bind-resources)
sib-display(
bind-resources
fields='name, description'
#circle-profile(hidden)
include templates/hd-circle-team.pug
.content-box__info
sib-ac-checker.circle-edit-button(permission='acl:Write', bind-resources)
sib-link(class="right-btn", next="circle-edit", bind-resources) Edit and add Members
class-name='name'
class-description='description'
)
sib-display.block(
bind-resources
fields='creationDateSet(title, creationDate)'
sib-ac-checker.content-box__info(permission='acl:Read', bind-resources)
sib-ac-checker.circle-edit-button(permission='acl:Write', bind-resources)
sib-link(class="right-btn", next="circle-edit", bind-resources) Edit and add Members
sib-display.block(
bind-resources
fields='creationDateSet(title, creationDate)'
value-title='Creation date:'
widget-creationDate='sib-display-date'
)
h2(name="label-team") Members:
//- TODO: sib-ac-checker unworking - https://git.happy-dev.fr/startinblox/framework/sib-core/issues/517
//- sib-ac-checker(permission='acl:Write', bind-resources, nested-field='team')
sib-form.block.team-form(
bind-resources
nested-field='members'
fields='user'
range-user=`${endpoints.users}`
class-user='team form-label is-dark'
label-user=''
widget-user='sib-form-auto-completion'
submit-button='Add a member'
)
sib-display.block(
bind-resources
fields='team'
multiple-team=''
widget-team='circle-team-template'
)
sib-ac-checker(permission='acl:Delete', bind-resources)
sib-delete(
bind-resources
data-label='Delete Circle'
class='right-btn reversed-btn'
)
sib-widget(name='join-leave-circle-button')
template
sib-ac-checker(
permission="acl:Delete"
data-src="${value['@id']}"
)
sib-delete(
data-src="${value['@id']}"
data-label='Leave circle'
)
sib-display(
bind-resources
fields='members'
multiple-members=''
widget-members='join-leave-circle-button'
)
sib-form.block.team-form(
bind-resources
nested-field='members'
fields='user'
label-user=''
range-user=`${endpoints.users}`
widget-user='sib-form-dropdown'
set-user-id-select="user"
submit-button='Join Circle'
)
value-title='Creation date:'
widget-creationDate='sib-display-date'
)
#circle-edit(hidden)
include page-circle-edit.pug
h2(name="label-team") Members:
//- TODO: sib-ac-checker unworking - https://git.happy-dev.fr/startinblox/framework/sib-core/issues/517
//- sib-ac-checker(permission='acl:Write', bind-resources, nested-field='team')
sib-form.block.team-form(
bind-resources
nested-field='members'
fields='user'
range-user=`${endpoints.users}`
class-user='team form-label is-dark'
label-user=''
widget-user='sib-form-auto-completion'
submit-button='Add a member'
)
sib-display.block(
bind-resources
fields='team'
multiple-team=''
widget-team='circle-team-template'
)
sib-ac-checker(permission='acl:Delete', bind-resources)
sib-delete(
bind-resources
data-label='Delete Circle'
class='right-btn reversed-btn'
)
sib-widget(name='join-leave-circle-button')
template
sib-ac-checker(
permission="acl:Delete"
data-src="${value['@id']}"
)
sib-delete(
data-src="${value['@id']}"
data-label='Leave circle'
)
sib-display(
bind-resources
fields='members'
multiple-members=''
widget-members='join-leave-circle-button'
)
sib-form.block.team-form(
bind-resources
nested-field='members'
fields='user'
label-user=''
range-user=`${endpoints.users}`
widget-user='sib-form-dropdown'
set-user-id-select="user"
submit-button='Join Circle'
)
#circle-edit(hidden)
include page-circle-edit.pug

View File

@ -1,10 +1,21 @@
.views-container
#circle-chat(hidden)
include page-circle-chat.pug
#circle-information(hidden)
include page-circle-profile.pug
//-#circle-create
include page-circle-create.pug
.content-box.full-width.with-form
div.content-box__header.with-edit
sib-ac-checker(permission='acl:Read', bind-resources)
sib-display(
bind-resources
fields='name, description'
class-name='name'
class-description='description'
)
div.content-box__info
sib-ac-checker(permission='acl:Read', bind-resources)
#circle-chat(hidden)
include page-circle-chat.pug
#circle-information(hidden)
include page-circle-profile.pug
nav.jsRightMenu(role='navigation')
sib-router(default-route='circle-chat')
ul