From b61bcc54befa15747c42f1d5742728f3d51a4840 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Thu, 3 Sep 2020 12:15:47 +0200 Subject: [PATCH] update: fix project and circles --- src/styles/base/user-thumb.scss | 1 + src/views/admin/page-admin-circles-create.pug | 2 +- .../admin/page-admin-projects-create.pug | 4 +- src/views/circle/page-circle-profile.pug | 28 ++++---- src/views/project/page-project-edit.pug | 61 +++++++++------- src/views/project/page-project-left.pug | 2 +- src/views/project/page-project-profile.pug | 72 +++++++++++-------- 7 files changed, 96 insertions(+), 74 deletions(-) diff --git a/src/styles/base/user-thumb.scss b/src/styles/base/user-thumb.scss index 2541099..8814efb 100644 --- a/src/styles/base/user-thumb.scss +++ b/src/styles/base/user-thumb.scss @@ -38,6 +38,7 @@ } .user-thumb__admin:not(:empty) { + display: block !important; @extend %tag-admin; } diff --git a/src/views/admin/page-admin-circles-create.pug b/src/views/admin/page-admin-circles-create.pug index 0572b8f..4ce3474 100644 --- a/src/views/admin/page-admin-circles-create.pug +++ b/src/views/admin/page-admin-circles-create.pug @@ -25,7 +25,7 @@ div.content-box__info.flex widget-status='hubl-status' - next='admin-circle-list' + next='circle' submit-button='Enregistrer' ) diff --git a/src/views/admin/page-admin-projects-create.pug b/src/views/admin/page-admin-projects-create.pug index 0198aa4..52af542 100644 --- a/src/views/admin/page-admin-projects-create.pug +++ b/src/views/admin/page-admin-projects-create.pug @@ -48,7 +48,7 @@ div.content-box__info.flex class='input-text-like' - next='admin-project-list' + next='project' - submit-button='Enregistrer et ajouter des membres' + submit-button='Enregistrer' ) diff --git a/src/views/circle/page-circle-profile.pug b/src/views/circle/page-circle-profile.pug index f92cbb5..3a699ed 100644 --- a/src/views/circle/page-circle-profile.pug +++ b/src/views/circle/page-circle-profile.pug @@ -26,7 +26,10 @@ solid-router(default-route='circle-profile', hidden) widget-creationDate='solid-display-date' ) solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members') - solid-link(class='button mobile-full-width text-bold text-uppercase reversed button-primary bordered with-icon icon-pencil' next='circle-edit' bind-resources) Modifier et ajouter un membre + solid-ac-checker(permission='acl:Delete', bind-resources) + solid-link(class='button mobile-full-width text-bold text-uppercase reversed button-primary bordered with-icon icon-pencil' next='circle-edit' bind-resources) Modifier et ajouter un membre + solid-ac-checker(no-permission='acl:Delete', bind-resources) + solid-link(class='button mobile-full-width text-bold text-uppercase reversed button-primary bordered with-icon icon-pencil' next='circle-edit' bind-resources) Ajouter un membre div.flex.desktop-button__end @@ -39,11 +42,13 @@ solid-router(default-route='circle-profile', hidden) solid-widget(name='hubl-circle-leave-button') template - solid-delete( - class='button mobile-full-width desktop-btn-margin__left text-bold text-uppercase reversed button-secondary bordered with-icon icon-close' - data-src="${src}" - data-label='Quitter le cercle' - ) + solid-ac-checker(no-permission='acl:Delete', data-src="${src}", nested-field="circle") + solid-delete( + class='button mobile-full-width desktop-btn-margin__left text-bold text-uppercase reversed button-secondary bordered with-icon icon-close' + data-src="${src}" + data-label='Quitter le cercle' + next='circle-left' + ) solid-widget(name='hubl-circle-join-button') template @@ -52,12 +57,9 @@ solid-router(default-route='circle-profile', hidden) data-src='' nested-field='members' - fields='user.@id' - label-user.@id='' - value-user.@id='' - widget-user.@id='solid-form-hidden' - - hubl-inherit-bind-user2input="input[name='user.@id']" + fields='user.username' + value-user.username='hubl-workaround-493' + widget-user.username='solid-form-hidden' submit-button='Rejoindre le cercle' ) @@ -87,7 +89,5 @@ solid-router(default-route='circle-profile', hidden) widget-members='hubl-circle-team-template' ) - - #circle-edit.content-box__height(hidden) include page-circle-edit.pug diff --git a/src/views/project/page-project-edit.pug b/src/views/project/page-project-edit.pug index 74568bf..7ab7e0a 100644 --- a/src/views/project/page-project-edit.pug +++ b/src/views/project/page-project-edit.pug @@ -4,44 +4,52 @@ div.content-box__info solid-link(class='backlink right', bind-resources, next='project-profile') Retour - h1 Modifie ton projet + solid-ac-checker(permission='acl:Write', bind-resources) + h1 Modifie ton projet - solid-form.form.button-register( - bind-resources - - fields='line-1(customer.name, name), description' + div#loader-project-edit.loader.loader-top + div + div + div + div + + solid-form.form.button-register( + bind-resources + + fields='line-1(customer.name, name), description' - label-name='Nom du projet*' - class-name='form-label is-light is-half-width input-text-like' + label-name='Nom du projet*' + class-name='form-label is-light is-half-width input-text-like' - label-customer.name='Nom du client*' - class-customer.name='form-label is-light is-half-width input-text-like' + label-customer.name='Nom du client*' + class-customer.name='form-label is-light is-half-width input-text-like' - label-description='Description du projet' - class-description='form-label is-light is-full-width input-text-like' - widget-description='solid-form-textarea' + label-description='Description du projet' + class-description='form-label is-light is-full-width input-text-like' + widget-description='solid-form-textarea' - partial="" + partial="" - submit-button='Enregistrer' - next='project-information' - ) + submit-button='Enregistrer' + next='project-information' + ) h2 Liste des membres : - solid-form.block.select-add( - bind-resources - nested-field='members' - fields='user' - range-user=`${endpoints.users || endpoints.get.users}` + solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members') + solid-form.block.select-add( + bind-resources + nested-field='members' + fields='user' + range-user=`${endpoints.users || endpoints.get.users}` - class-user='team form-label is-light' - label-user='' - widget-user='solid-form-auto-completion' + class-user='team form-label is-light' + label-user='' + widget-user='solid-form-auto-completion' - submit-button='Ajouter un membre' - ) + submit-button='Ajouter un membre' + ) .table-wrapper .table @@ -54,6 +62,7 @@ div.content-box__info class='table-body' bind-resources fields='members' + loader-id='loader-project-edit' multiple-members='' widget-members='hubl-team-template-edit' diff --git a/src/views/project/page-project-left.pug b/src/views/project/page-project-left.pug index 0283db4..baac307 100644 --- a/src/views/project/page-project-left.pug +++ b/src/views/project/page-project-left.pug @@ -2,4 +2,4 @@ div.content-box__info.flex(style="padding: 15px") p Tu as quitté ce projet. - p Ceci est un groupe privé. Pour le rejoindre, rends-toi dans le panneau administration et demande une invitation. + p Ceci est un projet privé. Pour le rejoindre, rends-toi dans le panneau administration et demande une invitation. diff --git a/src/views/project/page-project-profile.pug b/src/views/project/page-project-profile.pug index 102c24f..a81fd3e 100644 --- a/src/views/project/page-project-profile.pug +++ b/src/views/project/page-project-profile.pug @@ -4,15 +4,21 @@ solid-router(default-route='project-profile', hidden) #project-profile(hidden) include ../../templates/hubl-captain.pug - include ../../templates/hubl-circle-team.pug include ../../templates/hubl-project-team.pug .content-box__info.flex + div#loader-project-profile.loader + div + div + div + div + .flex.space-between.with-padding.mobile-vertical-align solid-display.mobile-margin__bottom( bind-resources fields='creationDateSet(title, creationDate)' + loader-id='loader-project-profile' class-title='word-spacing-right' @@ -21,23 +27,43 @@ solid-router(default-route='project-profile', hidden) widget-creationDate='solid-display-date' ) solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members') - solid-link(class='button mobile-full-width text-bold text-uppercase reversed button-primary bordered with-icon icon-pencil' next='project-edit' bind-resources) Modifier et ajouter un membre + solid-ac-checker(permission='acl:Delete', bind-resources) + solid-link(class='button mobile-full-width text-bold text-uppercase reversed button-primary bordered with-icon icon-pencil' next='project-edit' bind-resources) Modifier et ajouter un membre + solid-ac-checker(no-permission='acl:Delete', bind-resources) + solid-link(class='button mobile-full-width text-bold text-uppercase reversed button-primary bordered with-icon icon-pencil' next='project-edit' bind-resources) Ajouter un membre - solid-display( - class='flex desktop-button__end' - bind-resources - nested-field='members' - fields='relation' + div.flex.desktop-button__end + solid-ac-checker(permission='acl:Delete', bind-resources) + solid-delete( + class='button mobile-full-width text-bold text-uppercase button-primary bordered with-icon icon-trash' + bind-resources + data-label='Supprimer le projet' + ) - action-relation='relation' - widget-relation='hubl-project-leave-button' + solid-widget(name='hubl-project-leave-button') + template + solid-delete( + class='button mobile-full-width desktop-btn-margin__left text-bold text-uppercase reversed button-secondary bordered with-icon icon-close' + data-src="${src}" + data-label='Quitter le projet' + next='project-left' + ) - search-fields='user' - search-widget-user='solid-form-hidden' - search-value-user="" + solid-ac-checker(no-permission='acl:Delete', bind-resources) + solid-display( + bind-resources + nested-field='members' + fields='relation' - hubl-inherit-user-id="search-value-user" - ) + action-relation='relation' + widget-relation='hubl-project-leave-button' + + search-fields='user' + search-widget-user='solid-form-hidden' + search-value-user="" + + hubl-inherit-user-id="search-value-user" + ) .flex.space-between solid-display( @@ -48,13 +74,8 @@ solid-router(default-route='project-profile', hidden) class-label-captain='h2-like' widget-captain='hubl-captain' ) - solid-display( - class='customer-logo' - bind-resources - fields='customer.logo' - - widget-customer.logo='solid-display-img' - ) + + br h2 Equipe : @@ -66,14 +87,5 @@ solid-router(default-route='project-profile', hidden) widget-members='hubl-project-team' ) - - solid-widget(name='hubl-project-leave-button') - template - solid-delete( - class='button mobile-full-width desktop-btn-margin__left text-bold text-uppercase reversed button-secondary bordered with-icon icon-close' - data-src="${src}" - data-label='Quitter le groupe' - ) - #project-edit.content-box__height(hidden) include page-project-edit.pug