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);
/* Directory */
--color-directory-grey-4: #7A7F85;
--color-directory-grey-5: #F0F3F6;
--color-directory-grey-4: #7A7F85 !important;
--color-directory-grey-5: #F0F3F6 !important;
--color-directory-avatar-background: #E4E8ED;
--color-directory-back-link: #36383B;
--color-directory-border: #DAE2F3;
--color-directory-content-header-border: #DAE2F3;
--color-directory-avatar-background: #E4E8ED !important;
--color-directory-back-link: #36383B !important;
--color-directory-border: #DAE2F3 !important;
--color-directory-content-header-border: #DAE2F3 !important;
--color-directory-h1: var(--color-complementary-darken);
--color-directory-list-icon: var(--color-primary);
--color-directory-text: var(--color-directory-grey-4);
--color-directory-form-input: #EDF1FA;
--color-directory-form-input-text: var(--color-directory-grey-4);
--color-directory-form-input-active: var(--color-complementary);
--color-directory-form-select-icon: var(--color-complementary);
--color-directory-send-border: var(--color-complementary) !important;
--color-directory-list-icon: var(--color-primary) !important;
--color-directory-counter-background: var(--color-directory-grey-5) !important;
--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) */
@ -202,19 +211,34 @@
/* Directory - my profile*/
/* Button to update the avatar */
#sib-picture-browse,
#sib-picture-remove {
background-color: var(--color-white);
border: 1px solid var(--color-complementary);
color: var(--color-complementary);
/* Colors for buttons to send a message to a member and to update or remove your profile picture */
#member-profile>div.profile-card>div.user-profile>div>sib-display>div>sib-action.button.button-primary.bordered,
button#sib-picture-browse.button.button-primary,
button#sib-picture-remove.button.button-primary {
border: 1px solid var(--color-directory-complementary) !important;
}
#sib-picture-browse:hover,
#sib-picture-remove:hover {
background-color: var(--color-complementary);
border: 1px solid var(--color-complementary);
color: var(--color-white);
#member-profile sib-action.button.button-primary>sib-link,
button#sib-picture-browse.button.button-primary,
button#sib-picture-remove.button.button-primary {
color: var(--color-directory-complementary) !important;
}
#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 {

View File

@ -20,6 +20,8 @@
include views/project/page-project-chat.pug
#project-information.content-box__height(hidden)
include views/project/page-project-profile.pug
#project-picture(hidden)
include views/project/page-project-picture.pug
nav.jsRightMenu(role='navigation')
sib-router(default-route='project-chat')
@ -32,4 +34,4 @@ nav.jsRightMenu(role='navigation')
sib-route(name='project-information')
li
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) {
resource = resource.getResourceData();
refreshSibDisplays(resource["http://happy-dev.fr/owl/#user"]["@id"]);
refreshSibDisplays(resource["http://happy-dev.fr/owl/#project"]["@id"] + "members/");
refreshSibDisplays(resource["http://happy-dev.fr/owl/#circle"]["@id"] + "members/");
if (resource["http://happy-dev.fr/owl/#user"]) {
refreshSibDisplays(resource["http://happy-dev.fr/owl/#user"]["@id"]);
}
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

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-203-87-19: hsl(203, 87.8%, 19.2%);
$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'
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
)
h1.centered Créer un projet
h1 Créer un nouveau projet
sib-form.form.button-register(
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*'
class-customer='form-label is-light is-half-width'
range-customer=`${endpoints.customers || endpoints.get.customers}`
widget-customer='sib-form-auto-completion'
label-status='Statut du canal*'
widget-status='hubl-status'
class-status='form-label is-light is-full-width member-select color'
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*'
class-name='form-label is-light is-half-width input-text-like'
label-project.description='Description 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'
label-captain='Capitaine du projet*'
range-captain=`${endpoints.users || endpoints.get.users}`
class-captain='form-label is-light is-half-width'
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(
class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-plus'
next='admin-project-create'
) Créer un projet
) Créer un nouveau projet
.table-wrapper
.table
div.table-header.grey-color
div.w262 Nom
div.w262 Administrateurs
div.w262 Capitaines
div.w262 Accès
.table
div.table-header.grey-color
div.w25 Nom
div.w25 Administrateurs
div.w25 Capitaines
div.w25 Rejoindre
sib-widget(name="hubl-admin-project-leave-button")
template
sib-delete(
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
data-src="${src}"
data-label='Quitter'
)
sib-widget(name="hubl-admin-project-leave-button")
template
sib-delete(
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
data-src="${src}"
data-label='Quitter'
)
sib-widget(name='hubl-project-captain')
template
sib-display.user-thumb.is-spaced(
data-src='${await value}'
fields='account.picture, sup(name), sub(username)'
sib-widget(name='hubl-project-captain')
template
sib-display.user-thumb(
data-src='${await value}'
fields='account.picture, sup(name), sub(username)'
class-account.picture='avatar user-thumb__picture'
class-name='user-thumb__name'
class-username='user-thumb__username'
class-account.picture='user-thumb__picture'
class-name='user-thumb__name'
class-username='user-thumb__username'
widget-account.picture='hubl-user-avatar'
)
widget-account.picture='hubl-user-avatar'
)
sib-widget(name='hubl-project-admins')
template
sib-display(
data-src='${value}'
fields='user'
search-fields='is_admin'
search-value-is_admin='true'
search-widget-is_admin='sib-form-hidden'
widget-user='hubl-project-captain'
)
sib-widget(name='hubl-project-admins')
template
sib-display(
data-src='${value}'
fields='user'
search-fields='is_admin'
search-value-is_admin='true'
search-widget-is_admin='sib-form-hidden'
widget-user='hubl-project-captain'
)
sib-widget(name="hubl-admin-project-buttons")
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-widget(name='hubl-admin-project-leave-button')
template
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'
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='w262 border cell-with-name hashtag'
class-members='w262 border'
class-captain='w262 border cell-with-id-card'
class-buttons='w262 border cell-with-buttons'
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'
widget-buttons="admin-project-buttons"
action-buttons="buttons"
action-leaveButton="joinButton"
widget-leaveButton="hubl-admin-project-leave-button"
widget-captain='hubl-project-captain'
widget-members='hubl-project-admins'
)
widget-project.captain='hubl-project-captain'
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

View File

@ -9,24 +9,36 @@ div.content-box__info
sib-form.form.button-register(
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*'
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'
class-description='form-label is-light is-full-width'
widget-description='sib-form-textarea'
class-businessprovider='form-label is-light is-half-width input-text-like'
class-businessproviderfee='form-label is-light is-half-width input-text-like'
label-businessprovider='Apporteur d\'affaire'
label-businessproviderfee='Montant de la contribution'
partial=""
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 :
@ -44,18 +56,18 @@ div.content-box__info
submit-button='Ajouter un membre'
)
.table-wrapper
.table
div.table-header.grey-color
div.w355 Nom
div.W152 Accès
.table
//-class='table-body'
sib-display(
class='table-body'
bind-resources
fields='members'
div.table-header.grey-color
div.w66 Nom
div.w33 Accès
multiple-members=''
widget-members='hubl-team-template-edit'
)
//-class='table-body'
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'
)
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'
.flex.space-between.with-padding
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"
)
.space-between
sib-display(
bind-resources
fields='label-captain, captain'
@ -51,6 +66,7 @@ sib-router(default-route='project-profile', hidden)
multiple-members
)
sib-widget(name='hubl-project-leave-button')
template
sib-delete(
@ -59,22 +75,5 @@ sib-router(default-route='project-profile', hidden)
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)
include page-project-edit.pug