feature: right-hand menu for circles

This commit is contained in:
gaelle morin 2020-12-11 21:44:00 +01:00
parent 64a78a927a
commit ebefe0405d
No known key found for this signature in database
GPG Key ID: 028426702B95CF9C
5 changed files with 149 additions and 153 deletions

View File

@ -58,7 +58,7 @@ html(lang="en")
include page-project.pug include page-project.pug
if endpoints.circles || (endpoints.get && endpoints.get.circles) if endpoints.circles || (endpoints.get && endpoints.get.circles)
#circle(hidden, data-view="circle").with-sidebar #circle(hidden, data-view="circle").segment.lg-full.with-sidebar
if (endpoints.post && endpoints.post.circles) && (endpoints.get && endpoints.get.circles) if (endpoints.post && endpoints.post.circles) && (endpoints.get && endpoints.get.circles)
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${endpoints.get.circles}`) hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${endpoints.get.circles}`)
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${endpoints.get.circles}`) hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${endpoints.get.circles}`)

View File

@ -1,45 +1,43 @@
.views-container.sidebar-is-closed .views-container.sidebar-is-closed
.content-box solid-ac-checker(permission='acl:Read', bind-resources)
div.content-box__height #circle-chat(hidden, data-view="circle-chat")
solid-ac-checker(permission='acl:Read', bind-resources) include views/circle/page-circle-chat.pug
#circle-chat(hidden, data-view="circle-chat") #circle-information.content-box__height(hidden, data-view="circle-information")
include views/circle/page-circle-chat.pug include views/circle/page-circle-profile.pug
#circle-information.content-box__height(hidden, data-view="circle-information") #circle-events(hidden, data-view="circle-events")
include views/circle/page-circle-profile.pug include views/circle/page-circle-events.pug
#circle-events(hidden, data-view="circle-events") #circle-resources(hidden, data-view="circle-resources")
include views/circle/page-circle-events.pug include views/circle/page-circle-resources.pug
#circle-resources(hidden, data-view="circle-resources") #circle-polls(hidden, data-view="circle-polls")
include views/circle/page-circle-resources.pug include views/circle/page-circle-polls.pug
#circle-polls(hidden, data-view="circle-polls")
include views/circle/page-circle-polls.pug
nav.jsRightMenu(role='navigation') nav.jsRightMenu(role='navigation')
solid-router.text-color-heading.reverse.text-bold(default-route='circle-chat') solid-router.text-color-heading.text-bold(default-route='circle-chat')
ul ul
li.segment.padding-small.text-right.jsOffsiteToggle li.segment.padding-small.text-right.text-normal.jsOffsiteToggle
span.icon.icon-arrow-right.xxsmall.icon-margin-right-xxsmall span.icon.icon-arrow-right.xxsmall.margin-right-xxsmall
a(data-trans='circle.menuRight.fold') a(data-trans='circle.menuRight.fold')
solid-route(name='circle-chat') solid-route(name='circle-chat')
li.segment.padding-large li.segment.padding-medium
span.icon.ci-chat.large.icon-margin-right span.icon.ci-chat.icon-xlarge.margin-right-small
a(data-trans='circle.menuRight.chat') a(data-trans='circle.menuRight.chat')
solid-route(name='circle-information') solid-route(name='circle-information')
li.segment.padding-large li.segment.padding-medium
span.icon.ci-information.large.icon-margin-right .icon.ci-information.icon-xlarge.margin-right-small
a(data-trans='circle.menuRight.information') a(data-trans='circle.menuRight.information')
if (endpoints.resources || (endpoints.get && endpoints.get.resources)) && (endpoints.resourceskeywords || (endpoints.get && endpoints.get.resourceskeywords)) && (endpoints.resourcestypes || (endpoints.get && endpoints.get.resourcestypes)) if (endpoints.resources || (endpoints.get && endpoints.get.resources)) && (endpoints.resourceskeywords || (endpoints.get && endpoints.get.resourceskeywords)) && (endpoints.resourcestypes || (endpoints.get && endpoints.get.resourcestypes))
solid-route(name='circle-resources' use-id) solid-route(name='circle-resources' use-id)
li.segment.padding-large li.segment.padding-medium
span.icon.ci-networking.large.icon-margin-right span.icon.ci-networking.icon-xlarge.margin-right-small
a(data-trans='circle.menuRight.resources') a(data-trans='circle.menuRight.resources')
if (endpoints.events || (endpoints.get && endpoints.get.events)) && (endpoints.typeevents || (endpoints.get && endpoints.get.typeevents)) if (endpoints.events || (endpoints.get && endpoints.get.events)) && (endpoints.typeevents || (endpoints.get && endpoints.get.typeevents))
solid-route(name='circle-events' use-id) solid-route(name='circle-events' use-id)
li.segment.padding-large li.segment.padding-medium
span.icon.ci-networking.large.icon-margin-right span.icon.ci-networking.icon-xlarge.margin-right-small
a(data-trans='circle.menuRight.events') a(data-trans='circle.menuRight.events')
if endpoints.polls || (endpoints.get && endpoints.get.polls) if endpoints.polls || (endpoints.get && endpoints.get.polls)
solid-route(name='circle-polls' use-id) solid-route(name='circle-polls' use-id)
li.segment.padding-large li.segment.padding-medium
span.icon.ci-networking.large.icon-margin-right span.icon.ci-networking.icon-xlarge.margin-right-small
a(data-trans='circle.menuRight.polls') a(data-trans='circle.menuRight.polls')

View File

@ -1,132 +1,132 @@
.content-box.full-width solid-router(default-route='admin-circle-list', hidden)
solid-router(default-route='admin-circle-list', hidden) solid-route(name='admin-circle-list')
solid-route(name='admin-circle-list') solid-route(name='admin-circle-create')
solid-route(name='admin-circle-create') solid-route(name='circle-left')
solid-route(name='circle-left')
#circle-left(hidden, data-view="circle-left")
include ../circle/page-circle-left.pug include ../circle/page-circle-left.pug
#admin-circle-list.content-box__height(hidden, data-view="admin-circle-list") #admin-circle-list(hidden, data-view="admin-circle-list")
include ../../templates/hubl-user-avatar.pug include ../../templates/hubl-user-avatar.pug
solid-widget(name='hubl-circle-owner') solid-widget(name='hubl-circle-owner')
template template
solid-display.segment.margin-left-xlarge.user-thumb( solid-display.segment.margin-left-xlarge.user-thumb(
data-src='${await value}' data-src='${await value}'
fields='account.picture, content(name-and-icon(name), sub(username))' fields='account.picture, content(name-and-icon(name), sub(username))'
class-account.picture='user-thumb-avatar' class-account.picture='user-thumb-avatar'
class-content='user-thumb-content' class-content='user-thumb-content'
class-name-and-icon='user-thumb-content__name-and-icon' class-name-and-icon='user-thumb-content__name-and-icon'
class-name='name' class-name='name'
class-sub='user-thumb-content__sub-text username' class-sub='user-thumb-content__sub-text username'
class-username='' class-username=''
widget-account.picture='hubl-user-avatar' widget-account.picture='hubl-user-avatar'
)
div.segment.padding-top-xsmall.padding-right-large.padding-bottom-xsmall.padding-left-large.border-bottom.border-color-grey.text-color-heading
div
h2.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.list.title')
div.segment.lg-hidden
button.mobile-sidebar-button.jsMobileSidebarOpenButton.icon-arrow-left-circle(data-trans='circle.list.buttonMobile')
div.segment.padding-large
div.segment.margin-bottom-medium.clearfix
div.segment.lg-half.float-left
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='circle.list.subTitle')
div.segment.lg-half.float-left.text-right.padding-top-xxsmall
solid-ac-checker(data-src=`${endpoints.circles || (endpoints.post && endpoints.post.circles)}`, permission='acl:Append')
solid-link(
class='button text-xsmall text-bold text-uppercase reversed color-secondary bordered icon icon-plus'
next='admin-circle-create'
data-trans='circle.list.buttonCreate'
)
.table-wrapper
.table
div.table-header.bg-color-third.text-color-heading
div.table-cell.w280(data-trans='circle.list.tableHeader1')
div.table-cell.w280(data-trans='circle.list.tableHeader2')
div.table-cell.w280(data-trans='circle.list.tableHeader3')
solid-widget(name='hubl-admin-circle-leave-button')
template
solid-delete(
class='button text-xsmall text-bold text-uppercase color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=circle.list.buttonQuit'
)
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}joinable/` target-src='${src}')
hubl-reactivity(bind-user nested-field="circles" target-src='${src}')
if (endpoints.post && endpoints.post.circles) && (endpoints.get && endpoints.get.circles)
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${src}`)
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${src}`)
solid-display(
class='table-body'
bind-user
nested-field='circles'
fields='circle.name, circle.owner, leaveButton'
loader-id='loader-admin-circles'
class-circle.name='table-cell w280 text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline'
class-circle.owner='table-cell w280'
class-leaveButton='table-cell w280'
action-leaveButton="joinButton"
widget-leaveButton="hubl-admin-circle-leave-button"
widget-circle.owner='hubl-circle-owner'
order-by="circle.name"
) )
div.segment.padding-top-xsmall.padding-right-large.padding-bottom-xsmall.padding-left-large.border-bottom.border-color-grey.text-color-heading solid-widget(name='hubl-admin-circle-join-button')
div template
h2.text-uppercase.text-xlarge.text-letter-spacing-large(data-trans='circle.list.title') solid-form(
div.segment.lg-hidden class='button text-xsmall text-bold text-uppercase reversed color-secondary bordered icon icon-arrow-right-circle'
button.mobile-sidebar-button.jsMobileSidebarOpenButton.icon-arrow-left-circle(data-trans='circle.list.buttonMobile') data-src='${value}'
div.segment.padding-large fields='user.username'
div.segment.margin-bottom-medium.clearfix value-user.username='hubl-workaround-493'
div.segment.lg-half.float-left widget-user.username='solid-form-hidden'
h3.text-color-heading.text-semibold.text-letter-spacing-large(data-trans='circle.list.subTitle')
div.segment.lg-half.float-left.text-right.padding-top-xxsmall submit-button='Rejoindre'
solid-ac-checker(data-src=`${endpoints.circles || (endpoints.post && endpoints.post.circles)}`, permission='acl:Append') data-trans='submit-button=circle.list.buttonJoin'
solid-link(
class='button text-xsmall text-bold text-uppercase reversed color-secondary bordered icon icon-plus'
next='admin-circle-create'
data-trans='circle.list.buttonCreate'
) )
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}joinable/` target-src='${value}')
hubl-reactivity(bind-user nested-field="circles" target-src='${value}')
if (endpoints.post && endpoints.post.circles) && (endpoints.get && endpoints.get.circles)
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${value}`)
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${value}`)
.table-wrapper solid-display(
.table class='table-body'
div.table-header.bg-color-third.text-color-heading data-src=`${endpoints.circles || endpoints.get.circles}joinable/`
div.table-cell.w280(data-trans='circle.list.tableHeader1') fields='name, owner, members'
div.table-cell.w280(data-trans='circle.list.tableHeader2') loader-id='loader-admin-circles'
div.table-cell.w280(data-trans='circle.list.tableHeader3')
solid-widget(name='hubl-admin-circle-leave-button') class-name='table-cell w280 text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline'
template class-owner='table-cell w280'
solid-delete( widget-owner='hubl-circle-owner'
class='button text-xsmall text-bold text-uppercase color-secondary bordered'
data-src="${src}"
data-label=''
data-trans='data-label=circle.list.buttonQuit'
)
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}` target-src='${src}')
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}joinable/` target-src='${src}')
hubl-reactivity(bind-user nested-field="circles" target-src='${src}')
if (endpoints.post && endpoints.post.circles) && (endpoints.get && endpoints.get.circles)
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${src}`)
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${src}`)
solid-display( class-members='table-cell w280'
class='table-body' widget-members="hubl-admin-circle-join-button"
bind-user order-by="name"
nested-field='circles' )
fields='circle.name, circle.owner, leaveButton'
loader-id='loader-admin-circles'
class-circle.name='table-cell w280 text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline' div#loader-admin-circles.loader.loader-top
class-circle.owner='table-cell w280' div
class-leaveButton='table-cell w280' div
div
div
action-leaveButton="joinButton" #admin-circle-create(hidden, data-view="admin-circle-create")
widget-leaveButton="hubl-admin-circle-leave-button" include page-admin-circles-create.pug
widget-circle.owner='hubl-circle-owner'
order-by="circle.name"
)
solid-widget(name='hubl-admin-circle-join-button')
template
solid-form(
class='button text-xsmall text-bold text-uppercase reversed color-secondary bordered icon icon-arrow-right-circle'
data-src='${value}'
fields='user.username'
value-user.username='hubl-workaround-493'
widget-user.username='solid-form-hidden'
submit-button='Rejoindre'
data-trans='submit-button=circle.list.buttonJoin'
)
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}` target-src='${value}')
hubl-reactivity(data-src=`${endpoints.circles || endpoints.get.circles}joinable/` target-src='${value}')
hubl-reactivity(bind-user nested-field="circles" target-src='${value}')
if (endpoints.post && endpoints.post.circles) && (endpoints.get && endpoints.get.circles)
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${value}`)
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${value}`)
solid-display(
class='table-body'
data-src=`${endpoints.circles || endpoints.get.circles}joinable/`
fields='name, owner, members'
loader-id='loader-admin-circles'
class-name='table-cell w280 text-xlarge text-color-heading text-semibold text-letter-spacing-large text-underline'
class-owner='table-cell w280'
widget-owner='hubl-circle-owner'
class-members='table-cell w280'
widget-members="hubl-admin-circle-join-button"
order-by="name"
)
div#loader-admin-circles.loader.loader-top
div
div
div
div
#admin-circle-create.content-box__height(hidden, data-view="admin-circle-create")
include page-admin-circles-create.pug

View File

@ -1,10 +1,9 @@
#circle-left(hidden, data-view="circle-left") div.content-box__info.flex(style="padding: 15px")
div.content-box__info.flex(style="padding: 15px")
p(data-trans='circle.left.paragraphQuit') p(data-trans='circle.left.paragraphQuit')
p p
span(data-trans='circle.left.paragraphJoin') span(data-trans='circle.left.paragraphJoin')
span   span  
solid-link(next="admin-circle-list" data-trans='circle.left.admin') solid-link(next="admin-circle-list" data-trans='circle.left.admin')
span   span  
span(data-trans='circle.left.paragraphContact') span(data-trans='circle.left.paragraphContact')

View File

@ -128,6 +128,5 @@ solid-router(default-route='circle-profile', hidden)
widget-is_admin='hubl-circle-user-admin' widget-is_admin='hubl-circle-user-admin'
) )
#circle-edit(hidden, data-view="circle-edit")
#circle-edit.content-box__height(hidden, data-view="circle-edit")
include page-circle-edit.pug include page-circle-edit.pug