fix: clean project and make it works

This commit is contained in:
Jean-Baptiste Pasquier 2020-06-01 17:29:30 +02:00
parent e7b4ba16a5
commit 701c06a556
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
4 changed files with 77 additions and 44 deletions

View File

@ -12,5 +12,5 @@ sib-widget(name='hubl-captain')
class-is_lead='user-thumb__lead'
widget-account.picture='hubl-user-avatar'
value-is_lead='Project lead'
value-is_lead='Capitaine'
)

View File

@ -21,38 +21,36 @@ div.content-box__info
sib-form(
data-src=`${endpoints.projects || endpoints.post.projects}`
fields='status,line-1(customer, name), line-10(captain),logo'
fields='status,line-1(customer.name, name), description, line-10(captain), logo'
label-status='Statut du canal'
label-status='Statut du canal*'
widget-status='hubl-status'
class-status='form-label is-light is-full-width member-select color'
class-fieldset-fee='fieldset'
value-fieldset-fee='Contributions'
widget-fieldset-fee='hubl-template-project-title'
label-description='Description du projet'
class-description='form-label is-light is-full-width'
widget-description='sib-form-textarea'
class-fieldset-captain='fieldset'
widget-fieldset-captain='hubl-template-project-title'
label-customer='Nom du client*'
class-customer='form-label is-light is-half-width'
label-customer.name='Nom du client*'
class-customer.name='form-label is-light is-half-width'
label-name='Nom du projet*'
class-name='form-label is-light is-half-width'
label-captain='Capitaine du projet'
label-captain='Capitaine du projet*'
range-captain=`${endpoints.users || endpoints.get.users}`
class-captain='member-select form-label is-light is-half-width'
widget-captain='sib-form-auto-completion'
widget-logo="sib-form-file"
label-logo="Télécharger un logo"
upload-url-logo="https://api.test3.startinblox.com/upload/"
class-logo='form-label is-light is-full-width'
upload-url-logo=`${endpoints.uploads || endpoints.post.uploads}`
next='admin-project-list'
submit-button='Enregistrer et ajouter des membres'
)
//
!!! WARNING Logo upload URL hardcoded to test server !!!

View File

@ -23,10 +23,10 @@
.table
div.table-header.grey-color
div Nom
div Administrateurs
div Capitaines
div Rejoindre
div.w25 Nom
div.w25 Administrateurs
div.w25 Capitaines
div.w25 Rejoindre
sib-widget(name="hubl-admin-project-leave-button")
template
@ -60,36 +60,66 @@
widget-user='hubl-project-captain'
)
sib-widget(name="hubl-admin-project-buttons")
sib-widget(name='hubl-admin-project-leave-button')
template
sib-display(
data-src='${src}'
nested-field='members'
fields='relation'
action-relation='relation'
widget-relation='hubl-admin-project-leave-button'
search-fields='user'
search-widget-user='sib-form-hidden'
search-value-user="-"
hubl-inherit-user-id="search-value-user"
sib-delete(
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
data-src="${src}"
data-label='Quitter'
)
sib-display(
class='table-body'
data-src=`${endpoints.projects || endpoints.get.projects}`
fields='name, members, captain, buttons'
bind-user
nested-field="projects"
fields='project.name, project.members, project.captain, leaveButton'
class-name='w25 cell border cell-with-name hashtag'
class-project.name='w25 cell border cell-with-name'
class-project.members='w25 cell border'
class-project.captain='w25 cell border cell-with-id-card'
class-leaveButton='w25 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"
)
sib-widget(name='hubl-admin-project-join-button')
template
sib-form.button.text-bold.text-uppercase.reversed.button-primary.bordered.with-icon.icon-arrow-right-circle.flex(
data-src='${src}'
nested-field="members"
fields='user.username'
value-user.username='hubl-workaround-493'
widget-user.username='sib-form-hidden'
submit-button='Rejoindre'
)
sib-display(
class='table-body'
data-src=`${endpoints.projects || endpoints.get.projects}joinable/`
fields='name, members, captain, joinButton'
class-name='w25 cell border cell-with-name'
class-members='w25 cell border'
class-captain='w25 cell border cell-with-id-card'
class-buttons='w25 cell border cell-with-buttons'
class-joinButton='w25 cell border cell-with-buttons'
widget-buttons="hubl-admin-project-buttons"
action-buttons="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"
)
#admin-project-create(hidden)

View File

@ -13,21 +13,26 @@ div.content-box__info
sib-form.form-edit(
bind-resources
fields='fieldset-info, block-project__info(name, description), fieldset-fee)'
fields='status, block-project__info(customer.name, name), description'
label-status='Statut du canal*'
widget-status='hubl-status'
class-status='form-label is-light is-full-width member-select color'
class-name='form-label is-light is-half-width'
class-description='form-label is-light is-full-width'
label-fieldset-info=''
label-name='Nom du projet*'
class-name='form-label is-light is-half-width'
label-customer.name='Nom du client*'
class-customer.name='form-label is-light is-half-width'
label-description='Description du projet'
widget-fieldset-info='hubl-fieldset-title'
class-description='form-label is-light is-full-width'
widget-description='sib-form-textarea'
class-fieldset-fee='fieldset'
label-fieldset-fee='Contributions'
widget-fieldset-fee='hubl-fieldset-title'
partial=""
submit-button='Enregistrer'
next='project-information'
)
h2 Liste des membres :
@ -48,8 +53,8 @@ div.content-box__info
.table
div.table-header.grey-color
div Nom
div Accès
div.w66 Nom
div.w33 Accès
//-class='table-body'
sib-display(