2020-05-18 12:18:15 +00:00
|
|
|
.content-box.flex.full-width.with-form
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-router(default-route='admin-project-list', hidden)
|
|
|
|
solid-route(name='admin-project-list')
|
|
|
|
solid-route(name='admin-project-create')
|
|
|
|
solid-route(name='project-left')
|
2019-10-25 17:15:45 +00:00
|
|
|
|
2020-06-05 09:25:57 +00:00
|
|
|
div.content-box__header.flex.space-between
|
2020-04-02 16:09:23 +00:00
|
|
|
h1.without-margin Administration
|
2020-06-05 09:25:57 +00:00
|
|
|
button.mobile-sidebar-button.jsMobileSidebarOpenButton.icon-arrow-left-circle MENU
|
2019-10-25 17:15:45 +00:00
|
|
|
|
2020-02-05 12:39:29 +00:00
|
|
|
#project-left(hidden)
|
2020-02-10 12:59:23 +00:00
|
|
|
include ../project/page-project-left.pug
|
2020-02-05 12:39:29 +00:00
|
|
|
|
2020-06-10 13:36:45 +00:00
|
|
|
#admin-project-list.content-box__height(hidden)
|
2020-05-08 13:27:44 +00:00
|
|
|
include ../../templates/hubl-user-avatar.pug
|
2019-10-25 17:15:45 +00:00
|
|
|
|
2020-05-18 08:47:43 +00:00
|
|
|
div.content-box__info.flex
|
|
|
|
div.admin-header.flex
|
2020-05-13 13:04:54 +00:00
|
|
|
h3 Projets
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-link(
|
2020-05-11 15:15:59 +00:00
|
|
|
class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-plus'
|
2019-12-09 17:23:47 +00:00
|
|
|
next='admin-project-create'
|
2020-05-30 08:08:18 +00:00
|
|
|
) Créer un nouveau projet
|
2019-10-25 17:15:45 +00:00
|
|
|
|
2020-06-15 14:06:01 +00:00
|
|
|
.table-wrapper
|
|
|
|
.table
|
|
|
|
div.table-header.grey-color
|
|
|
|
div.w280 Nom
|
|
|
|
div.w280 Administrateurs
|
|
|
|
div.w280 Capitaines
|
|
|
|
div.w230 Rejoindre
|
|
|
|
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-widget(name="hubl-admin-project-leave-button")
|
2020-06-15 14:06:01 +00:00
|
|
|
template
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-delete(
|
2020-06-15 14:06:01 +00:00
|
|
|
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
|
|
|
|
data-src="${src}"
|
|
|
|
data-label='Quitter'
|
|
|
|
)
|
2020-06-18 18:02:54 +00:00
|
|
|
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}` target-src='${src}')
|
|
|
|
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}joinable/` target-src='${src}')
|
|
|
|
hubl-reactivity(bind-user nested-field="projects" target-src='${src}')
|
2020-06-15 14:06:01 +00:00
|
|
|
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-widget(name='hubl-project-captain')
|
2020-06-15 14:06:01 +00:00
|
|
|
template
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-display.user-thumb.is-spaced(
|
2020-06-15 14:06:01 +00:00
|
|
|
data-src='${await value}'
|
|
|
|
fields='account.picture, sup(name), sub(username)'
|
|
|
|
|
2020-06-19 16:36:47 +00:00
|
|
|
class-account.picture='avatar user-thumb__picture'
|
2020-06-15 14:06:01 +00:00
|
|
|
class-name='user-thumb__name'
|
|
|
|
class-username='user-thumb__username'
|
|
|
|
|
|
|
|
widget-account.picture='hubl-user-avatar'
|
|
|
|
)
|
|
|
|
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-widget(name='hubl-project-admins')
|
2020-06-15 14:06:01 +00:00
|
|
|
template
|
2020-06-22 08:58:01 +00:00
|
|
|
solid-display(
|
2020-06-15 14:06:01 +00:00
|
|
|
data-src='${value}'
|
|
|
|
fields='user'
|
|
|
|
search-fields='is_admin'
|
|
|
|
search-value-is_admin='true'
|
2020-06-18 18:02:54 +00:00
|
|
|
search-widget-is_admin='solid-form-hidden'
|
2020-06-15 14:06:01 +00:00
|
|
|
widget-user='hubl-project-captain'
|
|
|
|
)
|
|
|
|
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-widget(name='hubl-admin-project-leave-button')
|
2020-06-15 14:06:01 +00:00
|
|
|
template
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-delete(
|
2020-06-15 14:06:01 +00:00
|
|
|
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
|
|
|
|
data-src="${src}"
|
|
|
|
data-label='Quitter'
|
|
|
|
)
|
|
|
|
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-display(
|
2020-06-15 14:06:01 +00:00
|
|
|
class='table-body'
|
|
|
|
|
|
|
|
bind-user
|
|
|
|
nested-field="projects"
|
|
|
|
fields='project.name, project.members, project.captain, leaveButton'
|
|
|
|
|
|
|
|
class-project.name='w280 cell border cell-with-name'
|
2020-06-19 16:36:47 +00:00
|
|
|
class-project.members='w280 cell border cell-with-id-card'
|
2020-06-15 14:06:01 +00:00
|
|
|
class-project.captain='w280 cell border cell-with-id-card'
|
|
|
|
class-leaveButton='w230 cell border cell-with-buttons'
|
|
|
|
|
|
|
|
action-leaveButton="joinButton"
|
|
|
|
widget-leaveButton="hubl-admin-project-leave-button"
|
|
|
|
|
|
|
|
widget-project.captain='hubl-project-captain'
|
|
|
|
widget-project.members='hubl-project-admins'
|
|
|
|
|
|
|
|
order-by="project.name"
|
|
|
|
)
|
|
|
|
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-widget(name='hubl-admin-project-join-button')
|
2020-06-15 14:06:01 +00:00
|
|
|
template
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-form.button.text-bold.text-uppercase.reversed.button-primary.bordered.with-icon.icon-arrow-right-circle.flex(
|
2020-06-15 14:06:01 +00:00
|
|
|
data-src='${src}'
|
|
|
|
nested-field="members"
|
|
|
|
|
|
|
|
fields='user.username'
|
|
|
|
value-user.username='hubl-workaround-493'
|
2020-06-18 18:02:54 +00:00
|
|
|
widget-user.username='solid-form-hidden'
|
2020-06-15 14:06:01 +00:00
|
|
|
|
|
|
|
submit-button='Rejoindre'
|
|
|
|
)
|
2020-06-18 18:02:54 +00:00
|
|
|
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}` target-src='${src}')
|
|
|
|
hubl-reactivity(data-src=`${endpoints.projects || endpoints.get.projects}joinable/` target-src='${src}')
|
|
|
|
hubl-reactivity(bind-user nested-field="projects" target-src='${src}')
|
2020-06-15 14:06:01 +00:00
|
|
|
|
2020-06-18 18:02:54 +00:00
|
|
|
solid-display(
|
2020-06-15 14:06:01 +00:00
|
|
|
class='table-body'
|
|
|
|
|
|
|
|
data-src=`${endpoints.projects || endpoints.get.projects}joinable/`
|
|
|
|
fields='name, members, captain, joinButton'
|
|
|
|
|
|
|
|
class-name='w280 cell border cell-with-name'
|
2020-06-19 16:36:47 +00:00
|
|
|
class-members='w280 cell border cell-with-id-card'
|
2020-06-15 14:06:01 +00:00
|
|
|
class-captain='w280 cell border cell-with-id-card'
|
|
|
|
class-joinButton='w230 cell border cell-with-buttons'
|
|
|
|
|
|
|
|
action-joinButton="joinButton" # Workaround: I need members two times
|
|
|
|
widget-joinButton="hubl-admin-project-join-button"
|
|
|
|
|
|
|
|
widget-captain='hubl-project-captain'
|
|
|
|
widget-members='hubl-project-admins'
|
|
|
|
|
|
|
|
order-by="name"
|
|
|
|
)
|
2019-12-09 17:23:47 +00:00
|
|
|
|
|
|
|
#admin-project-create(hidden)
|
|
|
|
include page-admin-projects-create.pug
|