From 3cdd40fa3a72f7026f22789e9699433b436c90e1 Mon Sep 17 00:00:00 2001 From: Alice <alice.poggioli@hotmail.fr> Date: Wed, 11 Sep 2019 10:00:09 +0200 Subject: [PATCH] =?UTF-8?q?WIP:=20Entrepreneur=20dashboard=20:=20profil=20?= =?UTF-8?q?detail=20and=20=C3=A9dit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/includes/account-creation.pug | 2 +- src/includes/entrepreneur/components/menu.pug | 1 + src/includes/entrepreneur/dashboard.pug | 11 +++-- .../entrepreneur/{ => profile}/create.pug | 2 +- src/includes/entrepreneur/profile/detail.pug | 43 +++++++++++++++++++ src/includes/entrepreneur/profile/edit.pug | 34 +++++++++++++++ src/includes/entrepreneur/resources/list.pug | 4 ++ src/includes/mentor/profile/detail.pug | 2 +- 8 files changed, 90 insertions(+), 9 deletions(-) rename src/includes/entrepreneur/{ => profile}/create.pug (96%) create mode 100644 src/includes/entrepreneur/profile/detail.pug create mode 100644 src/includes/entrepreneur/profile/edit.pug diff --git a/src/includes/account-creation.pug b/src/includes/account-creation.pug index 38f6ff1b..a268f923 100644 --- a/src/includes/account-creation.pug +++ b/src/includes/account-creation.pug @@ -27,4 +27,4 @@ sib-router(default-route='account-creation-index') include mentor/profile/create.pug #entrepreneur-new-account(hidden).no-sidebar.container - include entrepreneur/create.pug + include entrepreneur/profile/create.pug diff --git a/src/includes/entrepreneur/components/menu.pug b/src/includes/entrepreneur/components/menu.pug index 79869cdc..b69341d1 100644 --- a/src/includes/entrepreneur/components/menu.pug +++ b/src/includes/entrepreneur/components/menu.pug @@ -1,4 +1,5 @@ sib-router(default-route='entrepreneur-resource-list') sib-route(name='entrepreneur-resource-list') sib-route(name='entrepreneur-account', id-prefix=`${endpoints.users}`, use-id) + sib-route(name='entrepreneur-account-edit', id-prefix=`${endpoints.users}`, use-id) \ No newline at end of file diff --git a/src/includes/entrepreneur/dashboard.pug b/src/includes/entrepreneur/dashboard.pug index 55d83d34..e2963f8f 100644 --- a/src/includes/entrepreneur/dashboard.pug +++ b/src/includes/entrepreneur/dashboard.pug @@ -8,10 +8,6 @@ header#header(role='banner') section#home - 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 //-Create two Sib-displays getting the resources by "types" @@ -36,5 +32,8 @@ section#home p.flex sib-link(next='entrepreneur-resource-list', class='button_base') Ok - #entrepreneur-account(hidden) - h2 account + #entrepreneur-account(hidden).no-sidebar.container + include profile/detail.pug + + #entrepreneur-account-edit(hidden).no-sidebar.container + include profile/edit.pug diff --git a/src/includes/entrepreneur/create.pug b/src/includes/entrepreneur/profile/create.pug similarity index 96% rename from src/includes/entrepreneur/create.pug rename to src/includes/entrepreneur/profile/create.pug index 1a07b382..8eb14484 100644 --- a/src/includes/entrepreneur/create.pug +++ b/src/includes/entrepreneur/profile/create.pug @@ -1,4 +1,4 @@ -include ../components/widgets +include ../../components/widgets figure.logo img(src="../images/logo.png" diff --git a/src/includes/entrepreneur/profile/detail.pug b/src/includes/entrepreneur/profile/detail.pug new file mode 100644 index 00000000..cf1907f4 --- /dev/null +++ b/src/includes/entrepreneur/profile/detail.pug @@ -0,0 +1,43 @@ +include ../../components/widgets + +div.container_min + h2.title_lead.fd_bleu My Account + +div.block_list.flex + div.button__actions.w_25 + div.request__newrequest + sib-link(next='entrepreneur-request-create') + div + div.button_base.ico_gauche.ico_plus Post a new Request + + div.dashboard__database + sib-link(next='entrepreneur-database') + div.button_base.ico_gauche.ico_database Browse database + + div.dashboard__database + sib-link(next='entrepreneur-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='entrepreneur-account-edit') + div.button_base.ico_gauche.ico_search Edit + + sib-display( + bind-user + fields='name, entrepreneur_profile.organisation, registered_on' + widget-name='cs-display-property' + widget-entrepreneur_profile.registered_on='cs-display-property' + ) + + sib-display( + bind-user + fields='email' + label-email='Email:' + class-email="contact_profil" + widget-email='cs-display-resource-property' + ) \ No newline at end of file diff --git a/src/includes/entrepreneur/profile/edit.pug b/src/includes/entrepreneur/profile/edit.pug new file mode 100644 index 00000000..d713ae06 --- /dev/null +++ b/src/includes/entrepreneur/profile/edit.pug @@ -0,0 +1,34 @@ +include ../../components/widgets + +h2.title_create Edit you account + +sib-form.block_log.block_creat_count( + bind-user + fields="last_name, first_name, username, email, entrepreneur_profile.organisation, entrepreneur_profile.phone" + + range-entrepreneur_profile.organisation=`${endpoints.organisations}` + + + label-first_name="Surname" + label-last_name="Name" + label-username="Username" + label-entrepreneur_profile.organisation="Organisation" + label-entrepreneur_profile.phone="Phone number" + + widget-username="sib-form-hidden" + + class-last_name='form-label is-dark input_big' + class-first_name='form-label is-dark input_big' + class-email='form-label is-dark input_big' + class-entrepreneur_profile.phone='form-label is-dark input_big' + + class-entrepreneur_profile.organisation='form-label is-dark input_big' + multiple-entrepreneur_profile.organisation='sib-multiple-select' + widget-entrepreneur_profile.organisation='sib-form-auto-completion' + + range-mentor_profile.organisation=`${endpoints.organisations}` + + + submit-button="Save modifications" + next='entrepreneur-dashboard' +) \ No newline at end of file diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index b29146dc..ce0a0cee 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -1,5 +1,9 @@ include ../../components/widgets +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 + h2.title_form Search for a resource //-Question : diff --git a/src/includes/mentor/profile/detail.pug b/src/includes/mentor/profile/detail.pug index 0b4b95f4..b5e02a9a 100644 --- a/src/includes/mentor/profile/detail.pug +++ b/src/includes/mentor/profile/detail.pug @@ -1,4 +1,4 @@ -mentor-account-editinclude ../components/widgets +include ../../components/widgets div.container_min h2.title_lead.fd_bleu My Account -- GitLab