From c2ec8e6b5b2cad25bff6c2da4045b11dced52c15 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Mon, 9 Sep 2019 11:33:59 +0200 Subject: [PATCH 01/11] WIP: Search resource by keyword in entrepreneur dashboard. --- src/includes/entrepreneur/dashboard.pug | 6 +++--- src/includes/entrepreneur/requests/create.pug | 3 ++- src/includes/entrepreneur/resources/list.pug | 11 ++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/includes/entrepreneur/dashboard.pug b/src/includes/entrepreneur/dashboard.pug index 69b824c5..55d83d34 100644 --- a/src/includes/entrepreneur/dashboard.pug +++ b/src/includes/entrepreneur/dashboard.pug @@ -8,9 +8,9 @@ header#header(role='banner') section#home - h1 Mentorship program - - p International index of resources for cooperative mentors and entrepreneurs + div.container_min + h2.title_lead.fd_bleu International index of resources for cooperative mentors and entrepreneurs + button.button_dark.pull-right Watch the presentation //TODO: //-Distinguish the search form from the listing diff --git a/src/includes/entrepreneur/requests/create.pug b/src/includes/entrepreneur/requests/create.pug index 2692e978..b382d5fd 100644 --- a/src/includes/entrepreneur/requests/create.pug +++ b/src/includes/entrepreneur/requests/create.pug @@ -1,4 +1,5 @@ h2 Request a ressource +sib-link(class="backlink", next="entrepreneur-resource-list") p You can't find a resource you are looking for ? You need resources to acquire certain skills or progress in your cooperative developement ? It can be a book, a document model, a tutorial, anything you need, make a request to our mentors so they know how to help you. @@ -39,6 +40,6 @@ p You can't find a resource you are looking for ? You need resources to acquire next="entrepreneur-request-validation" ) - sib-link(class="backlink", next="entrepreneur-resource-list") Back to the dashboard + diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 3270dd35..5c3e44a5 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -1,21 +1,22 @@ include ../../components/widgets -p: a Watch a video presentation -h2 Search for a resource + +h2.title_form Search for a resource #circles sib-display#circles-list( data-src=`${endpoints.resources}`, - fields='name, description, format, info(author, publication_year, language.name), steps', - search-fields='name, description, format', + fields='search(name, description, author)', + search-fields='name, description, author', widget-format='cs-resource-format-name', multiple-format, + widget-header_search='cs-section_header', widget-steps='cs-resource-format-name', multiple-steps, - paginate-by="1" + paginate-by="10" next='detail' ) -- GitLab From bd5b594ca36afe2620445c04387000c2f6a6f889 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Mon, 9 Sep 2019 11:40:22 +0200 Subject: [PATCH 02/11] WIP: Search resource by keyword in entrepreneur dashboard. --- src/includes/entrepreneur/resources/list.pug | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 5c3e44a5..76a067ee 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -7,8 +7,13 @@ h2.title_form Search for a resource #circles sib-display#circles-list( data-src=`${endpoints.resources}`, - fields='search(name, description, author)', - search-fields='name, description, author', + fields='search-by-keyword(name, description, author)', + search-search-by-keyword="hidden-widget" + search-fields='search-by-keyword', + search-label-search-by-keyword="Search here by keyword, author..." + search-widget-search-by-keyword="sib-form-placeholder-text" + + widget-format='cs-resource-format-name', multiple-format, -- GitLab From c7bb6f598f7aae0b8348e669cecdd56eea02a309 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Mon, 9 Sep 2019 15:25:13 +0200 Subject: [PATCH 03/11] WIP: Search resource by keyword in entrepreneur dashboard. --- src/includes/entrepreneur/resources/list.pug | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 76a067ee..8b14e148 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -6,13 +6,11 @@ h2.title_form Search for a resource #circles sib-display#circles-list( - data-src=`${endpoints.resources}`, - fields='search-by-keyword(name, description, author)', - search-search-by-keyword="hidden-widget" - search-fields='search-by-keyword', - search-label-search-by-keyword="Search here by keyword, author..." - search-widget-search-by-keyword="sib-form-placeholder-text" + data-src=`${endpoints.steps}`, + nested-field=`resources`, + fields='name, description, author', + search-fields='name, description, author', widget-format='cs-resource-format-name', multiple-format, @@ -20,10 +18,12 @@ h2.title_form Search for a resource widget-header_search='cs-section_header', widget-steps='cs-resource-format-name', multiple-steps, - - paginate-by="10" + next='detail' + ) + + div.side-block p Can't find the ressource you need ? -- GitLab From 4b6fd6f5eeebcb4a0122ae18491557ed31ee4dfe Mon Sep 17 00:00:00 2001 From: Benoit Alessandroni <benoit@happy-dev.fr> Date: Mon, 9 Sep 2019 15:51:22 +0200 Subject: [PATCH 04/11] Display name of each resource --- src/includes/components/widgets.pug | 4 ++++ src/includes/entrepreneur/resources/list.pug | 21 +++++--------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index d1fd0ba7..a716dcc4 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -10,6 +10,10 @@ sib-widget(name='cs-display-property') template p ${value} +sib-widget(name='cs-steps-resources-multiple') + template + p ${value.name} + sib-widget(name='cs-display-link') template p diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 8b14e148..6bd9e150 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -1,28 +1,17 @@ include ../../components/widgets - - h2.title_form Search for a resource #circles sib-display#circles-list( data-src=`${endpoints.steps}`, - nested-field=`resources`, - - fields='name, description, author', - search-fields='name, description, author', - - widget-format='cs-resource-format-name', - multiple-format, - - widget-header_search='cs-section_header', - widget-steps='cs-resource-format-name', - multiple-steps, + fields='resources, name, order' - next='detail' - + label-resources='Resources' + label-each-resources='Resource:' + multiple-resources + widget-resources='cs-steps-resources-multiple' ) - div.side-block -- GitLab From ce1f85ba0149d8371ce32dc4bc1d5fc80d0e78ed Mon Sep 17 00:00:00 2001 From: Benoit Alessandroni <benoit@happy-dev.fr> Date: Mon, 9 Sep 2019 16:05:54 +0200 Subject: [PATCH 05/11] Adding name and order to step --- src/includes/components/widgets.pug | 1 + src/includes/entrepreneur/resources/list.pug | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index 6bf93e5e..53edd925 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -13,6 +13,7 @@ sib-widget(name='cs-display-property') sib-widget(name='cs-steps-resources-multiple') template p ${value.name} + p ${value.description} sib-widget(name='cs-display-link') template diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 6bd9e150..8b2fe4dd 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -5,9 +5,10 @@ h2.title_form Search for a resource #circles sib-display#circles-list( data-src=`${endpoints.steps}`, - fields='resources, name, order' + fields='name, order, resources' - label-resources='Resources' + widget-name='cs-display-property' + label-resources='' label-each-resources='Resource:' multiple-resources widget-resources='cs-steps-resources-multiple' -- GitLab From 45361cf7443acccf17eb349306bba8cbe9801884 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Tue, 10 Sep 2019 08:57:19 +0200 Subject: [PATCH 06/11] WIP: Entrepreneur dashboard- filter the resources. --- src/includes/components/widgets.pug | 4 ++- src/includes/entrepreneur/resources/list.pug | 27 ++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index 53edd925..859aa42d 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -12,7 +12,9 @@ sib-widget(name='cs-display-property') sib-widget(name='cs-steps-resources-multiple') template - p ${value.name} + div.resource_resume_header + p ${value.name} + p ${value.publication_year} p ${value.description} sib-widget(name='cs-display-link') diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 8b2fe4dd..eef2cacf 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -2,14 +2,37 @@ include ../../components/widgets h2.title_form Search for a resource +//-Question : +//the render by default of the steps'field should be render by the widget : "cs-display-step-property" +//=> With the architecture how we do that?? + +//Sould I use jquery to build the steps'accordion? + +//Is there in the project any example to help fred putting the right class on the tag? + +//What's the best way to retrieve the name of the format? By the resource we get a number. Sould we manage this with a 'switch/case' in js? + +//It seems that we don't have likes and dislikes data : sould i ignore them for the moment? + +// To filter by type, I imagine something like that : +//Sib-display (who get all ressources) +// sib-display (with type 1) +// nested-field (to filter by step) +// sib-display (with type 2) +// nested-field (to filter by step) +// => We active one of them on demand with js + + #circles sib-display#circles-list( data-src=`${endpoints.steps}`, - fields='name, order, resources' + fields='order, name, resources' + + widget-fields='cs-display-step-property' - widget-name='cs-display-property' label-resources='' label-each-resources='Resource:' + multiple-resources widget-resources='cs-steps-resources-multiple' ) -- GitLab From f3d170e7a3e4d43bb742cff5363a820d719b25c8 Mon Sep 17 00:00:00 2001 From: Benoit Alessandroni <benoit@happy-dev.fr> Date: Tue, 10 Sep 2019 12:24:20 +0200 Subject: [PATCH 07/11] First step on grouping resources by steps --- src/includes/entrepreneur/resources/list.pug | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index eef2cacf..a0c98016 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -24,17 +24,18 @@ h2.title_form Search for a resource #circles - sib-display#circles-list( - data-src=`${endpoints.steps}`, - fields='order, name, resources' - - widget-fields='cs-display-step-property' + sib-widget(name="group-by-steps") + template + strong(data-content) + p.p_entete(data-title) ${value.name} - label-resources='' - label-each-resources='Resource:' - - multiple-resources - widget-resources='cs-steps-resources-multiple' + sib-display#circles-list( + data-src=`${endpoints.resources}`, + fields='name, description' + group-by='steps' + group-by-widget="group-by-steps" + widget-description='cs-display-property' + widget-name='cs-display-property' ) -- GitLab From b7a333f018083040d9557542d9fc84ea3dda33d0 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Tue, 10 Sep 2019 14:59:09 +0200 Subject: [PATCH 08/11] WIP: Dashboard entrepreneur - more criterias form. --- src/includes/components/widgets.pug | 5 ++ src/includes/entrepreneur/requests/create.pug | 2 +- src/includes/entrepreneur/resources/list.pug | 49 +++++++++++++------ 3 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index 859aa42d..25f15b50 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -34,6 +34,11 @@ sib-widget(name='cs-display-title') template h3.title_lead_avenir ${label} +sib-widget(name='cs-display-checkbox') + template + label Search in Coopstarter database only + input(type='checkbox') + sib-widget(name='cs-display-related-property') template p #[a(href="${value.name}")] ${value.name} diff --git a/src/includes/entrepreneur/requests/create.pug b/src/includes/entrepreneur/requests/create.pug index b382d5fd..36925b48 100644 --- a/src/includes/entrepreneur/requests/create.pug +++ b/src/includes/entrepreneur/requests/create.pug @@ -1,5 +1,5 @@ h2 Request a ressource -sib-link(class="backlink", next="entrepreneur-resource-list") +sib-link(class="backlink", next="entrepreneur-resource-list") X p You can't find a resource you are looking for ? You need resources to acquire certain skills or progress in your cooperative developement ? It can be a book, a document model, a tutorial, anything you need, make a request to our mentors so they know how to help you. diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index a0c98016..b29146dc 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -3,24 +3,15 @@ include ../../components/widgets h2.title_form Search for a resource //-Question : -//the render by default of the steps'field should be render by the widget : "cs-display-step-property" -//=> With the architecture how we do that?? +//In my opinion, "multiple ressource" solution is closer to the wanted result than the "group-by" solution -//Sould I use jquery to build the steps'accordion? - -//Is there in the project any example to help fred putting the right class on the tag? +//Maybe we sould think from now how we gonna manage the type filter //What's the best way to retrieve the name of the format? By the resource we get a number. Sould we manage this with a 'switch/case' in js? //It seems that we don't have likes and dislikes data : sould i ignore them for the moment? -// To filter by type, I imagine something like that : -//Sib-display (who get all ressources) -// sib-display (with type 1) -// nested-field (to filter by step) -// sib-display (with type 2) -// nested-field (to filter by step) -// => We active one of them on demand with js +// #circles @@ -31,9 +22,37 @@ h2.title_form Search for a resource sib-display#circles-list( data-src=`${endpoints.resources}`, - fields='name, description' - group-by='steps' - group-by-widget="group-by-steps" + fields='keyword(name, description, author),\ + steps.name,\ + more_criterias( format, publication_year, country, language.name, fields, steps)' + + search-fields="keyword, instance_database_only,\ + more_criterias(header_criterias, format, publication_year, country, language, field, step)" + search-label-keyword="Search by author, name..." + search-label-header_criterias='More criterias' + search-label-format='Format' + search-label-publication_year='Year of publication' + search-label-country='Country of publication' + search-label-language='Language' + search-label-field='Field' + search-label-step='Step of : Staring up a cooperative business' + search-widget-keyword="sib-form-placeholder-text" + search-widget-instance_database_only='cs-display-checkbox' + search-widget-header_criterias='cs-section_header' + + search-range-language=`${endpoints.languages}` + search-range-field=`${endpoints.fields}` + search-range-step=`${endpoints.step}` + + search-multiple-language='sib-multiple-select' + search-widget-language='sib-form-auto-completion' + + search-multiple-field='sib-multiple-select' + search-widget-field='sib-form-auto-completion' + + search-multiple-step='sib-multiple-select' + search-widget-step='sib-form-auto-completion' + widget-description='cs-display-property' widget-name='cs-display-property' ) -- GitLab From ba64205dacf0fd69ef355b315642922590cc1dc4 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Tue, 10 Sep 2019 17:37:24 +0200 Subject: [PATCH 09/11] WIP: Mentor profil editable with new feature 'editable-xyz' --- src/includes/mentor/profile.pug | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/includes/mentor/profile.pug b/src/includes/mentor/profile.pug index 55c9374b..0b7746cc 100644 --- a/src/includes/mentor/profile.pug +++ b/src/includes/mentor/profile.pug @@ -24,15 +24,23 @@ div.block_list.flex ) Logout div.profile_information.block_log.w_75 + sib-display( bind-user fields='account.picture, name, mentor_profile.headline, mentor_profile.city, mentor_profile.country, registered_on' widget-account.picture='cs-profile-picture' - widget-name='cs-display-property' - widget-mentor_profile.headline='cs-display-property' - widget-mentor_profile.city='cs-display-property' - widget-mentor_profile.country='cs-display-property' + widget-name='sib-display-div' + widget-mentor_profile.headline='sib-display-div' + widget-mentor_profile.city='sib-display-div' + widget-mentor_profile.country='sib-display-div' widget-mentor_profile.registered_on='cs-display-property' + + editable-account.picture + editable-name + editable-mentor_profile.headline + editable-mentor_profile.country + editable-mentor_profile.city + ) sib-display.bold( @@ -49,8 +57,11 @@ div.block_list.flex widget-skills_label='cs-display-label' label-skills_label='Skills:' label-biography_label='Activities:' - widget-mentor_profile.skills='cs-display-property' - widget-mentor_profile.biography='cs-display-property' + widget-mentor_profile.skills='sib-display-div' + widget-mentor_profile.biography='sib-display-div' + + editable-mentor_profile.skills + editable-mentor_profile.biography ) sib-display( @@ -60,10 +71,15 @@ div.block_list.flex class-email="contact_profil" label-mentor_profile.phone='Phone number:' class-mentor_profile.phone="contact_profil" - widget-email='cs-display-resource-property' - widget-mentor_profile.phone='cs-display-resource-property' + widget-email='sib-display-mailto' + widget-mentor_profile.phone='sib-display-tel' widget-mentor_profile.linkedin='cs-display-link' widget-mentor_profile.twitter='cs-display-link' label-mentor_profile.twitter='<i class="fab fa-twitter"></i>' label-mentor_profile.linkedin='<i class="fab fa-linkedin-in"></i>' + + editable-email + editable-mentor_profile.phone + editable-mentor_profile.linkedin + editable-mentor_profile.twitter ) \ No newline at end of file -- GitLab From c08a490467781e6b8d1bfb11b004e9e5728096fb Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Tue, 10 Sep 2019 18:41:45 +0200 Subject: [PATCH 10/11] WIP: Mentor profil editable with sib-form' --- src/includes/account-creation.pug | 2 +- src/includes/mentor/components/menu.pug | 1 + src/includes/mentor/create.pug | 70 -------------------- src/includes/mentor/dashboard.pug | 7 +- src/includes/mentor/profile.pug | 85 ------------------------- 5 files changed, 8 insertions(+), 157 deletions(-) delete mode 100644 src/includes/mentor/create.pug delete mode 100644 src/includes/mentor/profile.pug diff --git a/src/includes/account-creation.pug b/src/includes/account-creation.pug index 4c83f46b..38f6ff1b 100644 --- a/src/includes/account-creation.pug +++ b/src/includes/account-creation.pug @@ -24,7 +24,7 @@ sib-router(default-route='account-creation-index') h2.button_base I am an entrepreneur #mentor-new-account(hidden).no-sidebar.container - include mentor/create.pug + include mentor/profile/create.pug #entrepreneur-new-account(hidden).no-sidebar.container include entrepreneur/create.pug diff --git a/src/includes/mentor/components/menu.pug b/src/includes/mentor/components/menu.pug index 8dc3954f..f52aa70c 100644 --- a/src/includes/mentor/components/menu.pug +++ b/src/includes/mentor/components/menu.pug @@ -1,6 +1,7 @@ sib-router(default-route='mentor-resource-list') sib-route(name='mentor-resource-list') sib-route(name='mentor-account', id-prefix=`${endpoints.users}`, use-id) + sib-route(name='mentor-account-edit', id-prefix=`${endpoints.users}`, use-id) sib-ac-checker(permission="acl:Write") sib-route(name='mentor-resource-create') sib-ac-checker(permission="acl:Write" bind-resources) diff --git a/src/includes/mentor/create.pug b/src/includes/mentor/create.pug deleted file mode 100644 index 3b6d162d..00000000 --- a/src/includes/mentor/create.pug +++ /dev/null @@ -1,70 +0,0 @@ -include ../components/widgets - -figure.logo - img(src="../images/logo.png" - alt="Coopstarter") - -figure.logo.img_log - img(src="../images/mentor.png" - alt="Create a mentor account") - -h2.title_create Complete your mentor account - -sib-form.block_log.block_creat_count( - bind-user - fields="account_information(last_name, first_name, mentor_profile.organisation,\ - mentor_profile.phone, mentor_profile.languages, mentor_profile.fields),\ - about_you(header_about_you, account.picture, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\ - mentor_profile.biography, mentor_profile.skills),\ - social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter), username" - - range-mentor_profile.fields=`${endpoints.fields}` - range-mentor_profile.organisation=`${endpoints.organisations}` - range-mentor_profile.languages=`${endpoints.languages}` - - label-header_about_you="About you" - label-header_social_media="Social medias" - - widget-header_social_media="cs-section_header" - widget-header_about_you="cs-section_introduction" - - label-first_name="Surname" - label-last_name="Name" - label-mentor_profile.organisation="Organisation" - label-mentor_profile.phone="Phone number" - label-mentor_profile.languages="Languages" - label-mentor_profile.fields="Fields" - label-account.picture="Photo" - label-mentor_profile.headline="Headline or current position" - class-mentor_profile.headline="w_75" - label-mentor_profile.city="City" - label-mentor_profile.country="Country" - label-mentor_profile.biography="Tell us more about your activities" - label-mentor_profile.skills="What skills can you share with our entrepreneurs ?" - label-mentor_profile.linkedin="Linkedin" - label-mentor_profile.twitter="Twitter" - - widget-mentor_profile.skills="sib-form-textarea" - widget-mentor_profile.biography="sib-form-textarea" - widget-username="sib-form-hidden" - - class-mentor_profile.organisation='form-label is-dark' - multiple-mentor_profile.organisation='sib-multiple-select' - widget-mentor_profile.organisation='sib-form-auto-completion' - - class-mentor_profile.languages='form-label is-dark' - multiple-mentor_profile.languages='sib-multiple-select' - widget-mentor_profile.languages='sib-form-auto-completion' - - class-mentor_profile.fields='form-label is-dark' - multiple-mentor_profile.fields='sib-multiple-select' - widget-mentor_profile.fields='sib-form-auto-completion' - - upload-url-account.picture=`${sdn}/upload/` - widget-account.picture='sib-form-file' - class-account.picture='input_photo w_25' - class-headline='w_75' - - submit-button="COMPLETE YOUR ACCOUNT" - next='mentor-dashboard' -) diff --git a/src/includes/mentor/dashboard.pug b/src/includes/mentor/dashboard.pug index 77b3b603..245cf662 100644 --- a/src/includes/mentor/dashboard.pug +++ b/src/includes/mentor/dashboard.pug @@ -43,4 +43,9 @@ section#home include resources/list.pug #mentor-account(hidden).no-sidebar.container - include profile.pug + include profile/detail.pug + + #mentor-account-edit(hidden).no-sidebar.container + include profile/edit.pug + + diff --git a/src/includes/mentor/profile.pug b/src/includes/mentor/profile.pug deleted file mode 100644 index 0b7746cc..00000000 --- a/src/includes/mentor/profile.pug +++ /dev/null @@ -1,85 +0,0 @@ -include ../components/widgets - -div.container_min - h2.title_lead.fd_bleu My Account - -div.block_list.flex - div.button__actions.w_25 - div.resources__newresource - sib-link(next='mentor-resource-create') - div - div.button_base.ico_gauche.ico_plus Post a new Resource - - div.dashboard__database - sib-link(next='mentor-database') - div.button_base.ico_gauche.ico_database Browse database - - div.dashboard__database - sib-link(next='mentor-resource-list') - div.button_base.ico_gauche.ico_search Back to dashboard - - div.dashboard__database - div#logout-button.button_base( - role='log out' - ) Logout - - div.profile_information.block_log.w_75 - - sib-display( - bind-user - fields='account.picture, name, mentor_profile.headline, mentor_profile.city, mentor_profile.country, registered_on' - widget-account.picture='cs-profile-picture' - widget-name='sib-display-div' - widget-mentor_profile.headline='sib-display-div' - widget-mentor_profile.city='sib-display-div' - widget-mentor_profile.country='sib-display-div' - widget-mentor_profile.registered_on='cs-display-property' - - editable-account.picture - editable-name - editable-mentor_profile.headline - editable-mentor_profile.country - editable-mentor_profile.city - - ) - - sib-display.bold( - fields="" - nested-field="resources" - counter-template="<p>${counter} resource(s) uploaded here</p>" - bind-user - ) - - sib-display( - bind-user - fields='biography_label, mentor_profile.biography, skills_label, mentor_profile.skills' - widget-biography_label='cs-display-label' - widget-skills_label='cs-display-label' - label-skills_label='Skills:' - label-biography_label='Activities:' - widget-mentor_profile.skills='sib-display-div' - widget-mentor_profile.biography='sib-display-div' - - editable-mentor_profile.skills - editable-mentor_profile.biography - ) - - sib-display( - bind-user - fields='email, mentor_profile.phone, mentor_profile.linkedin, mentor_profile.twitter' - label-email='Email:' - class-email="contact_profil" - label-mentor_profile.phone='Phone number:' - class-mentor_profile.phone="contact_profil" - widget-email='sib-display-mailto' - widget-mentor_profile.phone='sib-display-tel' - widget-mentor_profile.linkedin='cs-display-link' - widget-mentor_profile.twitter='cs-display-link' - label-mentor_profile.twitter='<i class="fab fa-twitter"></i>' - label-mentor_profile.linkedin='<i class="fab fa-linkedin-in"></i>' - - editable-email - editable-mentor_profile.phone - editable-mentor_profile.linkedin - editable-mentor_profile.twitter - ) \ No newline at end of file -- GitLab From a3fde5da23dc1b865f51ac3fb07a9da2d70750cf Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Wed, 11 Sep 2019 07:11:23 +0200 Subject: [PATCH 11/11] WIP: Mentor profil editable with sib-form' --- src/includes/mentor/profile/create.pug | 70 +++++++++++++++++++++++++ src/includes/mentor/profile/detail.pug | 72 ++++++++++++++++++++++++++ src/includes/mentor/profile/edit.pug | 62 ++++++++++++++++++++++ 3 files changed, 204 insertions(+) create mode 100644 src/includes/mentor/profile/create.pug create mode 100644 src/includes/mentor/profile/detail.pug create mode 100644 src/includes/mentor/profile/edit.pug diff --git a/src/includes/mentor/profile/create.pug b/src/includes/mentor/profile/create.pug new file mode 100644 index 00000000..96049e4f --- /dev/null +++ b/src/includes/mentor/profile/create.pug @@ -0,0 +1,70 @@ +include ../../components/widgets + +figure.logo + img(src="../images/logo.png" + alt="Coopstarter") + +figure.logo.img_log + img(src="../images/mentor.png" + alt="Create a mentor account") + +h2.title_create Complete your mentor account + +sib-form.block_log.block_creat_count( + bind-user + fields="account_information(last_name, first_name, mentor_profile.organisation,\ + mentor_profile.phone, mentor_profile.languages, mentor_profile.fields),\ + about_you(header_about_you, account.picture, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\ + mentor_profile.biography, mentor_profile.skills),\ + social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter), username" + + range-mentor_profile.fields=`${endpoints.fields}` + range-mentor_profile.organisation=`${endpoints.organisations}` + range-mentor_profile.languages=`${endpoints.languages}` + + label-header_about_you="About you" + label-header_social_media="Social medias" + + widget-header_social_media="cs-section_header" + widget-header_about_you="cs-section_introduction" + + label-first_name="Surname" + label-last_name="Name" + label-mentor_profile.organisation="Organisation" + label-mentor_profile.phone="Phone number" + label-mentor_profile.languages="Languages" + label-mentor_profile.fields="Fields" + label-account.picture="Photo" + label-mentor_profile.headline="Headline or current position" + class-mentor_profile.headline="w_75" + label-mentor_profile.city="City" + label-mentor_profile.country="Country" + label-mentor_profile.biography="Tell us more about your activities" + label-mentor_profile.skills="What skills can you share with our entrepreneurs ?" + label-mentor_profile.linkedin="Linkedin" + label-mentor_profile.twitter="Twitter" + + widget-mentor_profile.skills="sib-form-textarea" + widget-mentor_profile.biography="sib-form-textarea" + widget-username="sib-form-hidden" + + class-mentor_profile.organisation='form-label is-dark' + multiple-mentor_profile.organisation='sib-multiple-select' + widget-mentor_profile.organisation='sib-form-auto-completion' + + class-mentor_profile.languages='form-label is-dark' + multiple-mentor_profile.languages='sib-multiple-select' + widget-mentor_profile.languages='sib-form-auto-completion' + + class-mentor_profile.fields='form-label is-dark' + multiple-mentor_profile.fields='sib-multiple-select' + widget-mentor_profile.fields='sib-form-auto-completion' + + upload-url-account.picture=`${sdn}/upload/` + widget-account.picture='sib-form-file' + class-account.picture='input_photo w_25' + class-headline='w_75' + + submit-button="COMPLETE YOUR ACCOUNT" + next='mentor-dashboard' +) diff --git a/src/includes/mentor/profile/detail.pug b/src/includes/mentor/profile/detail.pug new file mode 100644 index 00000000..0b4b95f4 --- /dev/null +++ b/src/includes/mentor/profile/detail.pug @@ -0,0 +1,72 @@ +mentor-account-editinclude ../components/widgets + +div.container_min + h2.title_lead.fd_bleu My Account + +div.block_list.flex + div.button__actions.w_25 + div.resources__newresource + sib-link(next='mentor-resource-create') + div + div.button_base.ico_gauche.ico_plus Post a new Resource + + div.dashboard__database + sib-link(next='mentor-database') + div.button_base.ico_gauche.ico_database Browse database + + div.dashboard__database + sib-link(next='mentor-resource-list') + div.button_base.ico_gauche.ico_search Back to dashboard + + div.dashboard__database + div#logout-button.button_base( + role='log out' + ) Logout + + div.profile_information.block_log.w_75 + sib-link(next='mentor-account-edit') + div.button_base.ico_gauche.ico_search Edit + + sib-display( + bind-user + fields='account.picture, name, mentor_profile.headline, mentor_profile.city, mentor_profile.country, registered_on' + widget-account.picture='cs-profile-picture' + widget-name='cs-display-property' + widget-mentor_profile.headline='cs-display-property' + widget-mentor_profile.city='cs-display-property' + widget-mentor_profile.country='cs-display-property' + widget-mentor_profile.registered_on='cs-display-property' + ) + + sib-display.bold( + fields="" + nested-field="resources" + counter-template="<p>${counter} resource(s) uploaded here</p>" + bind-user + ) + + sib-display( + bind-user + fields='biography_label, mentor_profile.biography, skills_label, mentor_profile.skills' + widget-biography_label='cs-display-label' + widget-skills_label='cs-display-label' + label-skills_label='Skills:' + label-biography_label='Activities:' + widget-mentor_profile.skills='cs-display-property' + widget-mentor_profile.biography='cs-display-property' + ) + + sib-display( + bind-user + fields='email, mentor_profile.phone, mentor_profile.linkedin, mentor_profile.twitter' + label-email='Email:' + class-email="contact_profil" + label-mentor_profile.phone='Phone number:' + class-mentor_profile.phone="contact_profil" + widget-email='cs-display-resource-property' + widget-mentor_profile.phone='cs-display-resource-property' + widget-mentor_profile.linkedin='cs-display-link' + widget-mentor_profile.twitter='cs-display-link' + label-mentor_profile.twitter='<i class="fab fa-twitter"></i>' + label-mentor_profile.linkedin='<i class="fab fa-linkedin-in"></i>' + ) \ No newline at end of file diff --git a/src/includes/mentor/profile/edit.pug b/src/includes/mentor/profile/edit.pug new file mode 100644 index 00000000..09a9e2b7 --- /dev/null +++ b/src/includes/mentor/profile/edit.pug @@ -0,0 +1,62 @@ +include ../../components/widgets + +h2.title_create Edit you account + +sib-form.block_log.block_creat_count( + bind-user + fields="account_information(last_name, first_name, mentor_profile.organisation,\ + mentor_profile.phone, mentor_profile.languages, mentor_profile.fields),\ + about_you(header_about_you, account.picture, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\ + mentor_profile.biography, mentor_profile.skills),\ + social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter), username" + + range-mentor_profile.fields=`${endpoints.fields}` + range-mentor_profile.organisation=`${endpoints.organisations}` + range-mentor_profile.languages=`${endpoints.languages}` + + label-header_about_you="About you" + label-header_social_media="Social medias" + + widget-header_social_media="cs-section_header" + widget-header_about_you="cs-section_introduction" + + label-first_name="Surname" + label-last_name="Name" + label-mentor_profile.organisation="Organisation" + label-mentor_profile.phone="Phone number" + label-mentor_profile.languages="Languages" + label-mentor_profile.fields="Fields" + label-account.picture="Photo" + label-mentor_profile.headline="Headline or current position" + class-mentor_profile.headline="w_75" + label-mentor_profile.city="City" + label-mentor_profile.country="Country" + label-mentor_profile.biography="Tell us more about your activities" + label-mentor_profile.skills="What skills can you share with our entrepreneurs ?" + label-mentor_profile.linkedin="Linkedin" + label-mentor_profile.twitter="Twitter" + + widget-mentor_profile.skills="sib-form-textarea" + widget-mentor_profile.biography="sib-form-textarea" + widget-username="sib-form-hidden" + + class-mentor_profile.organisation='form-label is-dark' + multiple-mentor_profile.organisation='sib-multiple-select' + widget-mentor_profile.organisation='sib-form-auto-completion' + + class-mentor_profile.languages='form-label is-dark' + multiple-mentor_profile.languages='sib-multiple-select' + widget-mentor_profile.languages='sib-form-auto-completion' + + class-mentor_profile.fields='form-label is-dark' + multiple-mentor_profile.fields='sib-multiple-select' + widget-mentor_profile.fields='sib-form-auto-completion' + + upload-url-account.picture=`${sdn}/upload/` + widget-account.picture='sib-form-file' + class-account.picture='input_photo w_25' + class-headline='w_75' + + submit-button="Save modifications" + next='mentor-dashboard' +) \ No newline at end of file -- GitLab