diff --git a/src/includes/entrepreneur/requests/create.pug b/src/includes/entrepreneur/requests/create.pug index 400cabb440eb9d83c8d11aa56a85f40f0776cc87..b061daa03a2d61f6ba69becd48c202b2128b9be8 100644 --- a/src/includes/entrepreneur/requests/create.pug +++ b/src/includes/entrepreneur/requests/create.pug @@ -7,9 +7,9 @@ hidden i.fas.fa-spinner.fa-spin - h2.title_form=`${data.RequestRessource}` + h2.title_form=`${data.RequestResource}` - p.p_entete=`${data.RequestRessourceInfo}` + p.p_entete=`${data.RequestResourceInfo}` img(src=`${client_domain}/images/asid_entre.png` alt="Rechercher des ressources") sib-form#request-creation-form( diff --git a/src/includes/entrepreneur/resources/detail.pug b/src/includes/entrepreneur/resources/detail.pug index c18d05ca12bdd4a651b5a5a1852e77e34d5f012a..a85e4dab5456e64f4c393939e35483e040107d81 100644 --- a/src/includes/entrepreneur/resources/detail.pug +++ b/src/includes/entrepreneur/resources/detail.pug @@ -16,13 +16,13 @@ content(preview_image, iframe_link),\ description, review.reviewer.account.picture, review.reviewer,\ copyright, specifications(\ - header_specifications, author, country.name, language.name,\ + header_specifications, resource_author, country.name, language.name,\ publication_year, fields, sharing)', widget-submitter='cs-display-entrepreneur-link' class-name="title_form" class-steps="steps" - widget-author='cs-display-resource-property', + widget-resource_author='cs-display-resource-property', widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter="resource-author" @@ -68,7 +68,7 @@ name-uri='original-link' label-country.name=`${data.Country}` label-submitter.mentorProfile.organisation.name=`${data.Organisation}` - label-author=`${data.Author}` + label-resource_author=`${data.Author}` label-submitter=`${data.ResourcePostedBy}: ` label-review.reviewer=`${data.ResourceValidatedBy}: ` action-broken='resource-report-broken-link-entrepreneur' diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 5a5358b3bc1170b706e5950624fd7ab560f81227..d39acb3454fa6ad3b9515cf211a68c7506202107 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -76,7 +76,7 @@ container.block_list div.w_25 div.block_aside_entre img(src=`${client_domain}/images/asid_entre.png` alt="Rechercher des ressources") - p=`${data.CantFindRessourceYouNeed}` + p=`${data.CantFindResourceYouNeed}` div.button__actions sib-link(next='entrepreneur-request-create') div @@ -121,7 +121,7 @@ container.block_list sib-display.resource_by_step( data-src=`${endpoints.step1}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -149,7 +149,7 @@ container.block_list widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -178,7 +178,7 @@ container.block_list sib-display.resource_by_step( data-src=`${endpoints.step2}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -206,7 +206,7 @@ container.block_list widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -233,7 +233,7 @@ container.block_list sib-display.resource_by_step( data-src=`${endpoints.step3}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -260,7 +260,7 @@ container.block_list widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -289,7 +289,7 @@ container.block_list sib-display.resource_by_step( data-src=`${endpoints.step4}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -317,7 +317,7 @@ container.block_list widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -345,7 +345,7 @@ container.block_list sib-display.resource_by_step( data-src=`${endpoints.step5}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -373,7 +373,7 @@ container.block_list widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -401,7 +401,7 @@ container.block_list sib-display.resource_by_step( data-src=`${endpoints.step6}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -429,7 +429,7 @@ container.block_list widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' diff --git a/src/includes/head.pug b/src/includes/head.pug index 10553caa76da1c61ff9d62afa311e6498ffecc1e..4b43aee778e95d185e64517cfc3f1db793ad32eb 100644 --- a/src/includes/head.pug +++ b/src/includes/head.pug @@ -26,10 +26,11 @@ head "entrepreneurProfile": "http://happy-dev.fr/owl/#entrepreneur_profile", "mentorProfile": "http://happy-dev.fr/owl/#mentor_profile", "account":"hd:account", - "avatar":"foaf:depiction", "picture":"foaf:depiction", "messageSet":"http://happy-dev.fr/owl/#message_set", "author":"http://happy-dev.fr/owl/#author_user", - "title":"http://happy-dev.fr/owl/#title" + "title":"http://happy-dev.fr/owl/#title", + "avatar":"foaf:depiction", + "author.avatar":"foaf:depiction" } diff --git a/src/includes/mentor/components/menu.pug b/src/includes/mentor/components/menu.pug index 982b9bdc1c9c97f8ea9230e3e9d7877a366897c0..860910eb24db0cf80c0fab3c479a72928d7c52d9 100644 --- a/src/includes/mentor/components/menu.pug +++ b/src/includes/mentor/components/menu.pug @@ -2,8 +2,7 @@ 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-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/resources/confirmation-deletion.pug b/src/includes/mentor/resources/confirmation-deletion.pug index 17d7e94ab6ba982ffe6d5b44a7200088f330e656..1665b198fe4814e50d42e9a85b1194fbab712611 100644 --- a/src/includes/mentor/resources/confirmation-deletion.pug +++ b/src/includes/mentor/resources/confirmation-deletion.pug @@ -1,5 +1,5 @@ .block_log.block_creat_count.no_shadow - sib-link(class="backlink", next="mentor-resource-list") + sib-link(class="backlink", next="mentor-dashboard") .like p i.fas.fa-times diff --git a/src/includes/mentor/resources/create.pug b/src/includes/mentor/resources/create.pug index bf4d702c79484c007ee80961bf6e2f7d5fc9213d..4cee7fdfd4a46efbe920d56775a6e752fa7153c1 100644 --- a/src/includes/mentor/resources/create.pug +++ b/src/includes/mentor/resources/create.pug @@ -6,7 +6,7 @@ p.p_entete=`${data.ThankYouEnrichingDatabase}` sib-form#resource_creation_form( data-src=`${endpoints.resources}` fields="mandatory_information(header_mandatory, name, country, language, uri,\ - format, fields, author, publication_year, skills),\ + format, fields, resource_author, publication_year, skills),\ complementary_information(header_complementary, description, iframe_link,\ preview_image),classification(header_classification, target, type, steps),\ access(header_access, sharing),related_section(header_related, related)" @@ -39,7 +39,7 @@ p.p_entete=`${data.ThankYouEnrichingDatabase}` label-uri=`${data.LocationWeblinkReq}` label-format=`${data.FormatReq}` label-fields=`${data.FieldRequired}` - label-author=`${data.AuthorReq}` + label-resource_author=`${data.AuthorReq}` label-publication_year=`${data.DatePublication}` label-skills=`${data.SkillReq}` label-description=`${data.Description}` diff --git a/src/includes/mentor/resources/database.pug b/src/includes/mentor/resources/database.pug index 4e69ee403aabefc014d39c2c440133878afac3ea..6d627dcf495c5101cbbf74bd8a1fa814f7adbd01 100644 --- a/src/includes/mentor/resources/database.pug +++ b/src/includes/mentor/resources/database.pug @@ -113,7 +113,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step1}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -141,7 +141,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -169,7 +169,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step2}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -197,7 +197,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -226,7 +226,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step3}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -254,7 +254,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -283,7 +283,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step4}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -311,7 +311,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -339,7 +339,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step5}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -367,7 +367,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -395,7 +395,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step6}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -423,7 +423,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' diff --git a/src/includes/mentor/resources/detail.pug b/src/includes/mentor/resources/detail.pug index 566d5ec60dac06c69e30ed4fc007d8d909e1978a..a49250684c54eb388eb8c5816954d5e77183cb8b 100644 --- a/src/includes/mentor/resources/detail.pug +++ b/src/includes/mentor/resources/detail.pug @@ -7,13 +7,13 @@ sib-display#detail-mentor( content(preview_image, iframe_link),\ description, review.reviewer.account.picture, review.reviewer,\ copyright, specifications(\ - header_specifications, author, country.name, language.name,\ + header_specifications, resource_author, country.name, language.name,\ publication_year, fields, sharing)', widget-submitter='cs-display-mentor-link', class-name="title_form" class-steps="steps" - widget-author='cs-display-resource-property', + widget-resource_author='cs-display-resource-property', widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter="resource-author" @@ -59,7 +59,7 @@ sib-display#detail-mentor( name-uri='original-link' label-country.name=`${data.Country} : ` label-submitter.mentorProfile.organisation.name=`${data.Organisation} : ` - label-author=`${data.Author} : ` + label-resource_author=`${data.Author} : ` label-submitter=`${data.ResourcePostedBy}: ` label-review.reviewer=`${data.ResourceValidatedBy}: ` action-broken='resource-report-broken-link-mentor' @@ -102,7 +102,7 @@ sib-display( bind-resources fields="" nested-field="conversations" - counter-template=`<p>${data.Comments} (${counter})</p>` + counter-template=`<p>${data.Comments} (\${counter})</p>` ) sib-conversation( diff --git a/src/includes/mentor/resources/edit.pug b/src/includes/mentor/resources/edit.pug index f4c592033993eb8582f95e3a4e52867f6af23238..48bfbc4a2964eed5c6145c5dbf149f43b0b3247e 100644 --- a/src/includes/mentor/resources/edit.pug +++ b/src/includes/mentor/resources/edit.pug @@ -7,7 +7,7 @@ p.p_entete=`${data.ThankYouEnrichingDatabase}` bind-resources partial fields="mandatory_information(header_mandatory, name, country, language, uri,\ - format, fields, author, publication_year, skills),\ + format, fields, resource_author, publication_year, skills),\ complementary_information(header_complementary, description, iframe_link,\ preview_image),classification(header_classification, target, type, steps),\ access(header_access, sharing),related_section(header_related, related)" @@ -41,7 +41,7 @@ p.p_entete=`${data.ThankYouEnrichingDatabase}` label-uri=`${data.LocationWeblinkReq}` label-format=`${data.FormatReq}` label-fields=`${data.FieldRequired}` - label-author=`${data.AuthorReq}` + label-resource_author=`${data.AuthorReq}` label-publication_year=`${data.DatePublication}` label-skills=`${data.SkillReq}` label-description=`${data.Description}` diff --git a/src/includes/mentor/resources/list.pug b/src/includes/mentor/resources/list.pug index ff2f6cf65f3d89b368d4d06c8e34f0432d6437d5..a92c8227e5df565919212c1cf9b30eb16111f8cf 100644 --- a/src/includes/mentor/resources/list.pug +++ b/src/includes/mentor/resources/list.pug @@ -46,13 +46,13 @@ div.block_list sib-display#pending_resources( loader-id="loader-review-mentor" data-src=`${endpoints.resources}pending/` - fields='content(name, info(author, publication_year)), validate', + fields='content(name, info(resource_author, publication_year)), validate', widget-publication_year='cs-display-resource-property' label-publication_year='Posted on:' - widget-author='cs-display-resource-property' - label-author='Author:' + widget-resource_author='cs-display-resource-property' + label-resource_author='Author:' action-validate='mentor-resource-validate' label-validate='Check ->' diff --git a/src/includes/mentor/resources/validate.pug b/src/includes/mentor/resources/validate.pug index 76e3c71f94c46d121c60bf2cf08149f4c074bc1a..5bfa5461e1525fb3959516d7e76cd77b7a34562e 100644 --- a/src/includes/mentor/resources/validate.pug +++ b/src/includes/mentor/resources/validate.pug @@ -21,13 +21,13 @@ sib-router submitter.mentorProfile.organisation.name, skills, uri, broken),\ content(preview_image),\ description, copyright, specifications(\ - header_specifications, author, country.name, language.name,\ + header_specifications, resource_author, country.name, language.name,\ publication_year, fields, sharing)', widget-submitter='cs-display-mentor-link', class-name="title_form" class-steps="steps" - widget-author='cs-display-resource-property', + widget-resource_author='cs-display-resource-property', widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter="resource-author" @@ -69,7 +69,7 @@ sib-router name-uri='original-link' label-country.name=`${data.Country}` label-submitter.mentorProfile.organisation.name=`${data.Organisation}` - label-author=`${data.Author}` + label-resource_author=`${data.Author}` label-submitter=`${data.ResourcePostedBy}: ` action-broken='resource-report-broken-link-mentor' ) diff --git a/src/includes/public/resources/detail.pug b/src/includes/public/resources/detail.pug index b529bed5b21b20b6273c6cce622392d9e636eb4a..c0ff85dd490726b551aba4e80686c6412fae9223 100644 --- a/src/includes/public/resources/detail.pug +++ b/src/includes/public/resources/detail.pug @@ -8,7 +8,7 @@ hidden i.fas.fa-spinner.fa-spin - sib-display( + sib-display#detail-public( loader-id="detail-public-loader" bind-resources, fields='name, steps, format.name,\ @@ -17,13 +17,13 @@ content(preview_image, iframe_link),\ description, review.reviewer.account.picture, review.reviewer,\ copyright, specifications(\ - header_specifications, author, country.name, language.name,\ + header_specifications, resource_author, country.name, language.name,\ publication_year, fields, sharing)', widget-submitter='cs-display-user-link', class-name="title_form" class-steps="steps" - widget-author='cs-display-resource-property', + widget-resource_author='cs-display-resource-property', widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter="resource-author" @@ -69,7 +69,7 @@ name-uri='original-link' label-country.name=`${data.Country}` label-submitter.mentorProfile.organisation.name=`${data.Organisation}` - label-author=`${data.Author}` + label-resource_author=`${data.Author}` label-submitter=`${data.ResourcePostedBy}: ` label-review.reviewer=`${data.ResourceValidatedBy}: ` action-broken='resource-report-broken-link-public' diff --git a/src/includes/public/resources/list.pug b/src/includes/public/resources/list.pug index 0b3f488802a40b789ea780b069cacb7500d042fe..4a8b77c1d8a127a9d572f41b6f226480564f856f 100644 --- a/src/includes/public/resources/list.pug +++ b/src/includes/public/resources/list.pug @@ -106,7 +106,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step1}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -134,7 +134,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -163,7 +163,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step2}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -191,7 +191,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -221,7 +221,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step3}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -249,7 +249,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -278,7 +278,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step4}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -306,7 +306,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -335,7 +335,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step5}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -363,7 +363,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' @@ -391,7 +391,7 @@ container.block_list.flex.flex_espace sib-display.resource_by_step( data-src=`${endpoints.step6}`, - fields='name, author, format.name, publication_year, description, country, language, fields', + fields='name, resource_author, format.name, publication_year, description, country, language, fields', search-fields='search_for_a_resource(name), more_criterias_hidden(format, publication_year, country, language, fields, type)', search-range-format=`${endpoints.formats}` search-range-language=`${endpoints.languages}` @@ -419,7 +419,7 @@ container.block_list.flex.flex_espace widget-description='cs-display-property' widget-fields='hidden-widget' widget-language="hidden-widget" - widget-author="hidden-widget" + widget-resource_author="hidden-widget" widget-format.name='cs-display-resource-property' label-format.name='' label-language='' diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 5ed9c83a5523b9736387108067a407b04fd7358d..a1d0e1f2893ab74e6b9e995562a9e34ce1aad8eb 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -126,7 +126,9 @@ async function refreshUser(formId, listId) { // Refresh du cache sur le User listProxy.clearCache(); - account.clearCache(); + if (account) { + account.clearCache(); + } list.dataset.src = list.dataset.src; } @@ -169,20 +171,14 @@ function refreshPagination() { * @param {HTMLElement} option_selected - Option selcted to set in hidden select. */ function selectHiddenManagement(select_hidden, option_selected) { - console.log("option_selected in selectHiddenManagement", option_selected) - console.log("select_hidden in selectHiddenManagement", select_hidden) options_hidden = select_hidden.getElementsByTagName("option"); for (let option_hidden of options_hidden) { //Removing the selected attribute from previous selection option_hidden.removeAttribute("selected"); - console.log("option_hidden.value",option_hidden.value) - console.log("option_selected.value",option_selected.value) if (option_hidden.value == option_selected.value) { -console.log("we change the value") //Actually selecting the option if it is the good one option_hidden.setAttribute("selected", "selected"); select_hidden.setAttribute("value", option_selected.value); - console.log("select_hidden", select_hidden) break; } } @@ -252,34 +248,28 @@ function InitManagementForType() { var forms = document.querySelectorAll(".resource_by_step"); forms.forEach(form => { - form.addEventListener( - "populate", - e => { - window.setTimeout(() => { - let type_hidden_field = form.querySelectorAll('select[name="type"]'); - type_hidden_field.forEach(function(select_hidden) { - options_hidden = select_hidden.getElementsByTagName("option"); - for (let option_hidden of options_hidden) { - option_hidden.removeAttribute("selected"); - str = option_hidden.value - - if (str.substr(str.length - 10) == 'types/1/"}') { - //Actually selecting the option if it is the good one - option_hidden.setAttribute("selected", "selected"); - select_hidden.setAttribute("value", option_hidden.value); - } - } - - //Trigerring a reload of the associated form - let parent_form = select_hidden.closest("sib-form"); - parent_form.component.inputChange(); - parent_form.dispatchEvent(new CustomEvent('formChange')); - refreshPagination(); - }); - }); - }, - 3000 - ); + form.addEventListener("populate", e => { + let type_hidden_field = form.querySelectorAll('select[name="type"]'); + type_hidden_field.forEach(function(select_hidden) { + options_hidden = select_hidden.getElementsByTagName("option"); + for (let option_hidden of options_hidden) { + option_hidden.removeAttribute("selected"); + str = option_hidden.value + + if (str.substr(str.length - 10) == 'types/1/"}') { + //Actually selecting the option if it is the good one + option_hidden.setAttribute("selected", "selected"); + select_hidden.setAttribute("value", option_hidden.value); + } + } + + //Trigerring a reload of the associated form + let parent_form = select_hidden.closest("sib-form"); + parent_form.component.inputChange(); + parent_form.dispatchEvent(new CustomEvent('formChange')); + refreshPagination(); + }); + }); }); } @@ -665,7 +655,7 @@ function listenToInputChangeOnResourceCreation(originalForm) { let submitInput = originalForm.querySelectorAll('input[type=submit]')[0]; if (originalForm.querySelectorAll('input[name="name"]')[0].value != "" && originalForm.querySelectorAll('input[name="uri"]')[0].value != "" && - originalForm.querySelectorAll('input[name="author"]')[0].value != "" && + originalForm.querySelectorAll('input[name="resource_author"]')[0].value != "" && originalForm.querySelectorAll('textarea[name="skills"]')[0].value != "" && originalForm.querySelectorAll('select[name="fields"]')[0].value != "" && originalForm.querySelectorAll('select[name="target"]')[0].value != "" && @@ -871,6 +861,25 @@ jQuery(document).ready(function($) { var formBrokenLink = document.getElementById("report-broken-link-mentor"); fillReportBrokenLinkForm(event, userWhoSubmitReport, formBrokenLink); + // Manage closing the detail dialog from the profile link access + var contributorProfileLinks = document.getElementsByTagName('cs-display-mentor-link'); + for (let profileLink of contributorProfileLinks) { + let links = profileLink.getElementsByTagName('sib-link'); + for (let link of links) { + link.addEventListener('click', function() { + let mentor_resource_detail = document.getElementById( + "mentor-resource-detail" + ); + mentor_resource_detail.removeAttribute('open'); + + let mentor_database_detail = document.getElementById( + "mentor-database-resource-detail" + ); + mentor_database_detail.removeAttribute('open'); + }); + }; + }; + // // Fill the hidden like-form // document.querySelector('sib-auth').getUser().then(data=> { // let targetFormLike = document.getElementById('add-like'); @@ -907,19 +916,22 @@ jQuery(document).ready(function($) { initFileUpload("mentor_profile_creation", "account.picture"); initFileUpload("mentor_profile_edition", "account.picture"); refreshRequestList("change_status_request", "request_list"); - + //Manage the accordion in request mentor dashboard. manageAccordionForRequest(); //Refresh data list on delete resources const deleteButton = document.querySelectorAll("sib-delete"); for (var i = 0; i < deleteButton.length; i++) { - deleteButton[i].addEventListener("resourceDeleted", e => { + deleteButton[i].addEventListener("resourceDeleted", async(e) => { const historyList = document.getElementById("resources_history"); + let listProxy = await historyList.component.resource; + historyList.dataset.src = historyList.dataset.src; - + // Refresh du cache sur la liste + listProxy.clearCache(); let confirm_suppress = document.getElementById("confirm_suppress"); - confirm_suppress.setAttribute("hidden", "hidden"); + confirm_suppress.setAttribute("hidden", "hidden"); //If we supress from the detail resource view, we close this view. let mentor_resource_detail = document.getElementById( "mentor-resource-detail" @@ -928,7 +940,7 @@ jQuery(document).ready(function($) { this.dispatchEvent( new CustomEvent("requestNavigation", { bubbles: true, - detail: { route: "actions" } + detail: { route: "mentor-dashboard" } }) ); }); @@ -961,6 +973,38 @@ jQuery(document).ready(function($) { initFileUpload("entrepreneur_profile_edition", "account.picture"); initFileUpload("entrepreneur_profile_creation", "account.picture"); + let detailsSearcher = document.getElementById("detail-entrepreneur"); + detailsSearcher.addEventListener("populate", event => { + var contributorProfileLinks = document.getElementsByTagName('cs-display-entrepreneur-link'); + for (let profileLink of contributorProfileLinks) { + let links = profileLink.getElementsByTagName('sib-link'); + for (let link of links) { + link.addEventListener('click', function() { + let entrepreneur_resource_detail = document.getElementById( + "entrepreneur-resource-detail" + ); + entrepreneur_resource_detail.removeAttribute('open'); + }); + }; + }; + }); + + let detailsPublic = document.getElementById("detail-public"); + detailsPublic.addEventListener("populate", event => { + var userProfileLinks = document.getElementsByTagName('cs-display-user-link'); + for (let profileLink of userProfileLinks) { + let links = profileLink.getElementsByTagName('sib-link'); + for (let link of links) { + link.addEventListener('click', function() { + let public_resource_detail = document.getElementById( + "public-resource-detail" + ); + public_resource_detail.removeAttribute('open'); + }); + }; + }; + }); + //Correct the native default of pagination refreshPagination(); }, 3000); diff --git a/src/styles/index.scss b/src/styles/index.scss index 301dea472888f35c633bba24a8d16319a9ad26e7..c24a98edd812f44bcee2e004e2f7366bc75d9fd9 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -2025,36 +2025,54 @@ XXXXXXXXXXXXXXXXXXXXXXXX SPECIFICITES XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ #mentor-database container .step cs-steps-header p, -#entrepreneur-resource-list container .step cs-steps-header p{ +#entrepreneur-resource-list container .step cs-steps-header p, +#public-resource-list container .step cs-steps-header p{ margin-bottom: 0; } -.accordion cs-steps-header[label="Étape 1"]>div, -#entrepreneur-resource-list .accordion cs-steps-header[label="Étape 1 "]>div{ +.accordion cs-steps-header[label="Étape 1"]>div, .accordion cs-steps-header[label="Step 1"]>div +#entrepreneur-resource-list .accordion cs-steps-header[label="Étape 1 "]>div, +#entrepreneur-resource-list .accordion cs-steps-header[label="Step 1"]>div, +#public-resource-list .accordion cs-steps-header[label="Étape 1 "]>div, +#public-resource-list .accordion cs-steps-header[label="Step 1"]>div { margin: 2rem 0; } - .accordion.active cs-steps-header[label="Étape 1"]>div, -#entrepreneur-resource-list .accordion.active cs-steps-header[label="Étape 1 "]>div{ +.accordion.active cs-steps-header[label="Étape 1"]>div, +.accordion.active cs-steps-header[label="Step 1"]>div, +#entrepreneur-resource-list .accordion.active cs-steps-header[label="Étape 1"]>div, +#entrepreneur-resource-list .accordion.active cs-steps-header[label="Step 1"]>div, +#public-resource-list .accordion cs-steps-header[label="Étape 1 "]>div, +#public-resource-list .accordion cs-steps-header[label="Step 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 .keyword_submit.button__actions .button_base.ico_gauche, -#entrepreneur-resource-list .keyword_submit.button__actions .button_base.ico_gauche{ +#entrepreneur-resource-list .keyword_submit.button__actions .button_base.ico_gauche, +#public-resource-list .keyword_submit.button__actions .button_base.ico_gauche { text-align: center; padding: .8rem 1.9rem .8rem 1.9rem; } #mentor-resource-detail h2.title_form, #mentor-database-resource-detail h2.title_form{ font-weight: bold; } -#entrepreneur-resource-list container .step div sib-display >div, #public-resource-list container .step div sib-display >div, #mentor-database container .step div sib-display >div{ +#entrepreneur-resource-list container .step div sib-display >div, +#public-resource-list container .step div sib-display >div, +#mentor-database container .step div sib-display >div{ margin-top: 2rem; } -#mentor-account .block_list.flex, #entrepreneur-account .block_list.flex, #mentor-account-view .block_list.flex, -#entrepreneur-account-view .block_list.flex, #user-account-view .block_list.flex{ +#mentor-database container.block_list .block_log, +#public-resource-list container.block_list .block_log, +#entrepreneur-resource-list container.block_list .block_log { + box-shadow: none; +} +#mentor-account .block_list.flex, #entrepreneur-account .block_list.flex, #mentor-account-view .block_list.flex, +#entrepreneur-account-view .block_list.flex, #user-account-view .block_list.flex, #mentor-resource-create .block_log, +#mentor-resource-edit .block_log { margin-bottom: 19rem; } + +#mentor-resource-create .block_creat_count, #mentor-resource-edit .block_creat_count { + overflow: initial; +} + #entrepreneur-request-create sib-set-default[name="complementary_information"] cs-section_header[name="header_complementary"] h2{ margin-top:3rem; } diff --git a/translation/en.yml b/translation/en.yml index 117c224f35f6e197fc92312ad66622c99031b64c..607d962bf19ce2cfb99986d449ee04de599d0772 100644 --- a/translation/en.yml +++ b/translation/en.yml @@ -57,8 +57,8 @@ ModificationsProperlySaved: Your modifications have properly been saved. CompleteContributorAccount : Complete your contributor account CompleteSearcherAccount : Complete your searcher account CompleteYourAccount : COMPLETE YOUR ACCOUNT -RequestRessource : Request a ressource -RequestRessourceInfo : 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 contributors so they know how to help you. +RequestResource : Request a resource +RequestResourceInfo : 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 contributors so they know how to help you. TitleRequired : Title* Description : Description FieldRequired: Field* @@ -69,7 +69,7 @@ ComplementaryInformation : Complementary information WithThisResourceBeAbleTo : With this resource, you will be able to WatchThePresentation : Watch the presentation SearchForResource : Search for a resource -CantFindRessourceYouNeed : Can't find the ressource you need ? +CantFindResourceYouNeed : Can't find the resource you need ? MakeRequest: Make a request Thanks : Thanks! ConfirmSendBrokenLink : The submitter of the resource will be advised that this link is broken. diff --git a/translation/fr.yml b/translation/fr.yml index bc80771aadef27d9ebf876a0c3489a2d393a8a86..1824f414c5c5a72bfa38b2078879306241f262a7 100644 --- a/translation/fr.yml +++ b/translation/fr.yml @@ -57,8 +57,8 @@ ModificationsProperlySaved: Vos modifications ont bien été enregistrées. CompleteContributorAccount : Compléter votre compte contributeur CompleteSearcherAccount : Compléter votre compte chercheur CompleteYourAccount : Compléter votre compte -RequestRessource : Demander une ressource -RequestRessourceInfo : Vous ne trouvez pas la ressource que vous recherchez ? Vous avez besoin de ressources pour acquérir certaines compétences ou progresser dans votre développement coopératif ? Il peut s'agir d'un livre, d'un modèle de document, d'un tutoriel, de tout ce dont vous avez besoin, faites une demande à nos contributeurs pour qu'ils sachent comment vous aider. +RequestResource : Demander une ressource +RequestResourceInfo : Vous ne trouvez pas la ressource que vous recherchez ? Vous avez besoin de ressources pour acquérir certaines compétences ou progresser dans votre développement coopératif ? Il peut s'agir d'un livre, d'un modèle de document, d'un tutoriel, de tout ce dont vous avez besoin, faites une demande à nos contributeurs pour qu'ils sachent comment vous aider. TitleRequired : Titre* Description : Description FieldRequired: Domaine* @@ -69,7 +69,7 @@ ComplementaryInformation : Informations complémentaires WithThisResourceBeAbleTo : Grâce à cette ressource, vous serez en mesure de WatchThePresentation : Regarder la présentation SearchForResource : Chercher une resource -CantFindRessourceYouNeed : Vous ne trouvez pas la resource dont vous avez besoin ? +CantFindResourceYouNeed : Vous ne trouvez pas la resource dont vous avez besoin ? MakeRequest: Faire une requête Thanks : Merci! ConfirmSendBrokenLink : La personne qui a soumit cette ressource sera avertie que le lien est brisé.