From 2e3be21cdceadf10f3f145865c41b609854505a5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 9 Dec 2019 18:23:47 +0100 Subject: [PATCH 01/14] update: adding project admin & creation --- src/dependencies.pug | 3 +- src/index.pug | 4 +- src/menu-left.pug | 45 ++++++++--------- src/page-admin-projects-create.pug | 46 +++++++++++++++++ src/page-admin-projects.pug | 79 +++++++++++++++++++++++++++++- src/page-admin.pug | 6 +-- src/page-project-create.pug | 30 ------------ src/page-project-drive.pug | 11 ----- src/page-project.pug | 12 +---- 9 files changed, 155 insertions(+), 81 deletions(-) create mode 100644 src/page-admin-projects-create.pug delete mode 100644 src/page-project-create.pug delete mode 100644 src/page-project-drive.pug diff --git a/src/dependencies.pug b/src/dependencies.pug index d046f15..92b9a9f 100644 --- a/src/dependencies.pug +++ b/src/dependencies.pug @@ -32,5 +32,6 @@ script(data-default-context, type="application/ld+json") | "account": "http://happy-dev.fr/owl/#account", | "jabberID": "foaf:jabberID", | "firstName": "http://happy-dev.fr/owl/#first_name", - | "lastName": "http://happy-dev.fr/owl/#last_name" + | "lastName": "http://happy-dev.fr/owl/#last_name", + | "isAdmin": "http://happy-dev.fr/owl/#is_admin" | } diff --git a/src/index.pug b/src/index.pug index ab13cbd..20a3c0b 100644 --- a/src/index.pug +++ b/src/index.pug @@ -29,8 +29,8 @@ html(lang="en") //- sib-link(class="backlink", next="job-offers") Back //- include page-job-offer-edit.pug - //- #project(hidden).with-sidebar - //- include page-project.pug + #project(hidden).with-sidebar + include page-project.pug #circle(hidden).with-sidebar include page-circle.pug diff --git a/src/menu-left.pug b/src/menu-left.pug index c2d902d..20dd0ab 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -19,28 +19,29 @@ nav#main__menu //- sib-route(name='job-offer-create', hidden) //- sib-route(name='job-offer-edit', use-id, hidden) //- div.divider - //- div.menu-wrapper - //- div.menu - //- div.menu-chevron - //- div.menu-icon.icon-arrow-up - //- div.menu-label Projects - //- div.menu-icon.icon-folder-alt - //- sib-route(name='project', rdf-type='hd:project', use-id='', hidden) - //- div.sub-menu.menu-notification - //- sib-display( - //- data-src=`${endpoints.projects}` - //- fields='project(customer.name, dash, name), badge' - //- empty-widget='hd-create' - //- empty-value='project' - //- value-dash=' - ' - //- search-fields='team' - //- search-widget-team='sib-form-hidden' - //- search-value-team='-' - //- hd-inherit-user-id='search-value-team' - //- hd-inherit-widgets - //- widget-badge='hd-counter' - //- action-badge='badge' - //- ) + div.menu-wrapper + div.menu + div.menu-chevron + sib-link(next='admin-project-list') + div.menu-icon.icon-arrow-right + div.menu-label Projects + div.menu-icon.icon-folder-alt + sib-route(name='project', rdf-type='hd:project', use-id='', hidden) + div.sub-menu.menu-notification + sib-display( + data-src=`${endpoints.projects}` + fields='project(customer.name, dash, name), badge' + empty-widget='hd-create' + empty-value='project' + value-dash=' - ' + search-fields='team' + search-widget-team='sib-form-hidden' + search-value-team='-' + hd-inherit-user-id='search-value-team' + hd-inherit-widgets + widget-badge='hd-counter' + action-badge='badge' + ) div.divider div.menu-wrapper div.menu diff --git a/src/page-admin-projects-create.pug b/src/page-admin-projects-create.pug new file mode 100644 index 0000000..6ee748c --- /dev/null +++ b/src/page-admin-projects-create.pug @@ -0,0 +1,46 @@ +div.content-box__info + sib-link(class="backlink" next='admin-project-list') Back + + h1 New project + + p.center Here you can create a new project according to your interests, what you want to share, etc. + + sib-form.block( + data-src=`${endpoints.projects}` + + fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain)' + + label-customer.name='Customer\'s name*' + + label-name='Project\'s name*' + + label-customer.logo='Customer\'s logo' + + label-description='Project description' + widget-description='sib-form-textarea' + + label-businessProvider.name='Business provider*' + + label-businessProvider.fee='Amount of the contribution' + + label-customer.companyregister='Company register' + + label-customer.address='Address' + widget-customer.address='sib-form-textarea' + + label-customer.firstName='Name of the contact' + + label-customer.lastName='Firstname of the contact' + + label-customer.role='Role within the company' + + label-customer.email='Email' + + label-customer.phone='Phone' + + range-captain=`${endpoints.users}` + + next='admin-project-list' + + submit-button='Save' + ) diff --git a/src/page-admin-projects.pug b/src/page-admin-projects.pug index 80f8d3f..0f5e64c 100644 --- a/src/page-admin-projects.pug +++ b/src/page-admin-projects.pug @@ -3,8 +3,85 @@ sib-route(name='admin-project-list') sib-route(name='admin-project-create') + div.content-box__header.with-description + div + p.name Administration #admin-project-list(hidden) + include templates/hd-user-avatar.pug + div.content-box__info + div.admin-header + div.admin-header__title Projects + sib-link( + class='button text-bold text-uppercase reversed button-yellow bordered with-icon icon-plus' + next='admin-project-create' + ) Create a new project - #admin-project-create(hidden) \ No newline at end of file + .table + div.table-header.grey-color + div Name + div Admins + div Captain + div Leave + + sib-widget(name="admin-project-leave-button") + template + sib-delete( + class='button btn-margin-left text-bold text-uppercase reversed button-dark bordered with-icon icon-close' + data-src="${src}" + data-label='Leave' + ) + + sib-widget(name='project-captain') + template + sib-display( + data-src='${await value}' + fields='account.picture, sup(name), sub(username)' + + widget-account.picture='hd-user-avatar' + ) + + sib-widget(name='project-admins') + template + sib-display( + data-src='${value}' + fields='user' + search-fields='isAdmin' + search-value-isAdmin='true' + search-widget-isAdmin='sib-form-hidden' + widget-user='project-captain' + ) + + sib-widget(name="admin-project-buttons") + template + sib-display( + data-src='${src}' + nested-field='members' + fields='relation' + action-relation='relation' + widget-relation='admin-project-leave-button' + search-fields='user' + search-widget-user='sib-form-hidden' + search-value-user="-" + hd-inherit-user-id="search-value-user" + hd-inherit-widgets + ) + + sib-display( + class='table-body' + + data-src=`${endpoints.projects}` + fields='name, members, captain, buttons' + + widget-buttons="admin-project-buttons" + action-buttons="buttons" + hd-inherit-widgets + hd-inherit-widgets-multiple + + widget-captain='project-captain' + widget-members='project-admins' + ) + + #admin-project-create(hidden) + include page-admin-projects-create.pug \ No newline at end of file diff --git a/src/page-admin.pug b/src/page-admin.pug index 15fdfd1..854c0e0 100644 --- a/src/page-admin.pug +++ b/src/page-admin.pug @@ -1,10 +1,10 @@ .views-container #admin-circles(hidden) include page-admin-circles.pug + #admin-projects(hidden) + include page-admin-projects.pug //- #admin-users(hidden) //- include page-admin-users.pug -//- #admin-projects(hidden) -//- include page-admin-projects.pug nav.jsRightMenu(role='navigation') sib-router(default-route='admin-circles') ul @@ -16,6 +16,6 @@ nav.jsRightMenu(role='navigation') sib-route(name='admin-circles') li a Circles - //- sib-route(name='admin-projects') + sib-route(name='admin-projects') li a Projects diff --git a/src/page-project-create.pug b/src/page-project-create.pug deleted file mode 100644 index 80cbcea..0000000 --- a/src/page-project-create.pug +++ /dev/null @@ -1,30 +0,0 @@ -.content-box.with-padding.with-form.full-width - h1 New project - p Here you can create your project, add members and assign them a job. - - sib-form.block( - data-src=`${endpoints.projects}`, - range-members=`${endpoints.users}`, - range-team=`${endpoints.users}`, - - fields='block-project__info(customer.name, name, customer.logo, description), block-project__fee(fieldset-fee, businessProvider, businessProviderFee), block-project__customer(fieldset-customer, customer.companyRegister, customer.address, customer.firstName, customer.lastName, customer.role, customer.email, customer.phone)', - - label-customer.name='Customer\'s name', - label-name='Project\'s name', - label-customer.logo='Customer\'s logo', - label-description='Project description', - - widget-fieldset-fee='hd-template-project-title', - label-businessProvider='Business provider', - label-businessProviderFee='Amount of the contribution', - - widget-fieldset-customer='hd-template-project-title', - label-customer.companyRegister='Company register', - label-customer.address='Address', - label-customer.firstName='Name of the contact at the customer\'s premises', - label-customer.lastName='Firstname of the contact at the customer\'s premises', - label-customer.role='Role within the company', - label-customer.email='Email', - label-customer.phone='Phone' - ) - \ No newline at end of file diff --git a/src/page-project-drive.pug b/src/page-project-drive.pug deleted file mode 100644 index 1c06462..0000000 --- a/src/page-project-drive.pug +++ /dev/null @@ -1,11 +0,0 @@ -sib-widget(name='hd-drive') - template - iframe.drive.chat-view( - src='https://drive.google.com/embeddedfolderview?id=${value}' - ) -.content-box.with-padding.full-width.chat-view - sib-display( - bind-resources="" - fields="driveID" - widget-driveID='hd-drive' - ) \ No newline at end of file diff --git a/src/page-project.pug b/src/page-project.pug index 6f1f7f1..916c930 100644 --- a/src/page-project.pug +++ b/src/page-project.pug @@ -5,10 +5,6 @@ include page-project-profile.pug #project-edit include page-project-edit.pug - #project-create - include page-project-create.pug - #project-drive - include page-project-drive.pug nav.jsRightMenu(role='navigation') sib-router(default-route='project-chat') ul @@ -20,12 +16,6 @@ nav.jsRightMenu(role='navigation') sib-route(name='project-profile', use-id) li a Information - sib-route(name='project-drive', use-id) - li - a Drive sib-route(name='project-edit', use-id) li - a Edit - sib-route(name='project-create', use-id) - //- li - //- a Add new \ No newline at end of file + a Edit \ No newline at end of file From caad1f69bf368f57e1bda547c2d24cbacd1938b0 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 10 Dec 2019 15:33:33 +0100 Subject: [PATCH 02/14] fix: target sib-ac-checker to members --- src/page-circle-edit.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/page-circle-edit.pug b/src/page-circle-edit.pug index 2ef1c0a..75a523f 100644 --- a/src/page-circle-edit.pug +++ b/src/page-circle-edit.pug @@ -64,7 +64,7 @@ div.content-box__info h2 Members list - sib-ac-checker(permission='acl:Append', bind-resources, nested-field='team') + sib-ac-checker(permission='acl:Append', bind-resources, nested-field='members') sib-form.block.team-form( bind-resources nested-field='members' From d7b6b478cfbf65261f8d4a25c9ea39515fce4135 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Tue, 10 Dec 2019 15:36:52 +0100 Subject: [PATCH 03/14] fix: remove team relation --- src/menu-left.pug | 16 ++++++++-------- src/page-circle-profile.pug | 6 +++--- src/page-project-profile.pug | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/menu-left.pug b/src/menu-left.pug index 20dd0ab..7860eef 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -34,10 +34,10 @@ nav#main__menu empty-widget='hd-create' empty-value='project' value-dash=' - ' - search-fields='team' - search-widget-team='sib-form-hidden' - search-value-team='-' - hd-inherit-user-id='search-value-team' + search-fields='members.user' + search-widget-members.user='sib-form-hidden' + search-value-members.user='-' + hd-inherit-user-id='search-value-members.user' hd-inherit-widgets widget-badge='hd-counter' action-badge='badge' @@ -60,10 +60,10 @@ nav#main__menu widget-name='sib-display-div', widget-badge='hd-counter' action-badge='badge' - search-fields='team' - search-widget-team='sib-form-hidden' - search-value-team='-' - hd-inherit-user-id='search-value-team' + search-fields='members.user' + search-widget-members.user='sib-form-hidden' + search-value-members.user='-' + hd-inherit-user-id='search-value-members.user' hd-inherit-widgets order-by='name' next='circle' diff --git a/src/page-circle-profile.pug b/src/page-circle-profile.pug index 163daa7..76c55f6 100644 --- a/src/page-circle-profile.pug +++ b/src/page-circle-profile.pug @@ -23,10 +23,10 @@ sib-router(default-route='circle-profile', hidden) sib-display.block( bind-resources - fields='team' + fields='members.user' - multiple-team='' - widget-team='circle-team-template' + multiple-members.user='' + widget-members.user='circle-team-template' ) div.box-button diff --git a/src/page-project-profile.pug b/src/page-project-profile.pug index 0510d97..73c8346 100644 --- a/src/page-project-profile.pug +++ b/src/page-project-profile.pug @@ -24,7 +24,7 @@ value-label-captain='CAPTAIN:', widget-captain='captain-template', - value-label-team='TEAM:', + value-label-members='TEAM:', widget-members='project-team-template', multiple-members, From 752acbecaec705defe3bee46453a9b8e951a038b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Thu, 12 Dec 2019 14:34:09 +0100 Subject: [PATCH 04/14] fix: target user container on menu bar --- src/menu-left.pug | 34 ++++++++++++------------------ src/page-admin-projects-create.pug | 17 ++++++++++++++- src/page-admin.pug | 4 ++-- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/menu-left.pug b/src/menu-left.pug index 7860eef..26a72fb 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -1,6 +1,6 @@ sib-widget(name='hd-counter') template - sib-badge(data-src="${src}") + sib-badge(data-src="${value['@id']}") sib-widget(name='hd-create') template @@ -29,18 +29,15 @@ nav#main__menu sib-route(name='project', rdf-type='hd:project', use-id='', hidden) div.sub-menu.menu-notification sib-display( - data-src=`${endpoints.projects}` - fields='project(customer.name, dash, name), badge' + bind-user + nested-field='projects' + fields='line(project.customer.name, dash, project.name), project' empty-widget='hd-create' empty-value='project' value-dash=' - ' - search-fields='members.user' - search-widget-members.user='sib-form-hidden' - search-value-members.user='-' - hd-inherit-user-id='search-value-members.user' - hd-inherit-widgets - widget-badge='hd-counter' - action-badge='badge' + widget-project='hd-counter' + order-by='project.customer.name' + next='project' ) div.divider div.menu-wrapper @@ -53,19 +50,14 @@ nav#main__menu sib-route(name='circle', rdf-type='hd:circle', use-id='', hidden) div.sub-menu.menu-notification sib-display( - data-src=`${endpoints.circles}` - fields='name, badge' + bind-user + nested-field='circles' + fields='circle.name, circle' empty-widget='hd-create' empty-value='circle' - widget-name='sib-display-div', - widget-badge='hd-counter' - action-badge='badge' - search-fields='members.user' - search-widget-members.user='sib-form-hidden' - search-value-members.user='-' - hd-inherit-user-id='search-value-members.user' - hd-inherit-widgets - order-by='name' + widget-circle.name='sib-display-div', + widget-circle='hd-counter' + order-by='circle.name' next='circle' ) div.divider diff --git a/src/page-admin-projects-create.pug b/src/page-admin-projects-create.pug index 6ee748c..4668bb2 100644 --- a/src/page-admin-projects-create.pug +++ b/src/page-admin-projects-create.pug @@ -1,6 +1,17 @@ div.content-box__info sib-link(class="backlink" next='admin-project-list') Back + sib-widget(name="admin-project-add-user") + template + sib-form( + data-holder + fields='user, project' + range-user=`${endpoints.users}` + value-project='${src}' + widget-project='sib-form-hidden' + naked + ) + h1 New project p.center Here you can create a new project according to your interests, what you want to share, etc. @@ -8,7 +19,7 @@ div.content-box__info sib-form.block( data-src=`${endpoints.projects}` - fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain)' + fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain), line-11(members)' label-customer.name='Customer\'s name*' @@ -40,6 +51,10 @@ div.content-box__info range-captain=`${endpoints.users}` + widget-members='admin-project-add-user' + action-members='members' + multiple-members + next='admin-project-list' submit-button='Save' diff --git a/src/page-admin.pug b/src/page-admin.pug index 854c0e0..2dd6834 100644 --- a/src/page-admin.pug +++ b/src/page-admin.pug @@ -3,8 +3,8 @@ include page-admin-circles.pug #admin-projects(hidden) include page-admin-projects.pug -//- #admin-users(hidden) -//- include page-admin-users.pug + //- #admin-users(hidden) + include page-admin-users.pug nav.jsRightMenu(role='navigation') sib-router(default-route='admin-circles') ul From d0d5cd640319ff55efd3b24defb0063558a151c9 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Fri, 3 Jan 2020 14:02:19 +0100 Subject: [PATCH 05/14] fix: drive source file --- src/page-project.pug | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/page-project.pug b/src/page-project.pug index 9ca8951..09f7688 100644 --- a/src/page-project.pug +++ b/src/page-project.pug @@ -19,8 +19,6 @@ include page-project-chat.pug #project-information(hidden) include page-project-profile.pug - #project-drive(hidden) - include page-project-drive.pug dialog(id='project-contributions-help').modal sib-link(next='project-profile') From c493764d4d47a217d69fc5f6ea08d0bf2c693411 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Fri, 3 Jan 2020 14:08:06 +0100 Subject: [PATCH 06/14] fix: cancel src to user container for project and circles --- src/menu-left.pug | 39 ++++++++++++++++++++++++--------------- src/page-project.pug | 3 --- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/menu-left.pug b/src/menu-left.pug index ce61105..8885263 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -1,6 +1,6 @@ sib-widget(name='hd-counter') template - sib-badge(data-src="${value['@id']}") + sib-badge(data-src="${src}") sib-widget(name='hd-create') template @@ -29,16 +29,20 @@ nav#main__menu sib-route(name='project', rdf-type='hd:project', use-id='', hidden) div.sub-menu.menu-notification sib-display.project-tab( - bind-user - nested-field='projects' - fields='line(project.customer.name, dash, project.name), project' - class-project.customer.name='project-customer' - class-project.name='project-name' + data-src=`${endpoints.projects}` + fields='project(customer.name, name), badge' + class-customer.name='project-customer' + class-name='project-name' empty-widget='hd-create' empty-value='project' - value-dash=' - ' - widget-project='hd-counter' - order-by='project.customer.name' + search-fields='team' + search-widget-team='sib-form-hidden' + search-value-team='-' + hd-inherit-user-id='search-value-team' + hd-inherit-widgets + widget-badge='hd-counter' + action-badge='badge' + order-by='customer.name' next='project' ) div.divider @@ -52,14 +56,19 @@ nav#main__menu sib-route(name='circle', rdf-type='hd:circle', use-id='', hidden) div.sub-menu.menu-notification sib-display( - bind-user - nested-field='circles' - fields='circle.name, circle' + data-src=`${endpoints.circles}` + fields='name, badge' empty-widget='hd-create' empty-value='circle' - widget-circle.name='sib-display-div', - widget-circle='hd-counter' - order-by='circle.name' + widget-name='sib-display-div', + widget-badge='hd-counter' + action-badge='badge' + search-fields='team' + search-widget-team='sib-form-hidden' + search-value-team='-' + hd-inherit-user-id='search-value-team' + hd-inherit-widgets + order-by='name' next='circle' ) div.divider diff --git a/src/page-project.pug b/src/page-project.pug index 09f7688..00ec69a 100644 --- a/src/page-project.pug +++ b/src/page-project.pug @@ -36,7 +36,4 @@ nav.jsRightMenu(role='navigation') sib-route(name='project-information') li a Information - sib-route(name='project-drive', use-id) - li - a Drive sib-route(name='project-contributions-help') \ No newline at end of file From ef20af91ddba3423ab79878e4c1124c2b1f8ee30 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Fri, 3 Jan 2020 14:15:31 +0100 Subject: [PATCH 07/14] fix: remove members on project creation --- src/page-admin-projects-create.pug | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/page-admin-projects-create.pug b/src/page-admin-projects-create.pug index 4668bb2..da7533f 100644 --- a/src/page-admin-projects-create.pug +++ b/src/page-admin-projects-create.pug @@ -19,7 +19,7 @@ div.content-box__info sib-form.block( data-src=`${endpoints.projects}` - fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain), line-11(members)' + fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain)' label-customer.name='Customer\'s name*' @@ -51,10 +51,6 @@ div.content-box__info range-captain=`${endpoints.users}` - widget-members='admin-project-add-user' - action-members='members' - multiple-members - next='admin-project-list' submit-button='Save' From 4fb569b9ef990f31290363ea0fa3d23603c3e946 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Mon, 6 Jan 2020 12:19:08 +0100 Subject: [PATCH 08/14] Left menu: css improved for the projects tab --- src/styles/base/menu-left.scss | 81 ++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 33 deletions(-) diff --git a/src/styles/base/menu-left.scss b/src/styles/base/menu-left.scss index 606db3c..b4be43c 100644 --- a/src/styles/base/menu-left.scss +++ b/src/styles/base/menu-left.scss @@ -92,50 +92,64 @@ .sub-menu { - sib-set-default[name='project'] { - padding: 1rem 1rem 1rem 3.2rem; + /* Specific styles for the "Projects" tab */ - .project-customer, - .project-name { - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - - .project-customer { - font-weight: bold; - width: 150px; - } - - .project-name { - padding-left: 14px; - width: calc(150px - 10px); - /* 10px = padding of the sib-set-default = better alignment */ - } - } - - .project-tab>div>sib-display[fields='project(customer.name, name), badge']>div:hover { - background-color: $color-233-20-17; + .project-tab>div>sib-display>div:nth-child(1) { sib-set-default[name='project'] { - background-color: $color-233-20-17; - box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.26); - color: $color-218-100-98; - /* transition: all 0.6s cubic-bezier(0.39, 0.575, 0.565, 1); Need better animation */ - width: auto; - z-index: 1000; + padding: 1rem 1rem 1rem 3.2rem; .project-customer, .project-name { - width: auto; + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .project-customer { + font-weight: bold; + width: 150px; } .project-name { - font-weight: normal; - } + padding-left: 14px; + width: calc(150px - 10px); + /* 10px = padding of the sib-set-default = better alignment */ + } + } + + hd-counter { + margin-top: 16px; + margin-left: 8px; + } + + &:hover { + background-color: $color-233-20-17; + box-shadow: 0 0 7px 0 rgba(0, 0, 0, 0.26); + + sib-set-default[name='project'] { + background-color: $color-233-20-17; + color: $color-218-100-98; + /* transition: all 0.6s cubic-bezier(0.39, 0.575, 0.565, 1); Need better animation */ + z-index: 1000; + + .project-customer, + .project-name { + width: auto; + } + + .project-name { + font-weight: normal; + } + } + + hd-counter { + display: none; + } } } + /* End of specific styles of "Projects" tab */ sib-display>div { @@ -175,6 +189,7 @@ flex: 3; } hd-counter { + background: burlywood; height: 20px; width: 20px; margin-right: 1em; From d59063213035e954734a8601d2ccc9eefd91e3a5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Pasquier Date: Mon, 6 Jan 2020 15:00:40 +0100 Subject: [PATCH 09/14] fix: left menu arrows --- src/menu-left.pug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/menu-left.pug b/src/menu-left.pug index 8885263..46c18e6 100644 --- a/src/menu-left.pug +++ b/src/menu-left.pug @@ -19,7 +19,7 @@ nav#main__menu //- sib-route(name='job-offer-create', hidden) //- sib-route(name='job-offer-edit', use-id, hidden) //- div.divider - div.menu-wrapper + div div.menu div.menu-chevron sib-link(next='admin-project-list') @@ -46,7 +46,7 @@ nav#main__menu next='project' ) div.divider - div.menu-wrapper + div div.menu div.menu-chevron sib-link(next='admin-circle-list') From ebfd1fe44b4240b02ec85569402aa1ac41bbc7b7 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Mon, 6 Jan 2020 17:40:58 +0100 Subject: [PATCH 10/14] admin-project-create: form stylized (part 1) --- src/page-admin-circles-create.pug | 2 +- src/page-admin-circles.pug | 3 +-- src/page-admin-projects-create.pug | 23 +++++++++++++++---- src/page-admin-projects.pug | 3 +-- src/styles/base/form.scss | 5 +++- src/styles/base/main.scss | 19 +++++++++++++++ src/styles/layout/circle/_index.scss | 1 - .../layout/circle/admin-circle-create.scss | 13 ----------- src/styles/layout/circle/circle.scss | 3 ++- 9 files changed, 46 insertions(+), 26 deletions(-) delete mode 100644 src/styles/layout/circle/admin-circle-create.scss diff --git a/src/page-admin-circles-create.pug b/src/page-admin-circles-create.pug index 4be5618..ef8661d 100644 --- a/src/page-admin-circles-create.pug +++ b/src/page-admin-circles-create.pug @@ -1,7 +1,7 @@ div.content-box__info sib-link(class="backlink", next='admin-circle-list') Back - h1 New circle + h1.centered New circle p.center Here you can create a new circle according to your interests, what you want to share, etc. diff --git a/src/page-admin-circles.pug b/src/page-admin-circles.pug index 1c72ae7..44d087d 100644 --- a/src/page-admin-circles.pug +++ b/src/page-admin-circles.pug @@ -4,8 +4,7 @@ sib-route(name='admin-circle-create') div.content-box__header.with-description - div - p.name Administration + h1.title-left.without-margin Administration #admin-circle-list(hidden) diff --git a/src/page-admin-projects-create.pug b/src/page-admin-projects-create.pug index da7533f..808edc0 100644 --- a/src/page-admin-projects-create.pug +++ b/src/page-admin-projects-create.pug @@ -12,9 +12,7 @@ div.content-box__info naked ) - h1 New project - - p.center Here you can create a new project according to your interests, what you want to share, etc. + h1.centered New project sib-form.block( data-src=`${endpoints.projects}` @@ -22,34 +20,49 @@ div.content-box__info fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain)' label-customer.name='Customer\'s name*' + class-customer.name='form-label is-light is-half-width' label-name='Project\'s name*' + class-name='form-label is-light is-half-width' label-customer.logo='Customer\'s logo' + class-customer.logo='form-label is-light is-half-width' - label-description='Project description' - widget-description='sib-form-textarea' + label-project.description='Project description' + class-project.description='form-label is-light is-full-width' + widget-project.description='sib-form-textarea' label-businessProvider.name='Business provider*' + class-businessProvider.name='form-label is-light is-half-width' label-businessProvider.fee='Amount of the contribution' + class-businessProvider.fee='form-label is-light is-half-width' label-customer.companyregister='Company register' + class-customer.companyregister='form-label is-light is-half-width' label-customer.address='Address' + class-customer.address='form-label is-light is-full-width' widget-customer.address='sib-form-textarea' label-customer.firstName='Name of the contact' + class-customer.firstName='form-label is-light is-half-width' label-customer.lastName='Firstname of the contact' + class-customer.lastName='form-label is-light is-half-width' label-customer.role='Role within the company' + class-customer.role='form-label is-light is-half-width' label-customer.email='Email' + class-customer.email='form-label is-light is-half-width' label-customer.phone='Phone' + class-customer.phone='form-label is-light is-half-width' range-captain=`${endpoints.users}` + class-captain='member-select form-label is-light is-half-width' + widget-captain='sib-form-auto-completion' next='admin-project-list' diff --git a/src/page-admin-projects.pug b/src/page-admin-projects.pug index 0f5e64c..72fed84 100644 --- a/src/page-admin-projects.pug +++ b/src/page-admin-projects.pug @@ -4,8 +4,7 @@ sib-route(name='admin-project-create') div.content-box__header.with-description - div - p.name Administration + h1.title-left.without-margin Administration #admin-project-list(hidden) include templates/hd-user-avatar.pug diff --git a/src/styles/base/form.scss b/src/styles/base/form.scss index 8ef5984..ef13710 100644 --- a/src/styles/base/form.scss +++ b/src/styles/base/form.scss @@ -6,7 +6,10 @@ color: $color-233-18-29; font-weight: bold; font-size: 2rem; - text-align: center; + + &.centered { + text-align: center; + } } .fieldset { diff --git a/src/styles/base/main.scss b/src/styles/base/main.scss index 8c7f2e4..a46ef28 100644 --- a/src/styles/base/main.scss +++ b/src/styles/base/main.scss @@ -75,6 +75,10 @@ h1, .h1-like { color: $color-233-18-29; font-size: 2rem; text-transform: uppercase; + + &.without-margin { + margin: 0; + } } h2, .h2-like { @@ -104,6 +108,21 @@ h5 { padding: 3.2rem; } +#admin-circle-create, +#admin-project-create { + + input[type='submit'] { + @extend .button, + .text-bold, + .text-uppercase, + .reversed, + .button-dark, + .bordered; + margin-left: auto; + margin-top: 3.2rem; + } +} + .content-box { @include window-style-modal(); display: flex; diff --git a/src/styles/layout/circle/_index.scss b/src/styles/layout/circle/_index.scss index 17b4580..8ef0299 100644 --- a/src/styles/layout/circle/_index.scss +++ b/src/styles/layout/circle/_index.scss @@ -2,4 +2,3 @@ @import 'circle-profile'; @import 'circle-edit'; @import 'circle-admin'; -@import 'admin-circle-create'; \ No newline at end of file diff --git a/src/styles/layout/circle/admin-circle-create.scss b/src/styles/layout/circle/admin-circle-create.scss deleted file mode 100644 index ac5bee0..0000000 --- a/src/styles/layout/circle/admin-circle-create.scss +++ /dev/null @@ -1,13 +0,0 @@ -#admin-circle-create { - - input[type='submit'] { - @extend .button, - .text-bold, - .text-uppercase, - .reversed, - .button-dark, - .bordered; - margin-left: auto; - margin-top: 3.2rem; - } -} diff --git a/src/styles/layout/circle/circle.scss b/src/styles/layout/circle/circle.scss index 160ecae..98164ee 100644 --- a/src/styles/layout/circle/circle.scss +++ b/src/styles/layout/circle/circle.scss @@ -1,7 +1,8 @@ #circle-information, #circle-edit, #admin-circle-list, -#admin-circle-create { +#admin-circle-create, +#admin-project-create { .content-box__info { @extend %padding-block; From 1ca894298e8eac2ca2fbf19965f767b523f6086d Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 8 Jan 2020 00:59:44 +0100 Subject: [PATCH 11/14] admin-project: table ok + icon added in sidebar --- src/page-admin-circles.pug | 1 + src/page-admin-projects.pug | 7 ++++++- src/styles/base/main.scss | 3 ++- src/styles/base/menu-left.scss | 1 - src/styles/components/sidebar.scss | 6 +++++- src/styles/layout/circle/circle.scss | 17 +++++++++++------ 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/page-admin-circles.pug b/src/page-admin-circles.pug index 44d087d..9f53e1f 100644 --- a/src/page-admin-circles.pug +++ b/src/page-admin-circles.pug @@ -90,6 +90,7 @@ class-name='w33 cell border' class-owner='w33 cell border' + class-buttons='w33 cell border' widget-buttons="admin-circle-buttons" action-buttons="buttons" diff --git a/src/page-admin-projects.pug b/src/page-admin-projects.pug index 72fed84..ce7acb7 100644 --- a/src/page-admin-projects.pug +++ b/src/page-admin-projects.pug @@ -27,7 +27,7 @@ sib-widget(name="admin-project-leave-button") template sib-delete( - class='button btn-margin-left text-bold text-uppercase reversed button-dark bordered with-icon icon-close' + class='button text-bold text-uppercase reversed button-dark bordered with-icon icon-close' data-src="${src}" data-label='Leave' ) @@ -73,6 +73,11 @@ data-src=`${endpoints.projects}` fields='name, members, captain, buttons' + class-name='w25 cell border' + class-members='w25 cell border' + class-captain='w25 cell border' + class-buttons='w25 cell border' + widget-buttons="admin-project-buttons" action-buttons="buttons" hd-inherit-widgets diff --git a/src/styles/base/main.scss b/src/styles/base/main.scss index a46ef28..a6a3811 100644 --- a/src/styles/base/main.scss +++ b/src/styles/base/main.scss @@ -34,7 +34,8 @@ $breakpoints: (phone: 480px, /* Quick fix. Will be removed later */ -#admin-circles { +#admin-circles, +#admin-projects { display: contents; } diff --git a/src/styles/base/menu-left.scss b/src/styles/base/menu-left.scss index b4be43c..9848525 100644 --- a/src/styles/base/menu-left.scss +++ b/src/styles/base/menu-left.scss @@ -189,7 +189,6 @@ flex: 3; } hd-counter { - background: burlywood; height: 20px; width: 20px; margin-right: 1em; diff --git a/src/styles/components/sidebar.scss b/src/styles/components/sidebar.scss index e5e0592..1e93db5 100644 --- a/src/styles/components/sidebar.scss +++ b/src/styles/components/sidebar.scss @@ -72,7 +72,7 @@ } &[name*='circle'], - &[name^='project'] { + &[name*='project'] { >li::before { font-size: 4rem; @@ -102,6 +102,10 @@ &[name='admin-circles']>li { @include ci('bubble-add'); } + + &[name='admin-projects']>li { + @include ci('add'); + } } } } diff --git a/src/styles/layout/circle/circle.scss b/src/styles/layout/circle/circle.scss index 98164ee..209b6d6 100644 --- a/src/styles/layout/circle/circle.scss +++ b/src/styles/layout/circle/circle.scss @@ -2,6 +2,7 @@ #circle-edit, #admin-circle-list, #admin-circle-create, +#admin-project-list, #admin-project-create { .content-box__info { @@ -60,6 +61,10 @@ word-wrap: break-word; } + .w25 { + width: 25%; + } + .w33 { width: 33.3333%; } @@ -69,9 +74,7 @@ } [name="buttons"] { - @extend .border; - @extend .cell; - @extend .w33; + } } @@ -81,8 +84,10 @@ padding-top: 2.5rem; } - [name='members']>sib-display>div, - [name='owner']>sib-display>div { + team-template-edit>sib-display>div, + [name='owner']>sib-display>div, + project-captain[name='user']>sib-display>div, + [name='captain']>sib-display>div { display: grid; grid-column-gap: 1.6rem; grid-template-columns: 7vh auto; @@ -159,7 +164,7 @@ } } - admin-circle-buttons[name='buttons'] { + [name='buttons'] { align-items: center; display: flex; justify-content: center; From 52dc49fcd26333cfa3e0ebae1aa9e1fb38314da4 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 8 Jan 2020 10:58:59 +0100 Subject: [PATCH 12/14] 'fieldset' added to admin-project-create --- src/page-admin-projects-create.pug | 18 +++++++++++++++++- src/styles/base/form.scss | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/page-admin-projects-create.pug b/src/page-admin-projects-create.pug index 808edc0..7a36080 100644 --- a/src/page-admin-projects-create.pug +++ b/src/page-admin-projects-create.pug @@ -1,3 +1,7 @@ +sib-widget(name='hd-template-project-title') + template + p ${value} + div.content-box__info sib-link(class="backlink" next='admin-project-list') Back @@ -17,7 +21,19 @@ div.content-box__info sib-form.block( data-src=`${endpoints.projects}` - fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), line-4(businessProvider.name, businessProvider.fee), line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), line-10(captain)' + fields='line-1(customer.name, name), line-2(customer.logo), line-3(project.description), fieldset-fee, line-4(businessProvider.name, businessProvider.fee), fieldset-customer, line-5(customer.companyRegister), line-6(customer.address), line-7(customer.firstName, customer.lastName), line-8(customer.role), line-9(customer.email, customer.phone), fieldset-captain, line-10(captain)' + + class-fieldset-fee='fieldset' + value-fieldset-fee='Fee' + widget-fieldset-fee='hd-template-project-title' + + class-fieldset-customer='fieldset' + value-fieldset-customer='Customer\'s information' + widget-fieldset-customer='hd-template-project-title' + + class-fieldset-captain='fieldset' + value-fieldset-captain='Captain' + widget-fieldset-captain='hd-template-project-title' label-customer.name='Customer\'s name*' class-customer.name='form-label is-light is-half-width' diff --git a/src/styles/base/form.scss b/src/styles/base/form.scss index ef13710..3dff76e 100644 --- a/src/styles/base/form.scss +++ b/src/styles/base/form.scss @@ -19,7 +19,8 @@ flex: 1 0 100%; font-size: 1.8rem; font-weight: 600; - padding-bottom: 1rem; + margin: 2.6rem 0 1.8rem; + padding-bottom: 0.8rem; } p.center { From 5affa10a7c6f536f92b3da085d74af8bf9ce0304 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 8 Jan 2020 11:10:42 +0100 Subject: [PATCH 13/14] admin-project: hashtag added to project's name --- src/page-admin-projects.pug | 2 +- src/styles/layout/circle/circle.scss | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/page-admin-projects.pug b/src/page-admin-projects.pug index ce7acb7..0ac998e 100644 --- a/src/page-admin-projects.pug +++ b/src/page-admin-projects.pug @@ -73,7 +73,7 @@ data-src=`${endpoints.projects}` fields='name, members, captain, buttons' - class-name='w25 cell border' + class-name='w25 cell border hashtag' class-members='w25 cell border' class-captain='w25 cell border' class-buttons='w25 cell border' diff --git a/src/styles/layout/circle/circle.scss b/src/styles/layout/circle/circle.scss index 209b6d6..2d2e04f 100644 --- a/src/styles/layout/circle/circle.scss +++ b/src/styles/layout/circle/circle.scss @@ -72,9 +72,9 @@ .w50 { width: 50%; } - - [name="buttons"] { + .hashtag::before { + content: '#'; } } From 74fe061e9add84f5399d4e97d81be70c87cfd046 Mon Sep 17 00:00:00 2001 From: gaelle morin Date: Wed, 8 Jan 2020 17:29:23 +0100 Subject: [PATCH 14/14] CSS: styles of table refactored --- src/page-admin-circles.pug | 6 +- src/page-admin-projects.pug | 6 +- src/page-circle-edit.pug | 2 +- src/styles/base/main.scss | 1 + src/styles/base/table.scss | 193 +++++++++++++++++++++++++++ src/styles/layout/circle/circle.scss | 11 +- 6 files changed, 206 insertions(+), 13 deletions(-) create mode 100644 src/styles/base/table.scss diff --git a/src/page-admin-circles.pug b/src/page-admin-circles.pug index 9f53e1f..3d202b5 100644 --- a/src/page-admin-circles.pug +++ b/src/page-admin-circles.pug @@ -88,9 +88,9 @@ data-src=`${endpoints.circles}` fields='name, owner, buttons' - class-name='w33 cell border' - class-owner='w33 cell border' - class-buttons='w33 cell border' + class-name='w33 cell border cell-with-name' + class-owner='w33 cell border cell-with-id-card' + class-buttons='w33 cell border cell-with-buttons' widget-buttons="admin-circle-buttons" action-buttons="buttons" diff --git a/src/page-admin-projects.pug b/src/page-admin-projects.pug index 0ac998e..f9866f8 100644 --- a/src/page-admin-projects.pug +++ b/src/page-admin-projects.pug @@ -73,10 +73,10 @@ data-src=`${endpoints.projects}` fields='name, members, captain, buttons' - class-name='w25 cell border hashtag' + class-name='w25 cell border cell-with-name hashtag' class-members='w25 cell border' - class-captain='w25 cell border' - class-buttons='w25 cell border' + class-captain='w25 cell border cell-with-id-card' + class-buttons='w25 cell border cell-with-buttons' widget-buttons="admin-project-buttons" action-buttons="buttons" diff --git a/src/page-circle-edit.pug b/src/page-circle-edit.pug index 75a523f..2a7bab0 100644 --- a/src/page-circle-edit.pug +++ b/src/page-circle-edit.pug @@ -8,7 +8,7 @@ div.content-box__info sib-widget(name='team-template-edit') template sib-display( - class='w50 cell border' + class='w50 cell border cell-with-id-card' data-src='${await value.user}' fields='account.picture, sup(name, groups), sub(profile.city)' diff --git a/src/styles/base/main.scss b/src/styles/base/main.scss index a6a3811..4afff70 100644 --- a/src/styles/base/main.scss +++ b/src/styles/base/main.scss @@ -255,6 +255,7 @@ h5 { @import 'compat'; // Other base components @import 'form'; +@import 'table'; @import 'header'; @import 'menu-left'; diff --git a/src/styles/base/table.scss b/src/styles/base/table.scss new file mode 100644 index 0000000..6b5b0be --- /dev/null +++ b/src/styles/base/table.scss @@ -0,0 +1,193 @@ +#circle-information, +#circle-edit, +#admin-circle-list, +#admin-circle-create, +#admin-project-list, +#admin-project-create { + + .content-box__info { + @extend %padding-block; + display: flex; + flex-direction: column; + + .backlink { + text-align: right; + display: block; + } + } + + .table { + + .table-header { + display: flex; + flex: 1; + font-size: 1.6rem; + font-weight: 600; + justify-content: space-around; + text-align: center; + + &.grey-color { + background: $color-228-25-79; + color: white; + } + + >* { + border-right: 1px solid white; + flex: 1; + padding: 2.1rem 0; + text-align: center; + } + + >*:last-of-type { + border-right: 1px solid $color-228-25-79; + } + } + + .table-body { + + >div:first-of-type>sib-display>div, + team-template-edit[name='members'] { + display: flex; + border-left: 1px solid $color-228-25-79; + } + + .border { + border-bottom: 1px solid $color-228-25-79; + border-right: 1px solid $color-228-25-79; + } + + .cell { + text-align: center; + word-wrap: break-word; + } + + .w25 { + width: 25%; + } + + .w33 { + width: 33.3333%; + } + + .w50 { + width: 50%; + } + + .hashtag::before { + content: '#'; + } + } + + .cell-with-name { + color: $color-233-18-29; + font-weight: 600; + padding-top: 2.5rem; + } + + .cell-with-id-card>div, + /* for the table in circle-edit */ + .cell-with-id-card>sib-display>div, + project-captain[name='user']>sib-display>div { + /* for the captain's cell in project-admin */ + display: grid; + grid-column-gap: 1.6rem; + grid-template-columns: 7vh auto; + grid-template-rows: repeat(2, 5.2vh); + padding: 0 2.2rem; + + >[name$='account.picture'] { + align-items: center; + align-self: center; + background-color: $color-213-20-91; + border-radius: 50%; + display: flex; + grid-column: 1 / span 1; + grid-row: 1 / span 2; + height: 7vh; + justify-content: center; + overflow: hidden; + position: relative; + width: 7vh; + + img { + background-color: white; + height: 100%; + left: 0; + object-fit: cover; + position: absolute; + top: 0; + width: 100%; + } + + object { + height: 45%; + width: 45%; + } + } + + >[name='sup'] { + align-self: end; + display: flex; + grid-column: 2 / span 1; + grid-row: 1 / span 1; + margin-bottom: 0.50rem; + + [name$='name'] { + color: #7A7F85; + font-weight: 600; + margin-right: 1rem; + } + + sib-multiple>div { + display: flex; + + [name='groups'] { + @extend %tag-role; + } + } + } + + >[name='sub'] { + align-self: start; + grid-column: 2 / span 1; + grid-row: 2 / span 1; + margin-top: 0.50rem; + + >[name$='username']:not(:empty) { + align-items: center; + display: flex; + + &::before { + content: '@'; + + } + } + } + } + + .cell-with-buttons { + align-items: center; + display: flex; + justify-content: center; + + [name='button'] { + + input[type='submit'] { + @extend .button, + .text-bold, + .text-uppercase, + .reversed, + .button-blue, + .bordered, + .btn-margin-left; + } + } + } + + sib-ac-checker { + align-items: center; + display: flex; + justify-content: center; + } + } +} diff --git a/src/styles/layout/circle/circle.scss b/src/styles/layout/circle/circle.scss index 2d2e04f..b6f7d2e 100644 --- a/src/styles/layout/circle/circle.scss +++ b/src/styles/layout/circle/circle.scss @@ -78,16 +78,15 @@ } } - .table-body>div>sib-display>div>sib-display-value[name='name'] { + .cell-with-name { color: $color-233-18-29; font-weight: 600; padding-top: 2.5rem; } - team-template-edit>sib-display>div, - [name='owner']>sib-display>div, - project-captain[name='user']>sib-display>div, - [name='captain']>sib-display>div { + .cell-with-id-card>div, /* for the table in circle-edit */ + .cell-with-id-card>sib-display>div, + project-captain[name='user']>sib-display>div { /* for the captain's cell in project-admin */ display: grid; grid-column-gap: 1.6rem; grid-template-columns: 7vh auto; @@ -164,7 +163,7 @@ } } - [name='buttons'] { + .cell-with-buttons { align-items: center; display: flex; justify-content: center;