diff --git a/src/includes/account-creation.pug b/src/includes/account-creation.pug index 66411ce2f1b8b63889e53dca02494e5328177914..3108be52c0c7fc1f6c861cb1281d60ef02b662fb 100644 --- a/src/includes/account-creation.pug +++ b/src/includes/account-creation.pug @@ -7,7 +7,7 @@ sib-router(default-route='account-creation-index') figure(class="logo") img(src=`${client_domain}/images/logo.png` alt="Coopstarter logo") - h2.title_lead=`${data.welcome}` + h2.title_lead=`${data.Welcome}` sib-link.block_log(next='mentor-new-account') div diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index ff31811f18caab4bc0e67a994eb7925168e58206..272832c1f04783071fe921704fd0223c9f936672 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -196,15 +196,15 @@ sib-widget(name='cs-about-field') sib-widget(name='cs-account-picture') template figure.avatar - img(src="\${value || '/images/alien.jpg'}", alt="Profile picture") + img(src="\${await value || '/images/alien.jpg'}", alt="Profile picture") sib-widget(name='cs-profile-picture') template - img(src="\${value || '/images/alien.jpg'}", alt="Profile picture") + img(src="\${await value || '/images/alien.jpg'}", alt="Profile picture") sib-widget(name='cs-preview-picture') template - img(src="\${value || '/images/alien.jpg'}", alt="Preview of the resource") + img(src="\${await value || '/images/alien.jpg'}", alt="Preview of the resource") sib-widget(name="hidden-widget") template @@ -232,6 +232,11 @@ sib-widget(name="cs-form-file-custom") label(for="preview_image") sib-form-file(upload-url=`${sdn}upload/` name="preview_image" ) +sib-widget(name="cs-ent-profile-picture") + template + label(for="picture") + sib-form-file(upload-url=`${sdn}upload/` name="picture") + sib-widget(name="cs-form-profile-picture") template label(for="account.picture") diff --git a/src/includes/entrepreneur/components/header.pug b/src/includes/entrepreneur/components/header.pug index 728a382185a860b2251353d5467eb82a01feab2f..7748c9c23177a85a6fdf207a9318a0829bf69320 100644 --- a/src/includes/entrepreneur/components/header.pug +++ b/src/includes/entrepreneur/components/header.pug @@ -19,8 +19,9 @@ .dropdownWrapper sib-display#entrepreneur_account_picture.dropdownLabel( bind-user - fields='account.picture', - widget-account.picture='cs-account-picture' + nested-field="account" + fields="foaf:depiction" + widget-foaf:depiction='cs-account-picture' ) div.dropdownPanel diff --git a/src/includes/entrepreneur/profile/edit.pug b/src/includes/entrepreneur/profile/edit.pug index 924a1794e5e409a891d42baa3e8df9b0d4581f46..c878deab310e4bc4645324580e3bc3f3311bb6ba 100644 --- a/src/includes/entrepreneur/profile/edit.pug +++ b/src/includes/entrepreneur/profile/edit.pug @@ -3,29 +3,50 @@ h2.title_create= data.EditYourAccount sib-form#entrepreneur_profile_edition.block_log.block_creat_count( partial bind-user - fields="info(last_name, first_name, username, email, entrepreneurProfile.organisation, account.picture)" - range-entrepreneurProfile.organisation=`${endpoints.organisations}` + fields="info(last_name, first_name, username, email)" label-first_name=`${data.Surname}` label-last_name=`${data.Name}` - label-entrepreneurProfile.organisation=`${data.Organisation}` label-account.picture=`${data.Photo}` 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-entrepreneurProfile.phone='form-label is-dark input_big' - class-entrepreneurProfile.organisation='form-label is-dark input_big' - widget-entrepreneurProfile.organisation='sib-form-auto-completion' + submit-button=`${data.SaveModification}` + next='entrepreneur-account-edit-confirmation' +) + +sib-form#entrepreneur_profile_organisation.block_log.block_creat_count( + partial + bind-user + nested-field="entrepreneurProfile" + fields="organisation" + + range-organisation=`${endpoints.organisations}` + label-organisation=`${data.Organisation}` + class-organisation='form-label is-dark input_big' + widget-organisation='sib-form-auto-completion' + + submit-button=`${data.SaveModification}` + next='entrepreneur-account-edit-confirmation' +) + +sib-form#entrepreneur_profile_picture.block_log.block_creat_count( + partial + bind-user + nested-field="account" + fields="picture, slug, issuer" - upload-url-account.picture=`${sdn}upload/` - widget-account.picture='cs-form-profile-picture' - class-account.picture='input_photo w_25' + widget-issuer="sib-form-hidden" + widget-slug="sib-form-hidden" + upload-url-picture=`${sdn}upload/` + widget-picture='cs-ent-profile-picture' + class-picture='input_photo w_25' submit-button=`${data.SaveModification}` next='entrepreneur-account-edit-confirmation' ) -sib-link(class="backlink", next="entrepreneur-resource-list")= data.BackToDashboard \ No newline at end of file +sib-link(class="backlink", next="entrepreneur-account")= data.BackToDashboard \ No newline at end of file diff --git a/src/includes/entrepreneur/profile/view.pug b/src/includes/entrepreneur/profile/view.pug index fe9af731e9c7db8525cdce753a4aac7ffc10b843..c5cf079ce790c02a6aaa3571662d30bf2584ac12 100644 --- a/src/includes/entrepreneur/profile/view.pug +++ b/src/includes/entrepreneur/profile/view.pug @@ -26,7 +26,7 @@ div.block_list.flex sib-display.bold( fields="" nested-field="resources" - counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>` + counter-template=`<p>\${counter} ${data.ResourcesUploadedHere}</p>` bind-resources ) diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index fed838249d4d2e61334c56d15fdfeb5b3da3ec01..d346a90ed45035f79464b59a2b2a30eaa87e7221 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -5,7 +5,7 @@ dialog#resource-report-broken-link-entrepreneur include ./resource-report-broken-link-entrepreneur div.container_min - h2.title_lead.fd_bleu=`${data.generalLabel}` + h2.title_lead.fd_bleu=`${data.GeneralLabel}` button.button_dark.pull-right=`${data.WatchThePresentation}` i.far.fa-play-circle diff --git a/src/includes/mentor/components/header.pug b/src/includes/mentor/components/header.pug index dc33c055fcc7b23086702be2d0e689df3d852c6f..47dcf1f645d96a7d4145518a103a73c480235c48 100644 --- a/src/includes/mentor/components/header.pug +++ b/src/includes/mentor/components/header.pug @@ -16,11 +16,13 @@ label-languages='' naked ) + .dropdownWrapper sib-display#mentor_account_picture.dropdownLabel( bind-user - fields='account.picture', - widget-account.picture='cs-account-picture' + nested-field="account" + fields="foaf:depiction" + widget-foaf:depiction='cs-account-picture' ) div.dropdownPanel ul diff --git a/src/includes/mentor/profile/detail.pug b/src/includes/mentor/profile/detail.pug index 5af1c16eabaa432f416c390435221c5388b66dd8..9cc61b3d4ec05d1ce31fc40a48a858b106bf652c 100644 --- a/src/includes/mentor/profile/detail.pug +++ b/src/includes/mentor/profile/detail.pug @@ -27,9 +27,10 @@ div.block_list.flex sib-display#mentor_info( bind-user - fields='account.picture, name, mentorProfile.headline, mentorProfile.city, mentorProfile.country.name, registered_on' + fields='account.picture, name, mentorProfile.organisation.name, mentorProfile.headline, mentorProfile.city, mentorProfile.country.name, registered_on' widget-account.picture='cs-profile-picture' widget-name='cs-display-property' + widget-mentorProfile.organisation.name='cs-display-property' widget-mentorProfile.headline='cs-display-property' widget-mentorProfile.city='cs-display-property' widget-mentorProfile.country.name='cs-display-property' @@ -39,7 +40,7 @@ div.block_list.flex sib-display.bold( fields="" nested-field="resources" - counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>` + counter-template=`<p>\${counter} ${data.ResourcesUploadedHere}</p>` bind-user ) diff --git a/src/includes/mentor/profile/edit.pug b/src/includes/mentor/profile/edit.pug index 08c42597b2cb59022c8d31d18411d960aab678fc..2e76acedf377e60e983120bedb30a65662bb8f77 100644 --- a/src/includes/mentor/profile/edit.pug +++ b/src/includes/mentor/profile/edit.pug @@ -3,14 +3,13 @@ h2.title_create= data.EditYourAccount sib-form#mentor_profile_edition.block_log.block_creat_count( bind-user partial - fields="account_information(last_name, first_name, mentorProfile.organisation,\ + fields="account_information(last_name, first_name,\ mentorProfile.phone, mentorProfile.languages, mentorProfile.fields),\ about_you(header_about_you, account.picture, mentorProfile.headline, mentorProfile.city, mentorProfile.country,\ mentorProfile.biography, mentorProfile.skills),\ social_media(header_social_media, mentorProfile.linkedin, mentorProfile.twitter), username" range-mentorProfile.fields=`${endpoints.fields}` - range-mentorProfile.organisation=`${endpoints.organisations}` range-mentorProfile.languages=`${endpoints.languages}` range-mentorProfile.country=`${endpoints.countries}` @@ -22,7 +21,6 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( label-first_name=`${data.Surname}` label-last_name=`${data.Name}` - label-mentorProfile.organisation=`${data.Organisation}` label-mentorProfile.phone=`${data.PhoneNumber}` label-mentorProfile.languages=`${data.Language}` label-mentorProfile.fields=`${data.Field}` @@ -42,9 +40,6 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( class-mentorProfile.country='form-label is-dark' widget-mentorProfile.country='sib-form-auto-completion' - class-mentorProfile.organisation='form-label is-dark' - widget-mentorProfile.organisation='sib-form-auto-completion' - class-mentorProfile.languages='form-label is-dark' multiple-mentorProfile.languages='sib-multiple-select' widget-mentorProfile.languages='sib-form-auto-completion' @@ -63,5 +58,20 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( next="mentor-account-edit-confirmation" ) +sib-form#mentor_profile_organisation.block_log.block_creat_count( + partial + bind-user + nested-field="mentorProfile" + fields="organisation" + + range-organisation=`${endpoints.organisations}` + label-organisation=`${data.Organisation}` + class-organisation='form-label is-dark input_big' + widget-organisation='sib-form-auto-completion' + + submit-button=`${data.SaveModification}` + next='mentor-account-edit-confirmation' +) + sib-link(class="backlink", next="mentor-account")= data.BackToMyAccount sib-link(class="backlink", next="mentor-dashboard")= data.BackToDashboard diff --git a/src/includes/mentor/profile/view.pug b/src/includes/mentor/profile/view.pug index 1525ae111fca72971329767a3354594f659c5fc7..2e34e3d6e84f557b373fde1f01e5824d24318f69 100644 --- a/src/includes/mentor/profile/view.pug +++ b/src/includes/mentor/profile/view.pug @@ -26,7 +26,7 @@ div.block_list.flex sib-display.bold( fields="" nested-field="resources" - counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>` + counter-template=`<p>\${counter} ${data.ResourcesUploadedHere}</p>` bind-resources ) diff --git a/src/includes/mentor/resources/confirmation.pug b/src/includes/mentor/resources/confirmation.pug index e0b347a3df8ca9a47d02b9e158151be6c5c46994..24edebc40935825301d28c2eb4fda8db176a68ff 100644 --- a/src/includes/mentor/resources/confirmation.pug +++ b/src/includes/mentor/resources/confirmation.pug @@ -1,5 +1,5 @@ div.container_min - h2.title_lead.fd_bleu=`${data.generalLabel}` + h2.title_lead.fd_bleu=`${data.GeneralLabel}` sib-router sib-route(name='resource-validation-process-confirmation') diff --git a/src/includes/mentor/resources/database.pug b/src/includes/mentor/resources/database.pug index 8ed30ab123fe418e280cef1a76deb2dbaf85f902..81fe4ce0748cfb7d592ec5fb9df3abad42fcb44d 100644 --- a/src/includes/mentor/resources/database.pug +++ b/src/includes/mentor/resources/database.pug @@ -1,5 +1,5 @@ div.container_min - h2.title_lead.fd_bleu=`${data.generalLabel}` + h2.title_lead.fd_bleu=`${data.GeneralLabel}` button.button_dark.pull-right= `${data.WatchThePresentation}` i.far.fa-play-circle diff --git a/src/includes/mentor/resources/list.pug b/src/includes/mentor/resources/list.pug index bc07b486b7d23cbb604c58d74458ddd8ead15716..3d83296511c23f1130164daf2909a1402ea72de7 100644 --- a/src/includes/mentor/resources/list.pug +++ b/src/includes/mentor/resources/list.pug @@ -13,7 +13,7 @@ dialog#confirm_status_change.no-sidebar include ./confirmation-status-change div.container_min - h2.title_lead.fd_bleu=`${data.generalLabel}` + h2.title_lead.fd_bleu=`${data.GeneralLabel}` button.button_dark.pull-right=`${data.WatchThePresentation}` i.far.fa-play-circle diff --git a/src/includes/public/profile/view.pug b/src/includes/public/profile/view.pug index 0ee6b03caee1a88bed52c70c30671f80c9b4a3fb..d1c4f57b2bdeb340ab2efdcf05bbfb6f7ea14c74 100644 --- a/src/includes/public/profile/view.pug +++ b/src/includes/public/profile/view.pug @@ -26,7 +26,7 @@ div.block_list.flex sib-display.bold( fields="" nested-field="resources" - counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>` + counter-template=`<p>\${counter} ${data.ResourcesUploadedHere}</p>` bind-resources ) diff --git a/src/includes/public/resources/list.pug b/src/includes/public/resources/list.pug index fd5811cbda7f4cacafc86579ba09fafb6d4fd39a..702c97f7ba585e14f1006d0a78a8dd28dc2a79d9 100644 --- a/src/includes/public/resources/list.pug +++ b/src/includes/public/resources/list.pug @@ -5,7 +5,7 @@ dialog#resource-report-broken-link-public include ./resource-report-broken-link-public div.container_min - h2.title_lead.fd_bleu=`${data.generalLabel}` + h2.title_lead.fd_bleu=`${data.GeneralLabel}` button.button_dark.pull-right=`${data.WatchThePresentation}` i.far.fa-play-circle diff --git a/src/includes/splash.pug b/src/includes/splash.pug index 576d2d6f12a6a308030ddc1b13143f4b4a58524e..c16ac092f9a47ba3341e10b1cb803712c3073e55 100644 --- a/src/includes/splash.pug +++ b/src/includes/splash.pug @@ -4,7 +4,7 @@ sib-router(default-route='splash-index') figure(class="logo") img(src=`${client_domain}/images/logo.png` alt="Coopstarter logo") -h2.title_lead=`${data.welcome}` +h2.title_lead=`${data.Welcome}` #splash-index(hidden).no-sidebar.block_log.flex.loggin figure.img_log diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 204c8850302179dad945367254ba86d3a9409d08..d018da06a9e089b4aca91673e77795d9fea3e872 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -137,7 +137,9 @@ async function refreshUser(formId, listId) { profile.clearCache(); } else { profile = await listProxy['mentorProfile']; - profile.clearCache(); + if (profile) { + profile.clearCache(); + } } } }); @@ -742,16 +744,26 @@ document.addEventListener("DOMContentLoaded", event => { refreshUser("entrepreneur_profile_creation", "entrepreneur_info"); refreshUser("entrepreneur_profile_creation", "entrepreneur_contact"); refreshUser("entrepreneur_profile_creation", "entrepreneur_account_picture"); + refreshUser("entrepreneur_profile_creation", "entrepreneur_profile_edition"); + refreshUser("entrepreneur_profile_creation", "entrepreneur_profile_organisation"); + refreshUser("entrepreneur_profile_creation", "entrepreneur_profile_picture"); refreshUser("mentor_profile_creation", "mentor_info"); refreshUser("mentor_profile_creation", "mentor_complementary"); refreshUser("mentor_profile_creation", "mentor_contact"); refreshUser("mentor_profile_creation", "mentor_account_picture"); + refreshUser("mentor_profile_creation", "mentor_profile_edition"); + refreshUser("mentor_profile_creation", "mentor_profile_organisation"); refreshUser("entrepreneur_profile_edition", "entrepreneur_info"); refreshUser("entrepreneur_profile_edition", "entrepreneur_contact"); - refreshUser("entrepreneur_profile_edition", "entrepreneur_account_picture"); + refreshUser("entrepreneur_profile_organisation", "entrepreneur_info"); + refreshUser("entrepreneur_profile_organisation", "entrepreneur_contact"); + refreshUser("entrepreneur_profile_picture", "entrepreneur_account_picture"); refreshUser("mentor_profile_edition", "mentor_info"); refreshUser("mentor_profile_edition", "mentor_complementary"); refreshUser("mentor_profile_edition", "mentor_contact"); + refreshUser("mentor_profile_organisation", "mentor_info"); + refreshUser("mentor_profile_organisation", "mentor_complementary"); + refreshUser("mentor_profile_organisation", "mentor_contact"); refreshUser("mentor_profile_edition", "mentor_account_picture"); addProperFilterToSearchComponents("entrepreneur-resource-list"); diff --git a/translation/en.yml b/translation/en.yml index 02f0926523dabbe11d665ac32f402f9e23184d15..c14cd0f11d2d7a93639f13053c68e0f233adbd27 100644 --- a/translation/en.yml +++ b/translation/en.yml @@ -5,8 +5,8 @@ MyAccount : My account Logout : Logout BackToDashboard : -> Back to dashboard BackToMyAccount : Back to my account -welcome : Welcome to our international index of resources for cooperative contributors and searchers -generalLabel : International index of resources for cooperative contributors and searchers +Welcome : Welcome to our international index of resources for cooperative contributors and searchers +GeneralLabel : International index of resources for cooperative contributors and searchers PostResource: Post a new Resource BrowseDatabase: Browse database ResourcesRequestingValidation: Resources requesting validation @@ -34,7 +34,7 @@ Author : Author Access : Access Comments : Comments RelatedResources : Related resources -resourcesUploadedHere : resource(s) uploaded here +ResourcesUploadedHere : resource(s) uploaded here Activities : Activities Skills : Skills PhoneNumber : Phone number diff --git a/translation/fr.yml b/translation/fr.yml index dbe68ed45090866423009278dcead64d91cc04cc..023ec5955e125e62cc4a14089418cf5f62009b96 100644 --- a/translation/fr.yml +++ b/translation/fr.yml @@ -5,8 +5,8 @@ MyAccount : Mon compte Logout : Déconnexion BackToDashboard : Retour au tableau de bord BackToMyAccount : Retour à mon compte -welcome : Bienvenue dans notre répertoire international de ressources pour les contributeurs et les chercheurs coopératifs. -generalLabel : Index international de ressources pour les contributeurs et les chercheurs coopératifs +Welcome : Bienvenue dans notre répertoire international de ressources pour les contributeurs et les chercheurs coopératifs. +GeneralLabel : Index international de ressources pour les contributeurs et les chercheurs coopératifs PostResource: Poster une nouvelle ressource BrowseDatabase: Rechercher dans la base de données ResourcesRequestingValidation: Ressources à valider @@ -34,7 +34,7 @@ Author : Auteur Access : Accés Comments : Commentaires RelatedResources : Ressources connexes -resourcesUploadedHere : ressource(s) téléchargé ici +ResourcesUploadedHere : ressource(s) téléchargé ici Activities : Activités Skills : Compétences PhoneNumber : Numéro de téléphone