Merge branch 'release/project' of git.startinblox.com:applications/hubl into release/0.10

This commit is contained in:
Jean-Baptiste Pasquier 2020-06-18 17:00:33 +02:00
commit 8189c7fbcc
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
10 changed files with 237 additions and 153 deletions

View File

@ -112,21 +112,30 @@
--color-chat-grey-3: var(--color-grey-10); --color-chat-grey-3: var(--color-grey-10);
/* Directory */ /* Directory */
--color-directory-grey-4: #7A7F85; --color-directory-grey-4: #7A7F85 !important;
--color-directory-grey-5: #F0F3F6; --color-directory-grey-5: #F0F3F6 !important;
--color-directory-avatar-background: #E4E8ED; --color-directory-avatar-background: #E4E8ED !important;
--color-directory-back-link: #36383B; --color-directory-back-link: #36383B !important;
--color-directory-border: #DAE2F3; --color-directory-border: #DAE2F3 !important;
--color-directory-content-header-border: #DAE2F3; --color-directory-content-header-border: #DAE2F3 !important;
--color-directory-h1: var(--color-complementary-darken); --color-directory-h1: var(--color-complementary-darken);
--color-directory-list-icon: var(--color-primary); --color-directory-list-icon: var(--color-primary);
--color-directory-text: var(--color-directory-grey-4); --color-directory-text: var(--color-directory-grey-4);
--color-directory-form-input: #EDF1FA; --color-directory-send-border: var(--color-complementary) !important;
--color-directory-form-input-text: var(--color-directory-grey-4); --color-directory-list-icon: var(--color-primary) !important;
--color-directory-form-input-active: var(--color-complementary); --color-directory-counter-background: var(--color-directory-grey-5) !important;
--color-directory-form-select-icon: var(--color-complementary); --color-directory-counter-border: #9BA0A7 !important;
--color-directory-counter-text: #4A4A4A !important;
--color-directory-paginate: #36383B !important;
--color-directory-paginate-disabled: #9BA0A7 !important;
--color-directory-form-input: #EDF1FA !important;
--color-directory-form-input-text: var(--color-directory-grey-4) !important;
--color-directory-form-input-active: var(--color-complementary) !important;
--color-directory-form-select-icon: var(--color-complementary) !important;
} }
/* Button to edit a channel or a project (in project-profile) */ /* Button to edit a channel or a project (in project-profile) */
@ -202,19 +211,34 @@
/* Directory - my profile*/ /* Directory - my profile*/
/* Button to update the avatar */ /* Colors for buttons to send a message to a member and to update or remove your profile picture */
#sib-picture-browse, #member-profile>div.profile-card>div.user-profile>div>sib-display>div>sib-action.button.button-primary.bordered,
#sib-picture-remove { button#sib-picture-browse.button.button-primary,
background-color: var(--color-white); button#sib-picture-remove.button.button-primary {
border: 1px solid var(--color-complementary); border: 1px solid var(--color-directory-complementary) !important;
color: var(--color-complementary);
} }
#sib-picture-browse:hover, #member-profile sib-action.button.button-primary>sib-link,
#sib-picture-remove:hover { button#sib-picture-browse.button.button-primary,
background-color: var(--color-complementary); button#sib-picture-remove.button.button-primary {
border: 1px solid var(--color-complementary); color: var(--color-directory-complementary) !important;
color: var(--color-white); }
#member-profile>div.profile-card>div.user-profile>div>sib-display>div>sib-action.button.button-primary.bordered>sib-link::before {
background-color: var(--color-directory-complementary) !important;
}
/* Hover */
#member-profile sib-action.button.button-primary:hover,
#member-profile sib-action.button.button-primary:hover>sib-link,
button#sib-picture-browse.button.button-primary:hover,
button#sib-picture-remove.button.button-primary:hover {
color: var(--color-directory-white) !important;
background-color: var(--color-directory-complementary) !important;
}
#member-profile>div.profile-card>div.user-profile>div>sib-display>div>sib-action.button.button-primary.bordered:hover>sib-link::before {
background-color: var(--color-directory-white) !important;
} }
#members-list .send-display sib-link::before { #members-list .send-display sib-link::before {

View File

@ -20,6 +20,8 @@
include views/project/page-project-chat.pug include views/project/page-project-chat.pug
#project-information.content-box__height(hidden) #project-information.content-box__height(hidden)
include views/project/page-project-profile.pug include views/project/page-project-profile.pug
#project-picture(hidden)
include views/project/page-project-picture.pug
nav.jsRightMenu(role='navigation') nav.jsRightMenu(role='navigation')
sib-router(default-route='project-chat') sib-router(default-route='project-chat')
@ -32,4 +34,4 @@ nav.jsRightMenu(role='navigation')
sib-route(name='project-information') sib-route(name='project-information')
li li
a Information a Information
sib-route(name='project-contributions-help') sib-route(name='project-picture' use-id)

View File

@ -27,9 +27,15 @@ async function updateSources(resource) {
async function resToChildrens(resource) { async function resToChildrens(resource) {
resource = resource.getResourceData(); resource = resource.getResourceData();
refreshSibDisplays(resource["http://happy-dev.fr/owl/#user"]["@id"]); if (resource["http://happy-dev.fr/owl/#user"]) {
refreshSibDisplays(resource["http://happy-dev.fr/owl/#project"]["@id"] + "members/"); refreshSibDisplays(resource["http://happy-dev.fr/owl/#user"]["@id"]);
refreshSibDisplays(resource["http://happy-dev.fr/owl/#circle"]["@id"] + "members/"); }
if (resource["http://happy-dev.fr/owl/#project"]) {
refreshSibDisplays(resource["http://happy-dev.fr/owl/#project"]["@id"] + "members/");
}
if (resource["http://happy-dev.fr/owl/#circle"]) {
refreshSibDisplays(resource["http://happy-dev.fr/owl/#circle"]["@id"] + "members/");
}
} }
//auxiliary function updates displays using a given resource //auxiliary function updates displays using a given resource

View File

@ -141,5 +141,3 @@ $color-212-4-50: hsl(212.7,4.3%,50%);
$color-0-0-22: hsl(0,0%,22.7%); $color-0-0-22: hsl(0,0%,22.7%);
$color-203-87-19: hsl(203, 87.8%, 19.2%); $color-203-87-19: hsl(203, 87.8%, 19.2%);
$color-357-67-45: hsl(357,67.5%,45.9%); $color-357-67-45: hsl(357,67.5%,45.9%);

View File

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

View File

@ -12,37 +12,36 @@ div.content-box__info.flex
naked naked
) )
h1.centered Créer un projet h1 Créer un nouveau projet
sib-form.form.button-register( sib-form.form.button-register(
data-src=`${endpoints.projects || endpoints.post.projects}` data-src=`${endpoints.projects || endpoints.post.projects}`
fields='line-1(customer, name), line-2(project.description), line-3(businessProvider.name, businessProvider.fee), line-4(captain)' fields='status, line-1(customer.name, name), description, line-10(captain)'
label-customer='Nom du client*' label-status='Statut du canal*'
class-customer='form-label is-light is-half-width' widget-status='hubl-status'
range-customer=`${endpoints.customers || endpoints.get.customers}` class-status='form-label is-light is-full-width member-select color'
widget-customer='sib-form-auto-completion'
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.name='Nom du client*'
class-customer.name='form-label is-light is-half-width'
label-name='Nom du projet*' label-name='Nom du projet*'
class-name='form-label is-light is-half-width input-text-like' class-name='form-label is-light is-half-width input-text-like'
label-project.description='Description du projet' label-captain='Capitaine du projet*'
class-project.description='form-label is-light is-full-width input-text-like'
widget-project.description='sib-form-textarea'
label-businessProvider.name='Apporteur d\'affaire*'
class-businessProvider.name='form-label is-light is-half-width input-text-like'
label-businessProvider.fee='Contribution'
class-businessProvider.fee='form-label is-light is-half-width input-text-like'
label-captain='Capitaine du projet'
range-captain=`${endpoints.users || endpoints.get.users}` range-captain=`${endpoints.users || endpoints.get.users}`
class-captain='form-label is-light is-half-width' class-captain='form-label is-light is-half-width'
widget-captain='sib-form-auto-completion' widget-captain='sib-form-auto-completion'
next='admin-project-list' next='project-picture'
submit-button='Enregistrer' submit-button='Enregistrer et ajouter des membres'
) )

View File

@ -20,79 +20,108 @@
sib-link( sib-link(
class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-plus' class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-plus'
next='admin-project-create' next='admin-project-create'
) Créer un projet ) Créer un nouveau projet
.table-wrapper .table
.table div.table-header.grey-color
div.table-header.grey-color div.w25 Nom
div.w262 Nom div.w25 Administrateurs
div.w262 Administrateurs div.w25 Capitaines
div.w262 Capitaines div.w25 Rejoindre
div.w262 Accès
sib-widget(name="hubl-admin-project-leave-button") sib-widget(name="hubl-admin-project-leave-button")
template template
sib-delete( sib-delete(
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close' class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
data-src="${src}" data-src="${src}"
data-label='Quitter' data-label='Quitter'
) )
sib-widget(name='hubl-project-captain') sib-widget(name='hubl-project-captain')
template template
sib-display.user-thumb.is-spaced( sib-display.user-thumb(
data-src='${await value}' data-src='${await value}'
fields='account.picture, sup(name), sub(username)' fields='account.picture, sup(name), sub(username)'
class-account.picture='avatar user-thumb__picture' class-account.picture='user-thumb__picture'
class-name='user-thumb__name' class-name='user-thumb__name'
class-username='user-thumb__username' class-username='user-thumb__username'
widget-account.picture='hubl-user-avatar' widget-account.picture='hubl-user-avatar'
) )
sib-widget(name='hubl-project-admins') sib-widget(name='hubl-project-admins')
template template
sib-display( sib-display(
data-src='${value}' data-src='${value}'
fields='user' fields='user'
search-fields='is_admin' search-fields='is_admin'
search-value-is_admin='true' search-value-is_admin='true'
search-widget-is_admin='sib-form-hidden' search-widget-is_admin='sib-form-hidden'
widget-user='hubl-project-captain' widget-user='hubl-project-captain'
) )
sib-widget(name="hubl-admin-project-buttons") sib-widget(name='hubl-admin-project-leave-button')
template template
sib-display( sib-delete(
data-src='${src}' class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
nested-field='members' data-src="${src}"
fields='relation' data-label='Quitter'
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-display( sib-display(
class='table-body' class='table-body'
data-src=`${endpoints.projects || endpoints.get.projects}` bind-user
fields='name, members, captain, buttons' nested-field="projects"
fields='project.name, project.members, project.captain, leaveButton'
class-name='w262 border cell-with-name hashtag' class-project.name='w25 cell border cell-with-name'
class-members='w262 border' class-project.members='w25 cell border'
class-captain='w262 border cell-with-id-card' class-project.captain='w25 cell border cell-with-id-card'
class-buttons='w262 border cell-with-buttons' class-leaveButton='w25 cell border cell-with-buttons'
widget-buttons="admin-project-buttons" action-leaveButton="joinButton"
action-buttons="buttons" widget-leaveButton="hubl-admin-project-leave-button"
widget-captain='hubl-project-captain' widget-project.captain='hubl-project-captain'
widget-members='hubl-project-admins' widget-project.members='hubl-project-admins'
)
#admin-project-create.content-box__height(hidden) 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-joinButton='w25 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"
)
#admin-project-create(hidden)
include page-admin-projects-create.pug include page-admin-projects-create.pug

View File

@ -9,24 +9,36 @@ div.content-box__info
sib-form.form.button-register( sib-form.form.button-register(
bind-resources bind-resources
fields='line-1(customer, name), description, line-2(businessProvider, businessProviderFee)' 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-customer='form-label is-light is-half-width'
widget-customer='sib-form-auto-completion'
class-name='form-label is-light is-half-width input-text-like'
class-description='form-label is-light is-full-width input-text-like'
label-customer='Client*'
range-customer=`${endpoints.customers || endpoints.get.customers}`
label-name='Nom du projet*' 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' label-description='Description du projet'
class-description='form-label is-light is-full-width'
widget-description='sib-form-textarea' widget-description='sib-form-textarea'
class-businessprovider='form-label is-light is-half-width input-text-like' partial=""
class-businessproviderfee='form-label is-light is-half-width input-text-like'
label-businessprovider='Apporteur d\'affaire'
label-businessproviderfee='Montant de la contribution'
submit-button='Enregistrer' submit-button='Enregistrer'
next='project-information'
)
h2 Photo du projet
sib-form.form-picture(
bind-resources
fields='customer.logo'
widget-customer.logo="hubl-user-avatar"
submit-button='Edit'
next='project-picture'
) )
h2 Liste des membres : h2 Liste des membres :
@ -44,18 +56,18 @@ div.content-box__info
submit-button='Ajouter un membre' submit-button='Ajouter un membre'
) )
.table-wrapper .table
.table
div.table-header.grey-color
div.w355 Nom
div.W152 Accès
//-class='table-body' div.table-header.grey-color
sib-display( div.w66 Nom
class='table-body' div.w33 Accès
bind-resources
fields='members'
multiple-members='' //-class='table-body'
widget-members='hubl-team-template-edit' sib-display(
) class='table-body'
bind-resources
fields='members'
multiple-members=''
widget-members='hubl-team-template-edit'
)

View File

@ -0,0 +1,15 @@
div.content-box__info
sib-link(class='backlink right', bind-resources, next='project-edit') Retour
h1 Modifier l'image du projet
sib-picture(
bind-resources
upload-src=`${endpoints.uploads || endpoints.post.uploads}`
upload-id="sib-project-edit-picture"
nested-fields='customer'
fields='logo'
next='project-edit'
additional='name'
)

View File

@ -21,10 +21,25 @@ sib-router(default-route='project-profile', hidden)
widget-creationDate='sib-display-date' widget-creationDate='sib-display-date'
) )
sib-ac-checker(permission='acl:Append', bind-resources, nested-field='members') sib-ac-checker(permission='acl:Append', bind-resources, nested-field='members')
sib-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 sib-link(class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-pencil' next='project-edit' bind-resources) Modifier et ajouter un membre
sib-display(
class='position-end'
bind-resources
nested-field='members'
fields='relation'
action-relation='relation'
.flex.space-between.with-padding widget-relation='hubl-project-leave-button'
search-fields='user'
search-widget-user='sib-form-hidden'
search-value-user=""
hubl-inherit-user-id="search-value-user"
)
.space-between
sib-display( sib-display(
bind-resources bind-resources
fields='label-captain, captain' fields='label-captain, captain'
@ -51,6 +66,7 @@ sib-router(default-route='project-profile', hidden)
multiple-members multiple-members
) )
sib-widget(name='hubl-project-leave-button') sib-widget(name='hubl-project-leave-button')
template template
sib-delete( sib-delete(
@ -59,22 +75,5 @@ sib-router(default-route='project-profile', hidden)
data-label='Quitter le groupe' data-label='Quitter le groupe'
) )
sib-display(
class='flex desktop-button__end'
bind-resources
nested-field='members'
fields='relation'
action-relation='relation'
widget-relation='hubl-project-leave-button'
search-fields='user'
search-widget-user='sib-form-hidden'
search-value-user=""
hubl-inherit-user-id="search-value-user"
)
#project-edit.content-box__height(hidden) #project-edit.content-box__height(hidden)
include page-project-edit.pug include page-project-edit.pug