diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index 2c88f7a2f90af85ce7ddad455eb98bd4ea579ce7..4e771484915e2bbd2402f1388a7f859bc0cf7c79 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -4,12 +4,43 @@ sib-widget(name='cs-section_header') sib-widget(name='cs-display-resource-property') template - p #[b ${label}] ${value} + p #[b ${label}] ${value} + +sib-widget(name='cs-display-mentor-link') + template + p #[b ${label}] + sib-link( + bind-resources + data-src="${await value}" + next="mentor-account-view" + ) ${await value.name} + +sib-widget(name='cs-display-entrepreneur-link') + template + p #[b ${label}] + sib-link( + bind-resources + data-src="${await value}" + next="entrepreneur-account-view" + ) ${await value.name} + +sib-widget(name='cs-display-user-link') + template + p #[b ${label}] + sib-link( + bind-resources + data-src="${await value}" + next="user-account-view" + ) ${await value.name} sib-widget(name='cs-display-property') template p ${value} +sib-widget(name='cs-display-page-title') + template + h2.title_lead.fd_bleu ${value} + sib-widget(name='cs-steps-resources-multiple') template div.resource_resume_header @@ -62,10 +93,6 @@ sib-widget(name='cs-resource-format-name') div p ${await value.name} -sib-widget(name='cs-resource-reviewer') - template - p <b>Resource validated by: </b> ${value} - sib-widget(name='cs-resource-status') template div.button_base.button_pending ${value == 'pending' ? `Pending validation` : ( value == 'to_improve' ? `Improvement required` : ( value == 'validated' ? `Validated` : `Refused` ) ) } diff --git a/src/includes/entrepreneur/components/menu.pug b/src/includes/entrepreneur/components/menu.pug index c37f5312d95a8f0ff3a7dbca419459398969756a..194e9db81b87f576316892ee3df5ac722f3446e1 100644 --- a/src/includes/entrepreneur/components/menu.pug +++ b/src/includes/entrepreneur/components/menu.pug @@ -2,4 +2,6 @@ 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) - sib-route(name='entrepreneur-account-edit-confirmation') \ No newline at end of file + sib-route(name='entrepreneur-account-edit-confirmation') + sib-ac-checker(permission="acl:Read" bind-resources) + sib-route(id-prefix=`${endpoints.users}`, name='entrepreneur-account-view', use-id) \ No newline at end of file diff --git a/src/includes/entrepreneur/dashboard.pug b/src/includes/entrepreneur/dashboard.pug index a84c072e5630e937dd8b4c05e991b22ed9cc9f03..9d0a7953017fcedbbc485941b348aba88d1aff36 100644 --- a/src/includes/entrepreneur/dashboard.pug +++ b/src/includes/entrepreneur/dashboard.pug @@ -44,3 +44,7 @@ section#home #entrepreneur-account-edit-confirmation(hidden).no-sidebar.container include profile/confirmation.pug + #entrepreneur-account-view(hidden).no-sidebar.container + include profile/view.pug + + diff --git a/src/includes/entrepreneur/profile/view.pug b/src/includes/entrepreneur/profile/view.pug new file mode 100644 index 0000000000000000000000000000000000000000..6bad6b206b8c5d36a6d5e4f57d8413d9a3422312 --- /dev/null +++ b/src/includes/entrepreneur/profile/view.pug @@ -0,0 +1,57 @@ +div.container_min + sib-display( + bind-resources + fields='name' + widget-name='cs-display-page-title' + ) + +div.block_list.flex + div.button__actions.w_25 + div.dashboard__database + sib-link(next='entrepreneur-resource-list') + div.button_base.ico_gauche.ico_database=`${data.BrowseDatabase}` + + div.profile_information.block_log.w_75 + sib-display#mentor_info( + bind-resources + fields='account.picture, name, mentorProfile.headline, mentorProfile.city, mentorProfile.country.name, registered_on' + widget-account.picture='cs-profile-picture' + widget-name='cs-display-property' + widget-mentorProfile.headline='cs-display-property' + widget-mentorProfile.city='cs-display-property' + widget-mentorProfile.country.name='cs-display-property' + widget-mentorProfile.registered_on='cs-display-property' + ) + + sib-display.bold( + fields="" + nested-field="resources" + counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>` + bind-resources + ) + + sib-display#mentor_complementary( + bind-resources + fields='biography_label, mentorProfile.biography, skills_label, mentorProfile.skills' + widget-biography_label='cs-display-label' + widget-skills_label='cs-display-label' + label-skills_label=`${data.Skills}` + label-biography_label=`${data.Activities}` + widget-mentorProfile.skills='cs-display-property' + widget-mentorProfile.biography='cs-display-property' + ) + + sib-display#mentor_contact( + bind-resources + fields='email, mentorProfile.phone, mentorProfile.linkedin, mentorProfile.twitter' + label-email=`${data.Email} : ` + class-email="contact_profil" + label-mentorProfile.phone=`${data.PhoneNumber} : ` + class-mentorProfile.phone="contact_profil" + widget-email='cs-display-resource-property' + widget-mentorProfile.phone='cs-display-resource-property' + widget-mentorProfile.linkedin='cs-display-link' + widget-mentorProfile.twitter='cs-display-link' + label-mentorProfile.twitter='<i class="fab fa-twitter"></i>' + label-mentorProfile.linkedin='<i class="fab fa-linkedin-in"></i>' + ) \ No newline at end of file diff --git a/src/includes/entrepreneur/resources/detail.pug b/src/includes/entrepreneur/resources/detail.pug index 5367b01f4446801e28151f5c1d7759907fe64357..b1c9509b3421ff0d030862cfcd5a3604c0cc7c7c 100644 --- a/src/includes/entrepreneur/resources/detail.pug +++ b/src/includes/entrepreneur/resources/detail.pug @@ -11,21 +11,21 @@ loader-id="detail-entrepreneur-loader" bind-resources, fields='name, steps, format.name, \ - submitter_info(submitter.account.picture, submitter.name, \ + submitter_info(submitter.account.picture, submitter, \ submitter.mentorProfile.organisation.name, skills, uri, broken),\ content(preview_image, iframe_link),\ - description, review.reviewer.account.picture, review.reviewer.name,\ + description, review.reviewer.account.picture, review.reviewer,\ copyright, specifications(\ header_specifications, author, country.name, language.name,\ publication_year, fields, sharing)', - widget-submitter.name='cs-display-resource-property', + widget-submitter='cs-display-entrepreneur-link' class-name="title_form" class-steps="steps" widget-author='cs-display-resource-property', widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' - class-submitter.name="autor_ressource" + class-submitter="resource-author" class-broken="broken" widget-format.name='cs-display-resource-property' widget-uri='cs-display-link' @@ -40,8 +40,8 @@ widget-broken='cs-broken-action' widget-preview_image='cs-preview-picture' widget-review.reviewer.account.picture='cs-account-picture' - widget-review.reviewer.name='cs-resource-reviewer' - class-review.reviewer.name="validator_ressource" + widget-review.reviewer='cs-display-entrepreneur-link' + class-review.reviewer="validator_ressource" widget-header_specifications='cs-section_header' widget-iframe_link='iframe-video-resource' @@ -70,7 +70,8 @@ label-country.name=`${data.Country}` label-submitter.mentorProfile.organisation.name=`${data.Organisation}` label-author=`${data.Author}` - label-submitter.name=`${data.ResourcePostedBy}` + label-submitter=`${data.ResourcePostedBy}: ` + label-review.reviewer=`${data.ResourceValidatedBy}: ` action-broken='resource-report-broken-link-entrepreneur' ) diff --git a/src/includes/mentor/components/menu.pug b/src/includes/mentor/components/menu.pug index 8aa5ce809310d6d42ca0725d72051dfc5bc4ca9f..982b9bdc1c9c97f8ea9230e3e9d7877a366897c0 100644 --- a/src/includes/mentor/components/menu.pug +++ b/src/includes/mentor/components/menu.pug @@ -2,6 +2,8 @@ sib-router(default-route='mentor-resource-list' route-prefix=lang) 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:Read" bind-resources) + sib-route(id-prefix=`${endpoints.users}`, name='mentor-account-view', 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/dashboard.pug b/src/includes/mentor/dashboard.pug index 1239b8ac89c7b18b26b295b8a8122c18a944f9f8..f34fb096e76e9d8d25ab5e50c616877f3bee4a2d 100644 --- a/src/includes/mentor/dashboard.pug +++ b/src/includes/mentor/dashboard.pug @@ -33,7 +33,7 @@ section#home .like p.backlink i.fas.fa-times - + div#detail-mentor-loader hidden i.fas.fa-spinner.fa-spin @@ -69,6 +69,9 @@ section#home #mentor-account(hidden).no-sidebar.container include profile/detail.pug + #mentor-account-view(hidden).no-sidebar.container + include profile/view.pug + #mentor-account-edit(hidden).no-sidebar.container include profile/edit.pug diff --git a/src/includes/mentor/profile/view.pug b/src/includes/mentor/profile/view.pug new file mode 100644 index 0000000000000000000000000000000000000000..279c4e7ef3914ad884ed4418f77e9ea7ed00ea82 --- /dev/null +++ b/src/includes/mentor/profile/view.pug @@ -0,0 +1,57 @@ +div.container_min + sib-display( + bind-resources + fields='name' + widget-name='cs-display-page-title' + ) + +div.block_list.flex + div.button__actions.w_25 + div.dashboard__database + sib-link(next='mentor-database') + div.button_base.ico_gauche.ico_database=`${data.BrowseDatabase}` + + div.profile_information.block_log + sib-display#mentor_info( + bind-resources + fields='account.picture, name, mentorProfile.headline, mentorProfile.city, mentorProfile.country.name, registered_on' + widget-account.picture='cs-profile-picture' + widget-name='cs-display-property' + widget-mentorProfile.headline='cs-display-property' + widget-mentorProfile.city='cs-display-property' + widget-mentorProfile.country.name='cs-display-property' + widget-mentorProfile.registered_on='cs-display-property' + ) + + sib-display.bold( + fields="" + nested-field="resources" + counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>` + bind-resources + ) + + sib-display#mentor_complementary( + bind-resources + fields='biography_label, mentorProfile.biography, skills_label, mentorProfile.skills' + widget-biography_label='cs-display-label' + widget-skills_label='cs-display-label' + label-skills_label=`${data.Skills}` + label-biography_label=`${data.Activities}` + widget-mentorProfile.skills='cs-display-property' + widget-mentorProfile.biography='cs-display-property' + ) + + sib-display#mentor_contact( + bind-resources + fields='email, mentorProfile.phone, mentorProfile.linkedin, mentorProfile.twitter' + label-email=`${data.Email} : ` + class-email="contact_profil" + label-mentorProfile.phone=`${data.PhoneNumber} : ` + class-mentorProfile.phone="contact_profil" + widget-email='cs-display-resource-property' + widget-mentorProfile.phone='cs-display-resource-property' + widget-mentorProfile.linkedin='cs-display-link' + widget-mentorProfile.twitter='cs-display-link' + label-mentorProfile.twitter='<i class="fab fa-twitter"></i>' + label-mentorProfile.linkedin='<i class="fab fa-linkedin-in"></i>' + ) \ No newline at end of file diff --git a/src/includes/mentor/resources/detail.pug b/src/includes/mentor/resources/detail.pug index b8f8c2ccfb0158176f02440171be3385216c57f2..f791b3c15329e0709a9d02daa13169d9498a5725 100644 --- a/src/includes/mentor/resources/detail.pug +++ b/src/includes/mentor/resources/detail.pug @@ -2,21 +2,21 @@ sib-display#detail-mentor( loader-id="detail-mentor-loader" bind-resources, fields='name, steps, format.name,\ - submitter_info(submitter.account.picture, submitter.name, \ + submitter_info(submitter.account.picture, submitter, \ submitter.mentorProfile.organisation.name, skills, uri, broken),\ content(preview_image, iframe_link),\ - description, review.reviewer.account.picture, review.reviewer.name,\ + description, review.reviewer.account.picture, review.reviewer,\ copyright, specifications(\ header_specifications, author, country, language.name,\ publication_year, fields, sharing)', - widget-submitter.name='cs-display-resource-property', + widget-submitter='cs-display-mentor-link', class-name="title_form" class-steps="steps" widget-author='cs-display-resource-property', widget-country='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' - class-submitter.name="autor_ressource" + class-submitter="resource-author" class-broken="broken" widget-format.name='cs-display-resource-property' class-format.name='format_type' @@ -32,8 +32,8 @@ sib-display#detail-mentor( widget-broken='cs-broken-action' widget-preview_image='cs-preview-picture' widget-review.reviewer.account.picture='cs-account-picture' - widget-review.reviewer.name='cs-resource-reviewer' - class-review.reviewer.name="validator_ressource" + widget-review.reviewer='cs-display-mentor-link' + class-review.reviewer="validator_ressource" widget-header_specifications='cs-section_header' label-broken=`${data.ReportBrokenLink}` @@ -60,7 +60,8 @@ sib-display#detail-mentor( label-country=`${data.Country} : ` label-submitter.mentorProfile.organisation.name=`${data.Organisation} : ` label-author=`${data.Author} : ` - label-submitter.name=`${data.ResourcePostedBy} : ` + label-submitter=`${data.ResourcePostedBy}: ` + label-review.reviewer=`${data.ResourceValidatedBy}: ` action-broken='resource-report-broken-link-mentor' ) diff --git a/src/includes/mentor/resources/validate.pug b/src/includes/mentor/resources/validate.pug index 3f10952ffea36c37e476f2cf9cc0394840979da5..148933c8e42ea89254cc81771ede23fe31edfc26 100644 --- a/src/includes/mentor/resources/validate.pug +++ b/src/includes/mentor/resources/validate.pug @@ -17,20 +17,20 @@ sib-router loader-id="detail-validation-loader" bind-resources, fields='name, steps, format.name,\ - submitter_info(submitter.account.picture, submitter.name, \ + submitter_info(submitter.account.picture, submitter, \ submitter.mentorProfile.organisation.name, skills, uri, broken),\ content(preview_image),\ description, copyright, specifications(\ header_specifications, author, country.name, language.name,\ publication_year, fields, sharing)', - widget-submitter.name='cs-display-resource-property', + widget-submitter='cs-display-mentor-link', class-name="title_form" class-steps="steps" widget-author='cs-display-resource-property', widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' - class-submitter.name="autor_ressource" + class-submitter="resource-author" class-broken="broken" widget-format.name='cs-display-resource-property' class-format.name='format_type' @@ -70,7 +70,7 @@ sib-router label-country.name=`${data.Country}` label-submitter.mentorProfile.organisation.name=`${data.Organisation}` label-author=`${data.Author}` - label-submitter.name=`${data.ResourcePostedBy}` + label-submitter=`${data.ResourcePostedBy}: ` action-broken='resource-report-broken-link-mentor' ) diff --git a/src/includes/public/components/menu.pug b/src/includes/public/components/menu.pug index 19d3bb02784957e11f5583da705f1291d4b1e357..e925ec37a251a58cf97cd50d1cdc0e6d70c4a73a 100644 --- a/src/includes/public/components/menu.pug +++ b/src/includes/public/components/menu.pug @@ -1,4 +1,5 @@ sib-router(default-route='public-resource-list') sib-route(name='public-resource-list') - + sib-ac-checker(permission="acl:Read" bind-resources) + sib-route(id-prefix=`${endpoints.users}`, name='user-account-view', use-id) \ No newline at end of file diff --git a/src/includes/public/dashboard.pug b/src/includes/public/dashboard.pug index 0b21eda2decf3bed8c317c7ca001da650779670b..7d2ec083a18532b5b76e2aa9fc0524724c4c294a 100644 --- a/src/includes/public/dashboard.pug +++ b/src/includes/public/dashboard.pug @@ -17,7 +17,8 @@ section#home dialog#public-resource-detail.no-sidebar include resources/detail.pug - + #user-account-view(hidden).no-sidebar.container + include profile/view.pug diff --git a/src/includes/public/profile/view.pug b/src/includes/public/profile/view.pug new file mode 100644 index 0000000000000000000000000000000000000000..890c3edca36c5b0bfcb4a5b61736feb203701eea --- /dev/null +++ b/src/includes/public/profile/view.pug @@ -0,0 +1,57 @@ +div.container_min + sib-display( + bind-resources + fields='name' + widget-name='cs-display-page-title' + ) + +div.block_list.flex + div.button__actions.w_25 + div.dashboard__database + sib-link(next='public-resource-list') + div.button_base.ico_gauche.ico_database=`${data.BrowseDatabase}` + + div.profile_information.block_log + sib-display#mentor_info( + bind-resources + fields='account.picture, name, mentorProfile.headline, mentorProfile.city, mentorProfile.country.name, registered_on' + widget-account.picture='cs-profile-picture' + widget-name='cs-display-property' + widget-mentorProfile.headline='cs-display-property' + widget-mentorProfile.city='cs-display-property' + widget-mentorProfile.country.name='cs-display-property' + widget-mentorProfile.registered_on='cs-display-property' + ) + + sib-display.bold( + fields="" + nested-field="resources" + counter-template=`<p>\${counter} ${data.resourcesUploadedHere}</p>` + bind-resources + ) + + sib-display#mentor_complementary( + bind-resources + fields='biography_label, mentorProfile.biography, skills_label, mentorProfile.skills' + widget-biography_label='cs-display-label' + widget-skills_label='cs-display-label' + label-skills_label=`${data.Skills}` + label-biography_label=`${data.Activities}` + widget-mentorProfile.skills='cs-display-property' + widget-mentorProfile.biography='cs-display-property' + ) + + sib-display#mentor_contact( + bind-resources + fields='email, mentorProfile.phone, mentorProfile.linkedin, mentorProfile.twitter' + label-email=`${data.Email} : ` + class-email="contact_profil" + label-mentorProfile.phone=`${data.PhoneNumber} : ` + class-mentorProfile.phone="contact_profil" + widget-email='cs-display-resource-property' + widget-mentorProfile.phone='cs-display-resource-property' + widget-mentorProfile.linkedin='cs-display-link' + widget-mentorProfile.twitter='cs-display-link' + label-mentorProfile.twitter='<i class="fab fa-twitter"></i>' + label-mentorProfile.linkedin='<i class="fab fa-linkedin-in"></i>' + ) \ No newline at end of file diff --git a/src/includes/public/resources/detail.pug b/src/includes/public/resources/detail.pug index 3cd5a039d14678ff0ee946d5e5173f704e4af3c9..be2e29e2467aeab7acd4c01b69f3f6d3ea7539f8 100644 --- a/src/includes/public/resources/detail.pug +++ b/src/includes/public/resources/detail.pug @@ -12,21 +12,21 @@ loader-id="detail-public-loader" bind-resources, fields='name, steps, format.name,\ - submitter_info(submitter.account.picture, submitter.name, \ + submitter_info(submitter.account.picture, submitter, \ submitter.mentorProfile.organisation.name, skills, uri, broken),\ content(preview_image, iframe_link),\ - description, review.reviewer.account.picture, review.reviewer.name,\ + description, review.reviewer.account.picture, review.reviewer,\ copyright, specifications(\ header_specifications, author, country.name, language.name,\ publication_year, fields, sharing)', - widget-submitter.name='cs-display-resource-property', + widget-submitter='cs-display-user-link', class-name="title_form" class-steps="steps" widget-author='cs-display-resource-property', widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' - class-submitter.name="autor_ressource" + class-submitter="resource-author" class-broken="broken" widget-format.name='cs-display-resource-property' widget-uri='cs-display-link' @@ -41,8 +41,8 @@ widget-broken='cs-broken-action' widget-preview_image='cs-preview-picture' widget-review.reviewer.account.picture='cs-account-picture' - widget-review.reviewer.name='cs-resource-reviewer' - class-review.reviewer.name="validator_ressource" + widget-review.reviewer='cs-display-user-link' + class-review.reviewer="validator_ressource" widget-header_specifications='cs-section_header' widget-iframe_link='iframe-video-resource' @@ -70,7 +70,8 @@ label-country.name=`${data.Country}` label-submitter.mentorProfile.organisation.name=`${data.Organisation}` label-author=`${data.Author}` - label-submitter.name=`${data.ResourcePostedBy}` + label-submitter=`${data.ResourcePostedBy}` + label-review.reviewer=`${data.ResourceValidatedBy}` action-broken='resource-report-broken-link-public' ) diff --git a/src/styles/index.scss b/src/styles/index.scss index 398319973753b19a7b038b2fc608eb3b62d27c8d..78e387a836c2787ee6fb7b1683814e08f7f25337 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1601,7 +1601,7 @@ sib-set-default[name="submitter_info"]{ text-decoration: none; } } - .autor_ressource, .validator_ressource{ + .resource-author, .validator_ressource{ p{ color: var(--clr-typo-base); font-size: 1.4rem; @@ -1839,6 +1839,12 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ } } +#entrepreneur-account-view .profile_information, +#user-account-view .profile_information, +#mentor-account-view .profile_information { + margin-left: 0; +} + cs-profile-picture{ width: 8.5rem; height: 8.5rem; @@ -1901,10 +1907,10 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ #entrepreneur-resource-list .accordion.active cs-steps-header[label="Étape 1 "]>div{ margin: 2rem 0 0 0; } -#mentor-database .block_log.block_list>.step:first-child, -#entrepreneur-resource-list .block_log.block_list>.step:first-child{ - padding-bottom: 0; -} +// #mentor-database .block_log.block_list>.step:first-child, +// #entrepreneur-resource-list .block_log.block_list>.step:first-child{ +// padding-bottom: 0; +// } #mentor-database .keyword_submit.button__actions .button_base.ico_gauche, #entrepreneur-resource-list .keyword_submit.button__actions .button_base.ico_gauche{ text-align: center; diff --git a/translation/en.yml b/translation/en.yml index f36f4d2cb8b012da5cef2d40db55a1bad01b1cad..01921be7d4a4f7160fbf8c7f0a45ec24411585d4 100644 --- a/translation/en.yml +++ b/translation/en.yml @@ -25,10 +25,10 @@ DatePublication : Date of publication Format: Format Step: Step ResourcePostedBy : Resource posted by +ResourceValidatedBy : Resource validated by WithResourceAbleTo : With this resource, you will be able to LinkToResource : Link to resource ReportBrokenLink : Report broken link -ResourceValidatedBy : Resource validated by ResourceSpecifications : Resource specifications Author : Author Access : Access diff --git a/translation/fr.yml b/translation/fr.yml index 9194030a627f25c81be589f7f07ad7bd709f28ae..ea222370c6c8d6855338742d431dd6250734f000 100644 --- a/translation/fr.yml +++ b/translation/fr.yml @@ -24,7 +24,7 @@ Refused : Refusé DatePublication : Date de publication Format: Format Step: Étape -ResourcePostedBy : Ressource posté par +ResourcePostedBy : Ressource posté par WithResourceAbleTo : Avec cette ressource vous serez capable de LinkToResource : Lien vers la ressource ReportBrokenLink : Signaler un lien brisé