diff --git a/.gitignore b/.gitignore index 9409f83e304dba6e1a32fba9c5b65f60e2a9c4e0..9723de5999060c7615e01bfb2f84999ac09d34c3 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ /dist/oidc-client-config.json *.iml /www/* +!/www/.htaccess !/www/index.html package-lock.json diff --git a/README.md b/README.md index 44a215314fa82ca07d7666bd9b7e5ea0bd6a6195..d96663b2d17cb6b9402723c5222ea05f1d858c64 100644 --- a/README.md +++ b/README.md @@ -29,3 +29,10 @@ Disclaimer: PUG could need to be installed globally as root `sudo npm i -g pug` 11. If you have no CSS when loading the project local URL, edit and save the `src/styles/index.scss` file with any kind of modifications to force the compilation. You should now be able to access the application using your preferred browser on `http://localhost:9000/` + +## Funding + + + +This software has been co-funded by the European Union. +The contents of this software are the sole responsibility of Cooperatives Europe and can in no way be taken to reflect the views of the European Union. diff --git a/documentation/EU_logos.png b/documentation/EU_logos.png new file mode 100644 index 0000000000000000000000000000000000000000..b4c55ee75d059d4d6bb213f29d32d7b218ccf9af Binary files /dev/null and b/documentation/EU_logos.png differ diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index c14c33f221127d8b3cc908c2566aadd4ae47a621..47c41dd0ce693aae2594bf1d9fa99ba0c9e84551 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -13,9 +13,9 @@ sib-widget(name='cs-display-property') sib-widget(name='cs-steps-resources-multiple') template div.resource_resume_header - p ${value.name} - p ${value.publication_year} - p ${value.description} + p ${await value.name} + p ${await value.publication_year} + p ${await value.description} sib-widget(name='cs-steps-header') template @@ -47,20 +47,20 @@ sib-widget(name='cs-display-checkbox') sib-widget(name='cs-display-related-property') template - p #[a(href="${value.name}")] ${value.name} + p #[a(href="${value.name}")] ${await value.name} sib-widget(name='cs-display-multiple-property') template - p #[b ${label}] ${value.name} + p #[b ${label}] ${await value.name} sib-widget(name='cs-display-step-property') template - p #[b ${label} ${value.order}:] ${value.name} + p #[b ${label} ${await value.order}:] ${await value.name} sib-widget(name='cs-resource-format-name') template div - p ${value.name} + p ${await value.name} sib-widget(name='cs-resource-reviewer') template @@ -164,3 +164,6 @@ sib-widget(name="cs-form-file-custom" ) sib-form-file(upload-url=`${sdn}upload/` name="preview_image") +sib-widget(name="iframe-video-resource" ) + template + div ${value} \ No newline at end of file diff --git a/src/includes/entrepreneur/profile/create.pug b/src/includes/entrepreneur/profile/create.pug index a3dd7eadb3b8ed83e54dd22731ecf98123a530fc..cdff639ba33f22c1d372dece2d465d154172026c 100644 --- a/src/includes/entrepreneur/profile/create.pug +++ b/src/includes/entrepreneur/profile/create.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - figure.logo img(src="../images/logo.png" alt="Coopstarter") @@ -12,16 +10,16 @@ h2.title_create=`${data.CompleteEntrepreneurAccount}` sib-form#entrepreneur_profile_creation.block_log.block_creat_count( bind-user - fields="last_name, first_name, entrepreneur_profile.organisation, account.picture, username" + fields="last_name, first_name, entrepreneurProfile.organisation, account.picture, username" - range-entrepreneur_profile.organisation=`${endpoints.organisations}` + range-entrepreneurProfile.organisation=`${endpoints.organisations}` label-first_name=`${data.Surname}` label-last_name=`${data.Name}` - label-entrepreneur_profile.organisation=`${data.Organisation}` + label-entrepreneurProfile.organisation=`${data.Organisation}` - class-entrepreneur_profile.organisation='form-label is-dark' - widget-entrepreneur_profile.organisation='sib-form-auto-completion' + class-entrepreneurProfile.organisation='form-label is-dark' + widget-entrepreneurProfile.organisation='sib-form-auto-completion' widget-username='sib-form-hidden' diff --git a/src/includes/entrepreneur/profile/detail.pug b/src/includes/entrepreneur/profile/detail.pug index eeea2edfd88d9d0e3c3e3c7bacaf1da1676c4408..3d5d831582ad35d1a048fd399f179e5d22168183 100644 --- a/src/includes/entrepreneur/profile/detail.pug +++ b/src/includes/entrepreneur/profile/detail.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - div.container_min h2.title_lead.fd_bleu=`${data.MyAccount}` @@ -25,11 +23,11 @@ div.block_list.flex sib-display#entrepreneur_info( bind-user - fields='account.picture, name, entrepreneur_profile.organisation.name, registered_on' + fields='account.picture, name, entrepreneurProfile.organisation.name, registeredOn' widget-name='cs-display-property' widget-account.picture='cs-profile-picture' - widget-entrepreneur_profile.organisation.name='cs-display-property' - widget-entrepreneur_profile.registered_on='cs-display-property' + widget-entrepreneurProfile.organisation.name='cs-display-property' + widget-entrepreneurProfile.registeredOn='cs-display-property' ) sib-display#entrepreneur_contact( diff --git a/src/includes/entrepreneur/profile/edit.pug b/src/includes/entrepreneur/profile/edit.pug index f3f90cb1256d0d746ad950c2da72b2b1ef6dda6c..922f7f099f07f4e24e056076ce0bef6af6ea37f5 100644 --- a/src/includes/entrepreneur/profile/edit.pug +++ b/src/includes/entrepreneur/profile/edit.pug @@ -1,25 +1,23 @@ -include ../../components/widgets - h2.title_create= data.EditYourAccount sib-form#entrepreneur_profile_edition.block_log.block_creat_count( bind-user - fields="info(last_name, first_name, username, email, entrepreneur_profile.organisation, account.picture)" - range-entrepreneur_profile.organisation=`${endpoints.organisations}` + fields="info(last_name, first_name, username, email, entrepreneurProfile.organisation, account.picture)" + range-entrepreneurProfile.organisation=`${endpoints.organisations}` label-first_name=`${data.Surname}` label-last_name=`${data.Name}` - label-entrepreneur_profile.organisation=`${data.Organisation}` + 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-entrepreneur_profile.phone='form-label is-dark input_big' + class-entrepreneurProfile.phone='form-label is-dark input_big' - class-entrepreneur_profile.organisation='form-label is-dark input_big' - widget-entrepreneur_profile.organisation='sib-form-auto-completion' + class-entrepreneurProfile.organisation='form-label is-dark input_big' + widget-entrepreneurProfile.organisation='sib-form-auto-completion' upload-url-account.picture=`${sdn}upload/` widget-account.picture='cs-form-file-custom' diff --git a/src/includes/entrepreneur/resources/detail.pug b/src/includes/entrepreneur/resources/detail.pug index 399d29fc5bdedcb50d3dace21641b3d606b78556..8c3a16fe4b19d61ba6ab42008569b3ca6a7f5ebd 100644 --- a/src/includes/entrepreneur/resources/detail.pug +++ b/src/includes/entrepreneur/resources/detail.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - .block_log.block_creat_count.no_shadow sib-link(class="backlink", next="entrepreneur-resource-list") .like @@ -14,8 +12,8 @@ include ../../components/widgets bind-resources, fields='name, steps, format.name, \ submitter_info(submitter.account.picture, submitter.name, \ - submitter.mentor_profile.organisation.name, skills, uri, broken),\ - content(preview_image, tags),\ + submitter.mentorProfile.organisation.name, skills, uri, broken),\ + content(preview_image, iframe_link, tags),\ description, review.reviewer.account.picture, review.reviewer.name,\ copyright, specifications(\ header_specifications, author, country.name, language.name,\ @@ -26,7 +24,7 @@ include ../../components/widgets class-steps="steps" widget-author='cs-display-resource-property', widget-country.name='cs-display-resource-property', - widget-submitter.mentor_profile.organisation.name='cs-display-resource-property' + widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter.name="autor_ressource" class-broken="broken" widget-format.name='cs-display-resource-property' @@ -45,6 +43,8 @@ include ../../components/widgets widget-review.reviewer.name='cs-resource-reviewer' class-review.reviewer.name="validator_ressource" widget-header_specifications='cs-section_header' + widget-iframe_link='iframe-video-resource' + label-broken=`${data.ReportBrokenLink}` label-sharing=`${data.Access}` @@ -68,7 +68,7 @@ include ../../components/widgets label-uri=`${data.LinkToResource}` name-uri='original-link' label-country.name=`${data.Country}` - label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-submitter.mentorProfile.organisation.name=`${data.Organisation}` label-author=`${data.Author}` label-submitter.name=`${data.ResourcePostedBy}` action-broken='resource-report-broken-link-entrepreneur' @@ -80,19 +80,19 @@ include ../../components/widgets //- <p class="backlink"><i class='far fa-thumbs-down'></i>3</p> //- </div> - sib-display( - bind-resources - fields="" - nested-field="likes" - counter-template="<p><i class='fas fa-thumbs-up'></i>${counter}</p>" - ) - - sib-display( - bind-resources - fields="" - nested-field="dislikes" - counter-template="<p><i class='fas fa-thumbs-down'></i>${counter}</p>" - ) + //- sib-display( + //- bind-resources + //- fields="" + //- nested-field="likes" + //- counter-template="<p><i class='fas fa-thumbs-up'></i>${counter}</p>" + //- ) + + //- sib-display( + //- bind-resources + //- fields="" + //- nested-field="dislikes" + //- counter-template="<p><i class='fas fa-thumbs-down'></i>${counter}</p>" + //- ) sib-display( bind-resources diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index f24fb4d1b5a2dc2e5a715fe4c9c8596fc1f3b25f..8e036f6ed6970205daaf7df6836b1900b9f54e13 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - sib-router sib-route( name='resource-report-broken-link-entrepreneur', use-id) diff --git a/src/includes/footer.pug b/src/includes/footer.pug index a23e27f7d82f1a11f1c05575652eaa5ee79dd4f5..c44d671144354581e0a440007073c6fef9bc4155 100644 --- a/src/includes/footer.pug +++ b/src/includes/footer.pug @@ -20,4 +20,4 @@ p Co-funded p by the p European Union - p.footer_warning.flex_item_center This software has been co-funded by the European Union. The contents of this softwrae are the sole responsibility of Cooperatives Europe and can in no way be taken to reflect the views of the European Union. \ No newline at end of file + p.footer_warning.flex_item_center This software has been co-funded by the European Union. The contents of this software are the sole responsibility of Cooperatives Europe and can in no way be taken to reflect the views of the European Union. \ No newline at end of file diff --git a/src/includes/head.pug b/src/includes/head.pug index 907cc5fc4ad7e7f01b96f182cc4888633a610f1e..2536f32032ead71c333d5ab3b88ea565350b6918 100644 --- a/src/includes/head.pug +++ b/src/includes/head.pug @@ -2,11 +2,19 @@ head title CoopStarter meta(charset="utf-8") script(src="https://unpkg.com/@webcomponents/webcomponentsjs@1.2.7/webcomponents-loader.js") - script(type="module" src="https://unpkg.com/@startinblox/core@0.8") - script(type="module" src="https://unpkg.com/@startinblox/router") - script(type="module" src="https://unpkg.com/@startinblox/oidc") - script(type="module" src="https://unpkg.com/@startinblox/component-conversation") + script(type="module" src="https://unpkg.com/@startinblox/core@0.9") + script(type="module" src="https://unpkg.com/@startinblox/router@0.7") + script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8") + script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.4") script(src="https://kit.fontawesome.com/48014d2af3.js") script(src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous") script(src="/scripts/coopstarter.js") link(rel="stylesheet" href="/styles/index.css") + script(data-default-context type="application/ld+json" ). + + { + "entrepreneurProfile": "http://happy-dev.fr/owl/#entrepreneur_profile", + "mentorProfile": "http://happy-dev.fr/owl/#mentor_profile", + "account": "http://happy-dev.fr/owl/#account" + } + diff --git a/src/includes/mentor/browseDatabase.pug b/src/includes/mentor/browseDatabase.pug index 231cf226620d452957daa017be73edadd073510e..aa33150f6449113781e5fe50647044248ca64069 100644 --- a/src/includes/mentor/browseDatabase.pug +++ b/src/includes/mentor/browseDatabase.pug @@ -1,6 +1,3 @@ -include ../components/widgets - - div.container_min h2.title_lead.fd_bleu=`${data.generalLabel}` button.button_dark.pull-right= `${data.WatchThePresentation}` diff --git a/src/includes/mentor/components/header.pug b/src/includes/mentor/components/header.pug index b9f62c266201792bc21d830aaaf3db320307be27..6159b93594c758cda68367aa4a5cd1352414cc09 100644 --- a/src/includes/mentor/components/header.pug +++ b/src/includes/mentor/components/header.pug @@ -17,7 +17,7 @@ naked ) .dropdownWrapper - sib-display#mentor-account-picture.dropdownLabel( + sib-display#user-account-picture.dropdownLabel( bind-user fields='account.picture', widget-account.picture='cs-account-picture' diff --git a/src/includes/mentor/profile/create.pug b/src/includes/mentor/profile/create.pug index 318cce1d3aefee711c86c602c6d85a2be743b9b1..10b390d878db5853a1b4fc5d1ffbe3e4a5b62a32 100644 --- a/src/includes/mentor/profile/create.pug +++ b/src/includes/mentor/profile/create.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - figure.logo img(src="../images/logo.png" alt="Coopstarter") @@ -12,16 +10,16 @@ h2.title_create= data.CompleteMentorAccount sib-form#mentor_profile_creation.block_log.block_creat_count( bind-user - fields="account_information(last_name, first_name, mentor_profile.organisation,\ - mentor_profile.phone, mentor_profile.languages, mentor_profile.fields),\ - about_you(header_about_you, account.picture, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\ - mentor_profile.biography, mentor_profile.skills),\ - social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter), username" + fields="account_information(last_name, first_name, mentorProfile.organisation,\ + 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-mentor_profile.fields=`${endpoints.fields}` - range-mentor_profile.organisation=`${endpoints.organisations}` - range-mentor_profile.languages=`${endpoints.languages}` - range-mentor_profile.country=`${endpoints.countries}` + range-mentorProfile.fields=`${endpoints.fields}` + range-mentorProfile.organisation=`${endpoints.organisations}` + range-mentorProfile.languages=`${endpoints.languages}` + range-mentorProfile.country=`${endpoints.countries}` label-header_about_you=`${data.AboutYou}` label-header_social_media=`${data.SocialMedias}` @@ -31,35 +29,35 @@ sib-form#mentor_profile_creation.block_log.block_creat_count( label-first_name=`${data.Surname}` label-last_name=`${data.Name}` - label-mentor_profile.organisation=`${data.Organisation}` - label-mentor_profile.phone=`${data.PhoneNumber}` - label-mentor_profile.languages=`${data.Language}` - label-mentor_profile.fields=`${data.Field}` + label-mentorProfile.organisation=`${data.Organisation}` + label-mentorProfile.phone=`${data.PhoneNumber}` + label-mentorProfile.languages=`${data.Language}` + label-mentorProfile.fields=`${data.Field}` label-account.picture=`${data.Photo}` - label-mentor_profile.headline=`${data.Headline}` - class-mentor_profile.headline="w_75" - label-mentor_profile.city=`${data.City}` - label-mentor_profile.country=`${data.Country}` - label-mentor_profile.biography=`${data.ActivitiesMore}` - label-mentor_profile.skills=`${data.SkillForEntrepreneur}` - label-mentor_profile.linkedin="Linkedin" - label-mentor_profile.twitter="Twitter" + label-mentorProfile.headline=`${data.Headline}` + class-mentorProfile.headline="w_75" + label-mentorProfile.city=`${data.City}` + label-mentorProfile.country=`${data.Country}` + label-mentorProfile.biography=`${data.ActivitiesMore}` + label-mentorProfile.skills=`${data.SkillForEntrepreneur}` + label-mentorProfile.linkedin="Linkedin" + label-mentorProfile.twitter="Twitter" - widget-mentor_profile.skills="sib-form-textarea" - widget-mentor_profile.biography="sib-form-textarea" + widget-mentorProfile.skills="sib-form-textarea" + widget-mentorProfile.biography="sib-form-textarea" widget-username="sib-form-hidden" - class-mentor_profile.organisation='form-label is-dark' - widget-mentor_profile.organisation='sib-form-auto-completion' - widget-mentor_profile.country='sib-form-auto-completion' + class-mentorProfile.organisation='form-label is-dark' + widget-mentorProfile.organisation='sib-form-auto-completion' + widget-mentorProfile.country='sib-form-auto-completion' - class-mentor_profile.languages='form-label is-dark' - multiple-mentor_profile.languages='sib-multiple-select' - widget-mentor_profile.languages='sib-form-auto-completion' + class-mentorProfile.languages='form-label is-dark' + multiple-mentorProfile.languages='sib-multiple-select' + widget-mentorProfile.languages='sib-form-auto-completion' - class-mentor_profile.fields='form-label is-dark' - multiple-mentor_profile.fields='sib-multiple-select' - widget-mentor_profile.fields='sib-form-auto-completion' + class-mentorProfile.fields='form-label is-dark' + multiple-mentorProfile.fields='sib-multiple-select' + widget-mentorProfile.fields='sib-form-auto-completion' upload-url-account.picture=`${sdn}upload/` widget-account.picture='cs-form-file-custom' diff --git a/src/includes/mentor/profile/detail.pug b/src/includes/mentor/profile/detail.pug index 147889288bef207a6ceb811c7a8563967ce809ed..f7b1c3006b68875b890f53e1f15dfaf3036db226 100644 --- a/src/includes/mentor/profile/detail.pug +++ b/src/includes/mentor/profile/detail.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - div.container_min h2.title_lead.fd_bleu=`${data.MyAccount}` @@ -29,13 +27,13 @@ div.block_list.flex sib-display#mentor_info( bind-user - fields='account.picture, name, mentor_profile.headline, mentor_profile.city, mentor_profile.country.name, registered_on' + 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-mentor_profile.headline='cs-display-property' - widget-mentor_profile.city='cs-display-property' - widget-mentor_profile.country.name='cs-display-property' - widget-mentor_profile.registered_on='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( @@ -47,26 +45,26 @@ div.block_list.flex sib-display#mentor_complementary( bind-user - fields='biography_label, mentor_profile.biography, skills_label, mentor_profile.skills' + 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-mentor_profile.skills='cs-display-property' - widget-mentor_profile.biography='cs-display-property' + widget-mentorProfile.skills='cs-display-property' + widget-mentorProfile.biography='cs-display-property' ) sib-display#mentor_contact( bind-user - fields='email, mentor_profile.phone, mentor_profile.linkedin, mentor_profile.twitter' + fields='email, mentorProfile.phone, mentorProfile.linkedin, mentorProfile.twitter' label-email=`${data.Email}` class-email="contact_profil" - label-mentor_profile.phone=`${data.PhoneNumber}` - class-mentor_profile.phone="contact_profil" + label-mentorProfile.phone=`${data.PhoneNumber}` + class-mentorProfile.phone="contact_profil" widget-email='cs-display-resource-property' - widget-mentor_profile.phone='cs-display-resource-property' - widget-mentor_profile.linkedin='cs-display-link' - widget-mentor_profile.twitter='cs-display-link' - label-mentor_profile.twitter='<i class="fab fa-twitter"></i>' - label-mentor_profile.linkedin='<i class="fab fa-linkedin-in"></i>' + 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/profile/edit.pug b/src/includes/mentor/profile/edit.pug index 71402553350b961983f41668d19d6120795467c8..80fee452f6e424d6e841165cc8e95dd04d3a1845 100644 --- a/src/includes/mentor/profile/edit.pug +++ b/src/includes/mentor/profile/edit.pug @@ -1,18 +1,16 @@ -include ../../components/widgets - h2.title_create= data.EditYourAccount sib-form#mentor_profile_edition.block_log.block_creat_count( bind-user - fields="account_information(last_name, first_name, mentor_profile.organisation,\ - mentor_profile.phone, mentor_profile.languages, mentor_profile.fields),\ - about_you(header_about_you, account.picture, mentor_profile.headline, mentor_profile.city, mentor_profile.country,\ - mentor_profile.biography, mentor_profile.skills, resources),\ - social_media(header_social_media, mentor_profile.linkedin, mentor_profile.twitter), username" + fields="account_information(last_name, first_name, mentorProfile.organisation,\ + mentorProfile.phone, mentorProfile.languages, mentorProfile.fields),\ + about_you(header_about_you, account.picture, mentorProfile.headline, mentorProfile.city, mentorProfile.country,\ + mentorProfile.biography, mentorProfile.skills, resources),\ + social_media(header_social_media, mentorProfile.linkedin, mentorProfile.twitter), username" - range-mentor_profile.fields=`${endpoints.fields}` - range-mentor_profile.organisation=`${endpoints.organisations}` - range-mentor_profile.languages=`${endpoints.languages}` + range-mentorProfile.fields=`${endpoints.fields}` + range-mentorProfile.organisation=`${endpoints.organisations}` + range-mentorProfile.languages=`${endpoints.languages}` label-header_about_you=`${data.AboutYou}` label-header_social_media=`${data.AboutYou}` @@ -22,35 +20,35 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( label-first_name=`${data.Surname}` label-last_name=`${data.Name}` - label-mentor_profile.organisation=`${data.Organisation}` - label-mentor_profile.phone=`${data.PhoneNumber}` - label-mentor_profile.languages=`${data.Language}` - label-mentor_profile.fields=`${data.Field}` + label-mentorProfile.organisation=`${data.Organisation}` + label-mentorProfile.phone=`${data.PhoneNumber}` + label-mentorProfile.languages=`${data.Language}` + label-mentorProfile.fields=`${data.Field}` label-account.picture=`${data.Photo}` - label-mentor_profile.headline=`${data.Headline}` - class-mentor_profile.headline="w_75" - label-mentor_profile.city=`${data.City}` - label-mentor_profile.country=`${data.Country}` - label-mentor_profile.biography=`${data.ActivitiesMore}` - label-mentor_profile.skills=`${data.SkillForEntrepreneur}` - label-mentor_profile.linkedin="Linkedin" - label-mentor_profile.twitter="Twitter" - - widget-mentor_profile.skills="sib-form-textarea" - widget-mentor_profile.biography="sib-form-textarea" + label-mentorProfile.headline=`${data.Headline}` + class-mentorProfile.headline="w_75" + label-mentorProfile.city=`${data.City}` + label-mentorProfile.country=`${data.Country}` + label-mentorProfile.biography=`${data.ActivitiesMore}` + label-mentorProfile.skills=`${data.SkillForEntrepreneur}` + label-mentorProfile.linkedin="Linkedin" + label-mentorProfile.twitter="Twitter" + + widget-mentorProfile.skills="sib-form-textarea" + widget-mentorProfile.biography="sib-form-textarea" widget-username="sib-form-hidden" widget-resources="hidden-widget" - class-mentor_profile.organisation='form-label is-dark' - widget-mentor_profile.organisation='sib-form-auto-completion' + class-mentorProfile.organisation='form-label is-dark' + widget-mentorProfile.organisation='sib-form-auto-completion' - class-mentor_profile.languages='form-label is-dark' - multiple-mentor_profile.languages='sib-multiple-select' - widget-mentor_profile.languages='sib-form-auto-completion' + class-mentorProfile.languages='form-label is-dark' + multiple-mentorProfile.languages='sib-multiple-select' + widget-mentorProfile.languages='sib-form-auto-completion' - class-mentor_profile.fields='form-label is-dark' - multiple-mentor_profile.fields='sib-multiple-select' - widget-mentor_profile.fields='sib-form-auto-completion' + class-mentorProfile.fields='form-label is-dark' + multiple-mentorProfile.fields='sib-multiple-select' + widget-mentorProfile.fields='sib-form-auto-completion' upload-url-account.picture=`${sdn}upload/` widget-account.picture='cs-form-file-custom' diff --git a/src/includes/mentor/resources/confirmation-status-change.pug b/src/includes/mentor/resources/confirmation-status-change.pug index 27d35a14b464bfb8a6f78eddc716b71a76c44f74..eccc4c4aac34eead678a03210900d50b58450f4d 100644 --- a/src/includes/mentor/resources/confirmation-status-change.pug +++ b/src/includes/mentor/resources/confirmation-status-change.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - .block_log.block_creat_count.no_shadow sib-link(class="backlink", next="mentor-resource-list") .like diff --git a/src/includes/mentor/resources/create.pug b/src/includes/mentor/resources/create.pug index ba098a3ca91e163e6d1daf21c1658b26b9cae38a..be06ba6e4ba40dae4753fd45f1e0918083ffefcb 100644 --- a/src/includes/mentor/resources/create.pug +++ b/src/includes/mentor/resources/create.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - h2.title_lead_avenir=`${data.PostResource}` p.p_entete=`${data.ThankYouEnrichingDatabase}` @@ -80,6 +78,8 @@ p.p_entete=`${data.ThankYouEnrichingDatabase}` upload-url-preview_image=`${sdn}upload/` widget-preview_image='cs-form-file-custom' class-preview_image='input_photo w_25' + widget-iframe_link='sib-form-textarea' + submit-button=`${data.SendForValidation}` next="resource-creation-confirmation" diff --git a/src/includes/mentor/resources/detail.pug b/src/includes/mentor/resources/detail.pug index b978db2a7d3c76e5dc72971c4cdc9693dff4283b..0f67c3264fd1b9527c135d6b9c865ba22777d195 100644 --- a/src/includes/mentor/resources/detail.pug +++ b/src/includes/mentor/resources/detail.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - .block_log.block_creat_count.no_shadow sib-link(class="backlink", next="mentor-resource-list") .like @@ -15,8 +13,8 @@ include ../../components/widgets bind-resources, fields='name, steps, format.name,\ submitter_info(submitter.account.picture, submitter.name, \ - submitter.mentor_profile.organisation.name, skills, uri, broken),\ - content(preview_image, tags),\ + submitter.mentorProfile.organisation.name, skills, uri, broken),\ + content(preview_image, iframe_link, tags),\ description, review.reviewer.account.picture, review.reviewer.name,\ copyright, specifications(\ header_specifications, author, country, language.name,\ @@ -27,7 +25,7 @@ include ../../components/widgets class-steps="steps" widget-author='cs-display-resource-property', widget-country='cs-display-resource-property', - widget-submitter.mentor_profile.organisation.name='cs-display-resource-property' + widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter.name="autor_ressource" class-broken="broken" widget-format.name='cs-display-resource-property' @@ -54,6 +52,7 @@ include ../../components/widgets label-publication_year=`${data.DatePublication}` label-header_specifications=`${data.ResourceSpecifications}` label-format.name='' + widget-iframe_link='iframe-video-resource' widget-steps='cs-display-step-property' label-steps='' @@ -69,7 +68,7 @@ include ../../components/widgets label-uri=`${data.LinkToResource}` name-uri='original-link' label-country=`${data.Country}` - label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-submitter.mentorProfile.organisation.name=`${data.Organisation}` label-author=`${data.Author}` label-submitter.name=`${data.ResourcePostedBy}` action-broken='resource-report-broken-link-mentor' @@ -81,19 +80,19 @@ include ../../components/widgets //- <p class="backlink"><i class='far fa-thumbs-down'></i>3</p> //- </div> - sib-display( - bind-resources - fields="" - nested-field="likes" - counter-template="<p><i class='fas fa-thumbs-up'></i>${counter}</p>" - ) - - sib-display( - bind-resources - fields="" - nested-field="dislikes" - counter-template="<p><i class='fas fa-thumbs-down'></i>${counter}</p>" - ) + //- sib-display( + //- bind-resources + //- fields="" + //- nested-field="likes" + //- counter-template="<p><i class='fas fa-thumbs-up'></i>${counter}</p>" + //- ) + + //- sib-display( + //- bind-resources + //- fields="" + //- nested-field="dislikes" + //- counter-template="<p><i class='fas fa-thumbs-down'></i>${counter}</p>" + //- ) sib-display( bind-resources diff --git a/src/includes/mentor/resources/edit.pug b/src/includes/mentor/resources/edit.pug index 739e6cd3f58ecdc40681778415b8bc951663db2d..7937469aa14d85ba3fe9388c6ee8d938af51486a 100644 --- a/src/includes/mentor/resources/edit.pug +++ b/src/includes/mentor/resources/edit.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - h2.title_lead_avenir=`${data.EditResource}` p.p_entete=`${data.ThankYouEnrichingDatabase}` @@ -18,6 +16,7 @@ p.p_entete=`${data.ThankYouEnrichingDatabase}` widget-header_classification='cs-section_header' widget-header_access='cs-section_header' widget-header_related='cs-section_header' + widget-iframe_link='sib-form-textarea' range-type=`${endpoints.types}` range-format=`${endpoints.formats}` diff --git a/src/includes/mentor/resources/list.pug b/src/includes/mentor/resources/list.pug index 1129599be190b542628a7d25a43c7ab1e456171d..f3727fe10fef6b8d935ba84697a465a6c965791a 100644 --- a/src/includes/mentor/resources/list.pug +++ b/src/includes/mentor/resources/list.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - sib-router sib-route( name='confirm_suppress', use-id) sib-route( name='resource-report-broken-link-mentor', use-id) diff --git a/src/includes/mentor/resources/validate.pug b/src/includes/mentor/resources/validate.pug index ce160a326ddf13d9a8b7d41230bae9d9578d2707..294fedb71d899638655c94e7977a5eec11811e77 100644 --- a/src/includes/mentor/resources/validate.pug +++ b/src/includes/mentor/resources/validate.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - sib-router sib-route(name='improvement-dialog') sib-route(name='refusal-dialog') @@ -20,7 +18,7 @@ sib-router bind-resources, fields='name, steps, format.name,\ submitter_info(submitter.account.picture, submitter.name, \ - submitter.mentor_profile.organisation.name, skills, uri, broken),\ + submitter.mentorProfile.organisation.name, skills, uri, broken),\ content(preview_image, tags),\ description, copyright, specifications(\ header_specifications, author, country.name, language.name,\ @@ -31,7 +29,7 @@ sib-router class-steps="steps" widget-author='cs-display-resource-property', widget-country.name='cs-display-resource-property', - widget-submitter.mentor_profile.organisation.name='cs-display-resource-property' + widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter.name="autor_ressource" class-broken="broken" widget-format.name='cs-display-resource-property' @@ -70,7 +68,7 @@ sib-router label-uri=`${data.LinkToResource}` name-uri='original-link' label-country.name=`${data.Country}` - label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-submitter.mentorProfile.organisation.name=`${data.Organisation}` label-author=`${data.Author}` label-submitter.name=`${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 5d14346438f70026cac312394162edad5c7aa967..88a640f6d46761f9350842f045331e9a991ff6c4 100644 --- a/src/includes/public/resources/detail.pug +++ b/src/includes/public/resources/detail.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - .block_log.block_creat_count.no_shadow sib-link(class="backlink", next="public-resource-list") .like @@ -15,8 +13,8 @@ include ../../components/widgets bind-resources, fields='name, steps, format.name,\ submitter_info(submitter.account.picture, submitter.name, \ - submitter.mentor_profile.organisation.name, skills, uri, broken),\ - content(preview_image, tags),\ + submitter.mentorProfile.organisation.name, skills, uri, broken),\ + content(preview_image, iframe_link, tags),\ description, review.reviewer.account.picture, review.reviewer.name,\ copyright, specifications(\ header_specifications, author, country.name, language.name,\ @@ -27,7 +25,7 @@ include ../../components/widgets class-steps="steps" widget-author='cs-display-resource-property', widget-country.name='cs-display-resource-property', - widget-submitter.mentor_profile.organisation.name='cs-display-resource-property' + widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter.name="autor_ressource" class-broken="broken" widget-format.name='cs-display-resource-property' @@ -46,6 +44,7 @@ include ../../components/widgets widget-review.reviewer.name='cs-resource-reviewer' class-review.reviewer.name="validator_ressource" widget-header_specifications='cs-section_header' + widget-iframe_link='iframe-video-resource' label-broken=`${data.ReportBrokenLink}` label-sharing=`${data.Access}` @@ -69,7 +68,7 @@ include ../../components/widgets label-uri=`${data.LinkToResource}` name-uri='original-link' label-country=`${data.Country}` - label-submitter.mentor_profile.organisation.name=`${data.Organisation}` + label-submitter.mentorProfile.organisation.name=`${data.Organisation}` label-author=`${data.Author}` label-submitter.name=`${data.ResourcePostedBy}` action-broken='resource-report-broken-link-public' @@ -81,19 +80,19 @@ include ../../components/widgets //- <p class="backlink"><i class='far fa-thumbs-down'></i>3</p> //- </div> - sib-display( - bind-resources - fields="" - nested-field="likes" - counter-template="<p><i class='fas fa-thumbs-up'></i>${counter}</p>" - ) - - sib-display( - bind-resources - fields="" - nested-field="dislikes" - counter-template="<p><i class='fas fa-thumbs-down'></i>${counter}</p>" - ) + //- sib-display( + //- bind-resources + //- fields="" + //- nested-field="likes" + //- counter-template="<p><i class='fas fa-thumbs-up'></i>${counter}</p>" + //- ) + + //- sib-display( + //- bind-resources + //- fields="" + //- nested-field="dislikes" + //- counter-template="<p><i class='fas fa-thumbs-down'></i>${counter}</p>" + //- ) sib-display( bind-resources diff --git a/src/includes/public/resources/list.pug b/src/includes/public/resources/list.pug index d0d8e49c1f33864e2e38d4f38f29a359fca2719f..f69ae98d16832a26e05b051b30380873f2d3e741 100644 --- a/src/includes/public/resources/list.pug +++ b/src/includes/public/resources/list.pug @@ -1,5 +1,3 @@ -include ../../components/widgets - sib-router sib-route( name='resource-report-broken-link-public', use-id) diff --git a/src/index.pug b/src/index.pug index fa56f8928be8bb64bb5beac88a61823f4c6316ff..bf405d0df1300b9621d4364bb6e66802bdd7783e 100644 --- a/src/index.pug +++ b/src/index.pug @@ -9,6 +9,8 @@ html sib-route(name='entrepreneur-dashboard') sib-route(name='public-dashboard') + include includes/components/widgets.pug + body #mentor-dashboard(hidden).no-sidebar include includes/mentor/dashboard.pug diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 599e36fff089f4013c5373d08e6402e04316b11b..56f1a24335b97735dadec8f9b62d5b06cf12fe07 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -374,6 +374,22 @@ function initFileUpload(){ } } +/** + * Manage the like sender hidden form + * @param {*} event + * @param {*} userWhoSubmitLike + * @param {*} formSenderLike + */ +function fillSenderLike(userWhoSubmitLike, formSenderLike, currentResource) { + formSenderLike.querySelector( + "input[name='sender']" + ).value = JSON.stringify({ "@id": userWhoSubmitLike }); + formSenderLike.querySelector( + "input[name='receiver_object_id']" + ).value = JSON.stringify({ "@id": currentResource }); + receiver_object_id +} + /** * For entrepreneur dashboard only : * As we cannot have multiple imbricated filtering with the native sib-display, we manage it manually. @@ -402,11 +418,6 @@ function addProperFilterToSearchComponents(targetId) { `input[name="name_keyword"]` ); - let keyword_submit = baseElement.querySelectorAll(" .keyword_submit")[0]; - let keyword_hidden_fields = baseElement.querySelectorAll( - 'hidden-widget[name="search_for_a_resource"] input' - ); - if (keyword_field) { let keyword_submit = baseElement.querySelectorAll(" .keyword_submit")[0]; let keyword_hidden_fields = baseElement.querySelectorAll( @@ -576,6 +587,8 @@ jQuery(document).ready(function($) { linkDatasetToField(userAccountDataSrc, "improvement-dialog-form", "reviewer"); linkDatasetToField(userAccountDataSrc, "refusal-dialog-form", "reviewer"); linkDatasetToField(userAccountDataSrc, "change_status_request", "reviewer"); + // linkDatasetToField(userAccountDataSrc, "add-like", "sender"); + // linkDatasetToField(userAccountDataSrc, "add-dislike", "sender"); //On form submission, we sometime have to refresh a list. refreshList("resource-creation-form", "resources-history"); @@ -634,6 +647,34 @@ jQuery(document).ready(function($) { var userWhoSubmitReport = userAccountDataSrc.dataset.src var formBrokenLink = document.getElementById("report-broken-link-mentor"); fillReportBrokenLinkForm(event, userWhoSubmitReport, formBrokenLink); + + // Fill the hidden like-form + document.querySelector('sib-auth').getUser().then(data=> { + let targetFormLike = document.getElementById('add-like'); + targetFormLike.addEventListener("populate", event => { + let resourceField = targetFormLike.querySelector(`input[name="sender"]`); + if (resourceField) { + resourceField.value = JSON.stringify(data); + resourceField.setAttribute( + "value", + JSON.stringify(data) + ); + } + }); + let targetFormDislike = document.getElementById('add-dislike'); + targetFormDislike.addEventListener("populate", event => { + let resourceField = targetFormDislike.querySelector(`input[name="sender"]`); + if (resourceField) { + resourceField.value = JSON.stringify(data); + resourceField.setAttribute( + "value", + JSON.stringify(data) + ); + } + }); + + }) + }); //Init the form file behaviour diff --git a/src/styles/index.scss b/src/styles/index.scss index 024bf5758a29baa4d20cf734a01a11762b970620..4cb69b477deaddfcb545f022d853a4d7c042624d 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -768,8 +768,9 @@ footer#footer{ background:var(--bg-block); height: auto; box-shadow: 0 2px 10px 0 rgba(0,0,0,0.14); - position: relative; padding-top: 2rem; + bottom: 0; + width: 100%; } .logo_footer{ width: 22rem; diff --git a/translation/fr.yml b/translation/fr.yml index 2e78a58824c607095befcfda17ce11a0d7f109e8..183c08995e3094d760176529fc457ef66072eed8 100644 --- a/translation/fr.yml +++ b/translation/fr.yml @@ -9,7 +9,7 @@ welcome : Bienvenue dans notre répertoire international de ressources pour les generalLabel : Index international de ressources pour les mentors et les entrepreneurs coopératifs PostResource: Poster une nouvelle ressource BrowseDatabase: Rechercher dans la base de donnée -ResourcesRequestingValidation: Ressources demandant une validation +ResourcesRequestingValidation: Ressources à valider RequestedResources: Ressources demandées HistoryResources : Historique de vos ressources ConnectKnowledgeBase : Connexion à la base de connaissances diff --git a/www/.htaccess b/www/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..7894ed6ad8d725c03e06892c76e6f0a0c8964c57 --- /dev/null +++ b/www/.htaccess @@ -0,0 +1,5 @@ +<IfModule mod_rewrite.c> + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^([a-z]{2})/.*$ "$1/index.html" [L] +</IfModule>