diff --git a/src/includes/components/widgets.pug b/src/includes/components/widgets.pug index b8de6880ae50035538ff0cde33e4dcdcd9f109c9..7a6dc60171780f166afb938d47a4b3bff75a8f33 100644 --- a/src/includes/components/widgets.pug +++ b/src/includes/components/widgets.pug @@ -41,7 +41,7 @@ sib-widget(name='cs-display-title') sib-widget(name='cs-display-checkbox') template - label Search in Coopstarter database only + label(for="instance_database_only") Search in Coopstarter database only input(type='checkbox') sib-widget(name='cs-display-related-property') @@ -118,12 +118,15 @@ sib-widget(name='cs-section_introduction') sib-widget(name='cs-account-picture') template figure.avatar - img(name="${name}", src="\${value || '/images/alien.jpg'}", alt="Coopstarter") + img(name="${name}", src="\${value || '/images/alien.jpg'}", alt="Profile picture") sib-widget(name='cs-profile-picture') template - img(name="${name}", src="\${value || '/images/alien.jpg'}", alt="Coopstarter") + img(name="${name}", src="\${value || '/images/alien.jpg'}", alt="Profile picture") +sib-widget(name='cs-preview-picture') + template + img(name="${name}", src="\${value || '/images/alien.jpg'}", alt="Preview of the resource") sib-widget(name="hidden-widget") template @@ -133,4 +136,16 @@ sib-widget(name="fake-tabs") template h2.fake-tabs ${value} - \ No newline at end of file +sib-widget(name="fake-like") + template + p 99 <i class="fas fa-thumbs-up"></i> + +sib-widget(name="fake-dislike") + template + p 18 <i class="fas fa-thumbs-up"></i> + +sib-widget(name="accordion-request-resource" ) + template + div + h2 ${value} + diff --git a/src/includes/entrepreneur/dashboard.pug b/src/includes/entrepreneur/dashboard.pug index 106a3a9963c677f1abb6f98ab305e1894a2420ab..16075cd248e755a5eaed4dddba917d3c1c78640c 100644 --- a/src/includes/entrepreneur/dashboard.pug +++ b/src/includes/entrepreneur/dashboard.pug @@ -22,6 +22,7 @@ section#home sib-router sib-route(name='entrepreneur-request-create') sib-route(name='entrepreneur-request-validation') + sib-route(name='entrepreneur-resource-detail') dialog#entrepreneur-request-create.no-sidebar.container include ./requests/create.pug @@ -31,6 +32,9 @@ section#home p.flex sib-link(next='entrepreneur-resource-list', class='button_base') Ok + dialog#entrepreneur-resource-detail.no-sidebar + include resources/detail.pug + #entrepreneur-account(hidden).no-sidebar.container include profile/detail.pug diff --git a/src/includes/entrepreneur/requests/create.pug b/src/includes/entrepreneur/requests/create.pug index 36925b483395bb5ab8b99c4ec53f16ff6b6d9a34..fcbce15e621f73864fa57fa7cb97d141e292f870 100644 --- a/src/includes/entrepreneur/requests/create.pug +++ b/src/includes/entrepreneur/requests/create.pug @@ -6,13 +6,13 @@ p You can't find a resource you are looking for ? You need resources to acquire sib-form#resource-creation-form( data-src=`${endpoints.requests}` fields="mandatory_information(header_mandatory, name, description, country, language),\ - complementary_information(header_complementary, field, organisation, skills)" + complementary_information(header_complementary, fields, organisation, skills)" widget-header_mandatory='cs-section_header' widget-header_complementary='cs-section_header' range-language=`${endpoints.languages}` - range-field=`${endpoints.fields}` + range-fields=`${endpoints.fields}` range-organisation=`${endpoints.organisations}` label-header_mandatory='Mandatory information' @@ -26,8 +26,8 @@ p You can't find a resource you are looking for ? You need resources to acquire label-organisation='Organisation' label-skills='What do you need to learn with this resource ?' - multiple-field='sib-multiple-select' - widget-field='sib-form-auto-completion' + multiple-fields='sib-multiple-select' + widget-fields='sib-form-auto-completion' multiple-language='sib-multiple-select' widget-language='sib-form-auto-completion' diff --git a/src/includes/entrepreneur/resources/detail.pug b/src/includes/entrepreneur/resources/detail.pug index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f335a39274f25e8c5660f0096a50409b484f01cd 100644 --- a/src/includes/entrepreneur/resources/detail.pug +++ b/src/includes/entrepreneur/resources/detail.pug @@ -0,0 +1,125 @@ +include ../../components/widgets + +.block_log.block_creat_count.no_shadow + sib-link(class="backlink", next="entrepreneur-resource-list") + .like + p.backlink + i.fas.fa-times + + div#detail-entrepreneur-loader + hidden Loading resources, please wait... + + sib-display( + loader-id="detail-entrepreneur-loader" + bind-resources, + fields='name, steps, format, \ + submitter_info(submitter.account.picture, submitter.name, \ + submitter.mentor_profile.organisation.name, skills, uri, broken),\ + content(preview_image, tags),\ + description, review.reviewer.account.picture, review.reviewer.name,\ + copyright, specifications(\ + header_specifications, author, country, language.name,\ + publication_year, fields, sharing)', + + widget-submitter.name='cs-display-resource-property', + class-name="title_form" + 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' + class-submitter.name="autor_ressource" + class-broken="broken" + widget-format='cs-display-multiple-property' + widget-uri='cs-display-link' + class-uri="pull-left" + widget-skills='cs-display-resource-property' + widget-description='cs-display-property' + widget-name='cs-display-property' + widget-publication_year='cs-display-resource-property' + widget-sharing='cs-display-resource-property' + widget-language.name='cs-display-resource-property' + widget-submitter.account.picture='cs-account-picture' + 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-header_specifications='cs-section_header' + + label-broken='Report broken link' + label-sharing='Access:' + label-language.name='Language:' + label-publication_year='Year of publication:' + label-header_specifications='Resource specifications' + each-label-format='' + label-format='' + multiple-format + + widget-steps='cs-display-step-property' + label-steps='' + each-label-steps="Step" + multiple-steps + + widget-fields='cs-display-multiple-property' + label-fields='' + each-label-fields='Field:' + multiple-fields + + label-skills='With this resource, you will be able to:' + label-uri='Link to resource' + name-uri='original-link' + label-country='Country:' + label-submitter.mentor_profile.organisation.name='Organisation:' + label-author='Author :' + label-submitter.name='Resource posted by:' + action-broken='resource-report-broken-link' + ) + + //- Add likes here + <div class="like"> + <p class="backlink"><i class='far fa-thumbs-up'></i>18</p> + <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="conversations" + counter-template="<p>Comments (${counter})</p>" + ) + + sib-conversation( + bind-resources + id-suffix="conversations" + ) + + h2.title_lead_avenir Related resources + + sib-display( + bind-resources, + nested-field="related" + fields="name, detail" + + widget-name='cs-display-property' + label-detail='' + widget-detail='sib-action' + action-detail='mentor-resource-detail' + ) + + + + \ No newline at end of file diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index 484ccf810af16637cf7779bad6babaf4121384af..edd6cffe69e21db3c6f0e5a2b929a9ad5043531e 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -15,7 +15,7 @@ container.block_list.flex.flex_espace div h2.title_form Search for a resource div#resources-loader - hidden Loading resources, please wait... + hidden <i class="fas fa-cog fa-spin"></i> sib-form#search-by-keyword( data-src=`${endpoints.resources}`, @@ -42,7 +42,7 @@ container.block_list.flex.flex_espace naked ) - sib-form#more_criterias( + sib-form#more_criterias.flex.flex_espace( data-src=`${endpoints.resources}`, fields='header_criterias, format, publication_year, country, language, fields' label-header_criterias='More criterias' @@ -98,259 +98,289 @@ container.block_list.flex.flex_espace div.block_log.block_list //Step 1 - sib-display#circles-list( - loader-id="resources-loader" - data-src=`${endpoints.steps}1/`, - fields='name' - - label-name ='Step 1 ' - label-resources='' + div.step + sib-display#circles-list( + loader-id="resources-loader" + data-src=`${endpoints.steps}1/`, + fields='name' + class="accordion" + + label-name ='Step 1 ' + label-resources='' + + widget-name='cs-steps-header' + ) - widget-name='cs-steps-header' - ) + sib-display.resource_by_step( + data-src=`${endpoints.steps}1/resources/`, + fields='name, format, publication_year, description, like, dislike', + search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', + search-range-format=`${endpoints.formats}` + search-range-language=`${endpoints.languages}` + search-range-fields=`${endpoints.fields}` + search-range-type=`${endpoints.types}` + + + search-widget-search_for_a_resource="hidden-widget" + search-widget-more_criterias_hidden="hidden-widget" + search-multiple-type='sib-form-dropdown' + search-widget-type='sib-form-auto-completion' + search-multiple-format='sib-form-dropdown' + search-widget-format='sib-form-auto-completion' + search-multiple-language='sib-form-dropdown' + search-widget-language='sib-form-auto-completion' + search-multiple-fields='sib-form-dropdown' + search-widget-fields='sib-form-auto-completion' + - sib-display.resource_by_step( - data-src=`${endpoints.steps}1/resources/`, - fields='name, author, format, publication_year, description, country, language, fields', - search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', - search-range-format=`${endpoints.formats}` - search-range-language=`${endpoints.languages}` - search-range-fields=`${endpoints.fields}` - search-range-type=`${endpoints.types}` - - - search-widget-search_for_a_resource="hidden-widget" - search-widget-more_criterias_hidden="hidden-widget" - search-multiple-type='sib-form-dropdown' - search-widget-type='sib-form-auto-completion' - search-multiple-format='sib-form-dropdown' - search-widget-format='sib-form-auto-completion' - search-multiple-language='sib-form-dropdown' - search-widget-language='sib-form-auto-completion' - search-multiple-fields='sib-form-dropdown' - search-widget-fields='sib-form-auto-completion' - - - widget-name='cs-display-property' - widget-country='cs-display-property' - widget-publication_year='cs-display-property' - widget-description='cs-display-property' - widget-fields='hidden-widget' - widget-language="hidden-widget" - widget-author="cs-display-property" - widget-format='cs-display-multiple-property' - label-format='' - multiple-format - label-language='' - multiple-language - label-fields='' - multiple-fields - - paginate-by="5" - ) - + widget-name='cs-display-property' + widget-country='cs-display-property' + widget-publication_year='cs-display-property' + widget-description='cs-display-property' + widget-fields='hidden-widget' + widget-language="hidden-widget" + widget-author="hidden-widget" + widget-format='cs-display-multiple-property' + widget-like='fake-like' + widget-dislike='fake-dislike' + label-format='' + multiple-format + label-language='' + multiple-language + label-fields='' + multiple-fields + class="panel" + next='entrepreneur-resource-detail' + + paginate-by="5" + ) + //Step 2 - sib-display#circles-list( - data-src=`${endpoints.steps}2/`, - fields='name' - - label-name ='Step 2 ' - label-resources='' - - widget-name='cs-steps-header' - ) - - sib-display.resource_by_step( - data-src=`${endpoints.steps}2/resources/`, - fields='name, author, format, publication_year, description, country, language, fields', - search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', - search-range-format=`${endpoints.formats}` - search-range-language=`${endpoints.languages}` - search-range-fields=`${endpoints.fields}` - search-range-type=`${endpoints.types}` - - - search-widget-search_for_a_resource="hidden-widget" - search-widget-more_criterias_hidden="hidden-widget" - search-multiple-type='sib-form-dropdown' - search-widget-type='sib-form-auto-completion' - search-multiple-format='sib-form-dropdown' - search-widget-format='sib-form-auto-completion' - search-multiple-language='sib-form-dropdown' - search-widget-language='sib-form-auto-completion' - search-multiple-fields='sib-form-dropdown' - search-widget-fields='sib-form-auto-completion' - - - widget-name='cs-display-property' - widget-country='cs-display-property' - widget-publication_year='cs-display-property' - widget-description='cs-display-property' - widget-fields='hidden-widget' - widget-language="hidden-widget" - widget-author="cs-display-property" - widget-format='cs-display-multiple-property' - label-format='' - multiple-format - label-language='' - multiple-language - label-fields='' - multiple-fields - - paginate-by="5" - ) + div.step + sib-display#circles-list( + data-src=`${endpoints.steps}2/`, + fields='name' + class="accordion" + + label-name ='Step 2 ' + label-resources='' + + widget-name='cs-steps-header' + ) + + sib-display.resource_by_step( + data-src=`${endpoints.steps}2/resources/`, + fields='name, format, publication_year, description, like, dislike', + search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', + search-range-format=`${endpoints.formats}` + search-range-language=`${endpoints.languages}` + search-range-fields=`${endpoints.fields}` + search-range-type=`${endpoints.types}` + + + search-widget-search_for_a_resource="hidden-widget" + search-widget-more_criterias_hidden="hidden-widget" + search-multiple-type='sib-form-dropdown' + search-widget-type='sib-form-auto-completion' + search-multiple-format='sib-form-dropdown' + search-widget-format='sib-form-auto-completion' + search-multiple-language='sib-form-dropdown' + search-widget-language='sib-form-auto-completion' + search-multiple-fields='sib-form-dropdown' + search-widget-fields='sib-form-auto-completion' + + + widget-name='cs-display-property' + widget-country='cs-display-property' + widget-publication_year='cs-display-property' + widget-description='cs-display-property' + widget-fields='hidden-widget' + widget-language="hidden-widget" + widget-author="hidden-widget" + widget-format='cs-display-multiple-property' + widget-like='fake-like' + widget-dislike='fake-dislike' + label-format='' + multiple-format + label-language='' + multiple-language + label-fields='' + multiple-fields + class="panel" + next='entrepreneur-resource-detail' + + paginate-by="5" + ) //Step 3 - sib-display#circles-list( - data-src=`${endpoints.steps}3/`, - fields='name' - - label-name ='Step 3 ' - label-resources='' - - widget-name='cs-steps-header' - - ) - - sib-display.resource_by_step( - data-src=`${endpoints.steps}3/resources/`, - fields='name, author, format, publication_year, description, country, language, fields', - search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', - search-range-format=`${endpoints.formats}` - search-range-language=`${endpoints.languages}` - search-range-fields=`${endpoints.fields}` - search-range-type=`${endpoints.types}` - - - search-widget-search_for_a_resource="hidden-widget" - search-widget-more_criterias_hidden="hidden-widget" - search-multiple-type='sib-form-dropdown' - search-widget-type='sib-form-auto-completion' - search-multiple-format='sib-form-dropdown' - search-widget-format='sib-form-auto-completion' - search-multiple-language='sib-form-dropdown' - search-widget-language='sib-form-auto-completion' - search-multiple-fields='sib-form-dropdown' - search-widget-fields='sib-form-auto-completion' - - widget-name='cs-display-property' - widget-country='cs-display-property' - widget-publication_year='cs-display-property' - widget-description='cs-display-property' - widget-fields='hidden-widget' - widget-language="hidden-widget" - widget-author="cs-display-property" - widget-format='cs-display-multiple-property' - label-format='' - multiple-format - label-language='' - multiple-language - label-fields='' - multiple-fields - - paginate-by="5" - ) + div.step + sib-display#circles-list( + data-src=`${endpoints.steps}3/`, + fields='name' + class="accordion" + + label-name ='Step 3 ' + label-resources='' + + widget-name='cs-steps-header' + + ) + + sib-display.resource_by_step( + data-src=`${endpoints.steps}3/resources/`, + fields='name, format, publication_year, description, like, dislike', + search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', + search-range-format=`${endpoints.formats}` + search-range-language=`${endpoints.languages}` + search-range-fields=`${endpoints.fields}` + search-range-type=`${endpoints.types}` + + + search-widget-search_for_a_resource="hidden-widget" + search-widget-more_criterias_hidden="hidden-widget" + search-multiple-type='sib-form-dropdown' + search-widget-type='sib-form-auto-completion' + search-multiple-format='sib-form-dropdown' + search-widget-format='sib-form-auto-completion' + search-multiple-language='sib-form-dropdown' + search-widget-language='sib-form-auto-completion' + search-multiple-fields='sib-form-dropdown' + search-widget-fields='sib-form-auto-completion' + + widget-name='cs-display-property' + widget-country='cs-display-property' + widget-publication_year='cs-display-property' + widget-description='cs-display-property' + widget-fields='hidden-widget' + widget-language="hidden-widget" + widget-author="hidden-widget" + widget-format='cs-display-multiple-property' + widget-like='fake-like' + widget-dislike='fake-dislike' + label-format='' + multiple-format + label-language='' + multiple-language + label-fields='' + multiple-fields + class="panel" + next='entrepreneur-resource-detail' + + paginate-by="5" + ) //Step 4 - sib-display#circles-list( - data-src=`${endpoints.steps}4/`, - fields='name' - - label-name ='Step 4 ' - label-resources='' - - widget-name='cs-steps-header' - - ) - - sib-display.resource_by_step( - data-src=`${endpoints.steps}4/resources/`, - fields='name, author, format, publication_year, description, country, language, fields', - search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', - search-range-format=`${endpoints.formats}` - search-range-language=`${endpoints.languages}` - search-range-fields=`${endpoints.fields}` - search-range-type=`${endpoints.types}` - - - search-widget-search_for_a_resource="hidden-widget" - search-widget-more_criterias_hidden="hidden-widget" - search-multiple-type='sib-form-dropdown' - search-widget-type='sib-form-auto-completion' - search-multiple-format='sib-form-dropdown' - search-widget-format='sib-form-auto-completion' - search-multiple-language='sib-form-dropdown' - search-widget-language='sib-form-auto-completion' - search-multiple-fields='sib-form-dropdown' - search-widget-fields='sib-form-auto-completion' - - - widget-name='cs-display-property' - widget-country='cs-display-property' - widget-publication_year='cs-display-property' - widget-description='cs-display-property' - widget-fields='hidden-widget' - widget-language="hidden-widget" - widget-author="cs-display-property" - widget-format='cs-display-multiple-property' - label-format='' - multiple-format - label-language='' - multiple-language - label-fields='' - multiple-fields - - paginate-by="5" - ) + div.step + sib-display#circles-list( + data-src=`${endpoints.steps}4/`, + fields='name' + class="accordion" + + label-name ='Step 4 ' + label-resources='' + + widget-name='cs-steps-header' + + ) + + sib-display.resource_by_step( + data-src=`${endpoints.steps}4/resources/`, + fields='name, format, publication_year, description, like, dislike', + search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', + search-range-format=`${endpoints.formats}` + search-range-language=`${endpoints.languages}` + search-range-fields=`${endpoints.fields}` + search-range-type=`${endpoints.types}` + + + search-widget-search_for_a_resource="hidden-widget" + search-widget-more_criterias_hidden="hidden-widget" + search-multiple-type='sib-form-dropdown' + search-widget-type='sib-form-auto-completion' + search-multiple-format='sib-form-dropdown' + search-widget-format='sib-form-auto-completion' + search-multiple-language='sib-form-dropdown' + search-widget-language='sib-form-auto-completion' + search-multiple-fields='sib-form-dropdown' + search-widget-fields='sib-form-auto-completion' + + + widget-name='cs-display-property' + widget-country='cs-display-property' + widget-publication_year='cs-display-property' + widget-description='cs-display-property' + widget-fields='hidden-widget' + widget-language="hidden-widget" + widget-author="hidden-widget" + widget-format='cs-display-multiple-property' + widget-like='fake-like' + widget-dislike='fake-dislike' + label-format='' + multiple-format + label-language='' + multiple-language + label-fields='' + multiple-fields + class="panel" + next='entrepreneur-resource-detail' + + paginate-by="5" + ) //Step 5 - sib-display#circles-list( - data-src=`${endpoints.steps}5/`, - fields='name' - - label-name ='Step 5 ' - label-resources='' - - widget-name='cs-steps-header' - ) - - sib-display.resource_by_step( - data-src=`${endpoints.steps}5/resources/`, - fields='name, author, format, publication_year, description, country, language, fields', - search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', - search-range-format=`${endpoints.formats}` - search-range-language=`${endpoints.languages}` - search-range-fields=`${endpoints.fields}` - search-range-type=`${endpoints.types}` - - - search-widget-search_for_a_resource="hidden-widget" - search-widget-more_criterias_hidden="hidden-widget" - search-multiple-type='sib-form-dropdown' - search-widget-type='sib-form-auto-completion' - search-multiple-format='sib-form-dropdown' - search-widget-format='sib-form-auto-completion' - search-multiple-language='sib-form-dropdown' - search-widget-language='sib-form-auto-completion' - search-multiple-fields='sib-form-dropdown' - search-widget-fields='sib-form-auto-completion' - - - widget-name='cs-display-property' - widget-country='cs-display-property' - widget-publication_year='cs-display-property' - widget-description='cs-display-property' - widget-fields='hidden-widget' - widget-language="hidden-widget" - widget-author="cs-display-property" - widget-format='cs-display-multiple-property' - label-format='' - multiple-format - label-language='' - multiple-language - label-fields='' - multiple-fields - - paginate-by="5" - ) + div.step + sib-display#circles-list( + data-src=`${endpoints.steps}5/`, + fields='name' + class="accordion" + + label-name ='Step 5 ' + label-resources='' + + widget-name='cs-steps-header' + ) + + sib-display.resource_by_step( + data-src=`${endpoints.steps}5/resources/`, + fields='name, format, publication_year, description, like, dislike', + search-fields='search_for_a_resource(name, description, author), more_criterias_hidden(format, publication_year, country, language, fields, type)', + search-range-format=`${endpoints.formats}` + search-range-language=`${endpoints.languages}` + search-range-fields=`${endpoints.fields}` + search-range-type=`${endpoints.types}` + + + search-widget-search_for_a_resource="hidden-widget" + search-widget-more_criterias_hidden="hidden-widget" + search-multiple-type='sib-form-dropdown' + search-widget-type='sib-form-auto-completion' + search-multiple-format='sib-form-dropdown' + search-widget-format='sib-form-auto-completion' + search-multiple-language='sib-form-dropdown' + search-widget-language='sib-form-auto-completion' + search-multiple-fields='sib-form-dropdown' + search-widget-fields='sib-form-auto-completion' + + + widget-name='cs-display-property' + widget-country='cs-display-property' + widget-publication_year='cs-display-property' + widget-description='cs-display-property' + widget-fields='hidden-widget' + widget-language="hidden-widget" + widget-author="hidden-widget" + widget-format='cs-display-multiple-property' + widget-like='fake-like' + widget-dislike='fake-dislike' + label-format='' + multiple-format + label-language='' + multiple-language + label-fields='' + multiple-fields + class="panel" + next='entrepreneur-resource-detail' + + paginate-by="5" + ) diff --git a/src/includes/mentor/components/header.pug b/src/includes/mentor/components/header.pug index f223156c5959f25b135ccba0be54ba8fdb127b71..00e1d699e5899a62190e162255388cd51dd49fc8 100644 --- a/src/includes/mentor/components/header.pug +++ b/src/includes/mentor/components/header.pug @@ -23,4 +23,13 @@ bind-user fields='account.picture', widget-account.picture='cs-account-picture' - ) \ No newline at end of file + ) + + sib-link(next='mentor-dashboard') + p Dashboard + sib-link(next='mentor-database') + p Resources database + sib-link(next='mentor-account') + p My account + sib-link.logout-button(next='mentor-dashboard') + p Logout \ No newline at end of file diff --git a/src/includes/mentor/dashboard.pug b/src/includes/mentor/dashboard.pug index d27b1086ffc92656efe1fc7fdea92a04c4dbe13d..eda3a64603191c48042037146fcb4c438811dbe8 100644 --- a/src/includes/mentor/dashboard.pug +++ b/src/includes/mentor/dashboard.pug @@ -27,9 +27,8 @@ section#home include resources/validate.pug sib-link(class="backlink", next="mentor-resource-list") Back to the dashboard - dialog#resource-validation-process - h1 What is a validation process ? - sib-link(class="backlink pull-right", next="mentor-resource-list") X + dialog#resource-validation-process.no-sidebar + include ./validation-process.pug #mentor-resource-create(hidden).no-sidebar.container sib-link(class="backlink", next="mentor-resource-list") Back to the dashboard diff --git a/src/includes/mentor/resources/confirmation.pug b/src/includes/mentor/resources/confirmation.pug index 964d2811175285abc28c892dfb73615d595c3d7b..766dc355773eea7e1c79efd64ccbb1da04cda23f 100644 --- a/src/includes/mentor/resources/confirmation.pug +++ b/src/includes/mentor/resources/confirmation.pug @@ -15,8 +15,7 @@ div.block_list sib-route(name='resource-validation-process_confirmation') dialog#resource-validation-process_confirmation - h1 What is a validation process ? - sib-link(class="backlink pull-right", next="resource-creation-confirmation") X + include ../validation-process.pug sib-link(class="backlink pull-right", next="resource-validation-process_confirmation") What is a validation process ? diff --git a/src/includes/mentor/resources/detail.pug b/src/includes/mentor/resources/detail.pug index 4dd59199a3c9d02a41bbda48243a47a5f693962c..8eb75dd70b7d4a9513ea580599fa86b21a633b93 100644 --- a/src/includes/mentor/resources/detail.pug +++ b/src/includes/mentor/resources/detail.pug @@ -8,9 +8,10 @@ include ../../components/widgets sib-display( bind-resources, - fields='name, steps, format, content(preview_image, tags),\ + fields='name, steps, format,\ submitter_info(submitter.account.picture, submitter.name, \ submitter.mentor_profile.organisation.name, skills, uri, broken),\ + content(preview_image, tags),\ description, review.reviewer.account.picture, review.reviewer.name,\ copyright, specifications(\ header_specifications, author, country, language.name,\ @@ -35,7 +36,7 @@ include ../../components/widgets widget-language.name='cs-display-resource-property' widget-submitter.account.picture='cs-account-picture' widget-broken='cs-broken-action' - widget-preview_image='cs-profile-picture' + 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" diff --git a/src/includes/mentor/resources/list.pug b/src/includes/mentor/resources/list.pug index 714ad660d08d238df9c5598c3b2c1835d5c7d938..fb46dfc0ce3e9e28b0cc378ec0638106a505c588 100644 --- a/src/includes/mentor/resources/list.pug +++ b/src/includes/mentor/resources/list.pug @@ -62,7 +62,7 @@ div.block_list sib-display.request_accordeon( loader-id="loader-requests-mentor" data-src=`${endpoints.requests}` - fields='content(name, description), info(fields, language.name, target), create', + fields='name, content(description, info(fields, language.name, target), create)', label-target='Target audience:' label-language.name='Language:' @@ -72,6 +72,7 @@ div.block_list widget-fields='cs-display-multiple-property' widget-language.name='cs-display-resource-property' widget-target='cs-display-resource-property' + widget-name='accordion-request-resource' label-create='Post a resource' action-create="mentor-resource-create" diff --git a/src/includes/mentor/validation-process.pug b/src/includes/mentor/validation-process.pug new file mode 100644 index 0000000000000000000000000000000000000000..174fc17a95254c76a7dc68d6c8b912b8c40da51c --- /dev/null +++ b/src/includes/mentor/validation-process.pug @@ -0,0 +1,33 @@ +div.block_log.block_creat_count.no_shadow + sib-link(class="backlink pull-right", next="mentor-resource-list") X + div#validation-process + h2 What is a validation process ? + div + figure + img( src="http://placekitten.com/g/150/150" + alt="") + figcaption Mentor upload a resource to the database + + figure( + img src="http://placekitten.com/1/300" + alt="" + ) + figcaption Resource is sent to qualified peers for validation + + + div + figure + img( src="http://placekitten.com/g/150/150" + alt="") + figcaption Resource is validated and becomes available in the database + + figure + img( src="http://placekitten.com/g/150/150" + alt="") + figcaption Resource is not validated and improvement is siggested. You get a list of improvement, can edit ans re-load the resource. It goes to validation process again.L0 + + figure + img( src="http://placekitten.com/g/150/150" + alt="") + figcaption Resource is reported inapropriate. You get a notification with a message from your peer explaning why. + \ No newline at end of file diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 910ba261a72963e26e5326820a8c56c1e25526a8..a81d3d98f07d8ba0a9aaae9c94d0c057193245fd 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -129,7 +129,7 @@ function selectHiddenManagementForType(tab, form) { jQuery(document).ready(function($) { //Refresh pagination refreshPagination(); - + console.log('toto'); // Get the element with id="defaultOpen" and click on it document.getElementById("defaultOpen").click(); @@ -168,7 +168,51 @@ jQuery(document).ready(function($) { }); } + //MENTOR DASHBOARD************************************************************* + window.setTimeout(() => { + + //Manage the accordion in request mentor dashboard. + var accRequest = document.querySelectorAll( + "#requests accordion-request-resource" + ); + console.log(accRequest); + var i; + + for (i = 0; i < accRequest.length; i++) { + accRequest[i].addEventListener("click", function() { + /* Toggle between adding and removing the "active" class, + to highlight the button that controls the panel */ + this.classList.toggle("active"); + + /* Toggle between hiding and showing the active panel */ + var panelRequest = this.nextElementSibling; + if (panelRequest.style.maxHeight) { + panelRequest.style.maxHeight = null; + } else { + panelRequest.style.maxHeight = panelRequest.scrollHeight + "px"; + } + }); + } + }, 4000); + //ENTREPRENEUR DASHBOARD************************************************************* + + //Accordion by step + var acc = document.getElementsByClassName("accordion"); + var i; + + for (i = 0; i < acc.length; i++) { + acc[i].addEventListener("click", function() { + this.classList.toggle("active"); + var panel = this.nextElementSibling; + if (panel.style.display === "block") { + panel.style.display = "none"; + } else { + panel.style.display = "block"; + } + }); + } + //In the entrepreneur dashboard, we set data from the display form to the hidden ones. var forms = document.querySelectorAll(".resource_by_step"); diff --git a/src/styles/index.scss b/src/styles/index.scss index 4681eb3a6f034e582059e8f5427bd667e9aa054b..99c68bf4e432f67083a3c15744d3dafb9977ae3c 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,7 +1,7 @@ @charset "UTF-8"; -@import '../../node_modules/include-media/dist/include-media'; -@import '../../node_modules/normalize.css/normalize'; +@import "../../node_modules/include-media/dist/include-media"; +@import "../../node_modules/normalize.css/normalize"; @import "variables"; @import "header"; @@ -346,7 +346,7 @@ p{ /* XXXXXXXXXXXXXXXXXXXXXXXXXXXX ICONES XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ -.ico_gauche, #mentor-resource-detail a{ +.ico_gauche, #mentor-resource-detail a, #entrepreneur-resource-list cs-display-property[name="name"] p{ padding-left: 3.5rem; position: relative; } @@ -355,7 +355,7 @@ p{ position: relative; } -.ico_gauche:before,ico_droite:before, #mentor-resource-detail a:before{ +.ico_gauche:before,ico_droite:before, #mentor-resource-detail a:before,#entrepreneur-resource-list cs-display-property[name="name"] p:before{ font-family: "Font Awesome 5 pro"; font-weight: 900; position : absolute; @@ -385,6 +385,13 @@ ico_droite:before{ .ico_arrow:before{ content: "\f061"; } +#entrepreneur-resource-list cs-display-property[name="name"] p:before{ + content:"\f005"; + left: 0.4rem; + top: 0.2rem; + font-size: 1.1rem; + color: #5DC6F2; +} /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx FIN ICONE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ @@ -546,12 +553,19 @@ form .ss-main .ss-multi-selected .ss-values .ss-value{ color: #818998; font-weight: lighter; } -.ss-list.checkbox .ss-option, .ss-list.checkbox input{ +.ss-list.checkbox .ss-option, .ss-list.checkbox label{ position: relative; font-weight: lighter; } -.ss-list.checkbox .ss-option:before, , .ss-list.checkbox input:before { +.ss-list.checkbox label{ + font-family: "var(--typo-btn)"; + font-size: 1.5rem; + top: 2rem; + left: .5rem; + +} +.ss-list.checkbox .ss-option:before, .ss-list.checkbox label:before { content: ""; position : absolute; display: block; @@ -561,8 +575,9 @@ form .ss-main .ss-multi-selected .ss-values .ss-value{ border-radius: 3px; left: -2.5rem; top: .9rem; + cursor: pointer; } -.ss-list.checkbox .ss-option.active:after, , .ss-list.checkbox input:after { +.ss-list.checkbox .ss-option.active:after, .ss-list.checkbox label:focus:after { font-family: "Font Awesome 5 pro"; font-weight: 900; content: "\f00C"; @@ -573,6 +588,19 @@ form .ss-main .ss-multi-selected .ss-values .ss-value{ left: -1.95rem; top: .9rem; } +.ss-list.checkbox label:before{ + left: -3rem; + top: 0; +} +.ss-list.checkbox label:focus:after{ + left: -2.6rem; + top: 0; +} +.ss-list.checkbox label:not(:focus):after +.ss-list.checkbox label+input[type="checkbox"]{ + position: absolute; + left: -10000rem; +} /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -725,13 +753,88 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ padding-top: 3.5rem; input[name="keyword"]{ float: left; - width: 80%; + width: 76%; } - #keyword_submit{ + #keyword_submit div{ float: right; margin-top: 0; width: 20%; + top: -1rem; } + cs-section_header[name="header_criterias"] h2.title_form{ + font-family: 'var(--typo-btn)'; + font-size: 1.4rem; + color: var(--clr-typo-base); + border-bottom: 1px solid #DBE2ED; + margin: 5rem 0 2rem 0; + padding-bottom: .5rem; + } + .tablink{ + width: 50%; + } + .tablink+.block_log{ + background: none; + padding: var(--marge-base) 0; + } + .step{ + background: white; + -webkit-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.13); + -moz-box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.13); + box-shadow: 0px 0px 7px 0px rgba(0,0,0,0.13); + padding: 2rem; + margin-bottom: 1.5rem; + cs-display-property[name="publication_year"] p{ + font-size: 1.4rem; + font-weight: bold; + margin-bottom: 1rem; + } + cs-display-property p{ + margin-bottom: 0; + } + cs-display-multiple-property[name="format"] p{ + border-radius: 5px; + background-color: #5DC6F2; + padding: .5rem; + font-family: 'var(--typo-btn)'; + color: var(--bg-block); + text-decoration: none; + text-align: center; + font-size: 1.4rem; + border:2px solid #5DC6F2; + cursor: pointer; + display: inline-block; + margin: .5rem; + transition: .4s all ease-in; + } + cs-display-multiple-property[name="format"] p:hover{ + background-color: var(--bg-block); + color: #5DC6F2; + } + div sib-display div{ + padding: 1.5rem; + } + div sib-display:nth-child(odd) div{ + background: #F7F9FE; + } + div sib-display:nth-child(even) div{ + background: white; + } + cs-steps-header p{ + margin-bottom: 1.5rem; + b{ + text-transform: uppercase; + } + } + + } +} +#entrepreneur-resource-list cs-display-property[name="name"] p{ + font-size: 1.6rem; + color: var(--clr-roll-black); + padding-left: 2.5rem; +} +#more_criterias.flex.flex_espace{ + width: 100%; } /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -835,7 +938,25 @@ div .tit_element_list{ color: var(--clr-roll-black); font-size: 1.6rem; } - +#resources-history { + sib-set-default{ + margin-bottom: 4rem; + } + hidden-widget{ + display: none; + } + cs-section_header[name="header_criterias"] h2.title_form{ + font-family: 'var(--typo-btn)'; + font-size: 1.4rem; + color: var(--clr-typo-base); + border-bottom: 1px solid #DBE2ED; + margin: 5rem 0 2rem 0; + padding-bottom: .5rem; +} +} +sib-display#pending-resources div{ + clear: both; +} .contenu_list{ height: 0; } @@ -890,7 +1011,9 @@ sib-multiple label, cs-resource-status[name="review.status"]+*{ display:flex; justify-content: space-between; } - +#reviews .backlink{ + margin: 0; +} #pending-resources { sib-set-default[name="content"] sib-display-value{ font-size: 1.6rem; @@ -928,6 +1051,18 @@ sib-multiple label, cs-resource-status[name="review.status"]+*{ position: relative; top: 35%; } +#requests sib-multiple{ + margin-right: 7rem; + label, cs-display-multiple-property[name="fields"] p{ + color: var(--clr-typo-base); + font-size: 1.4rem; + margin: 0 1rem 0 0; + font-family: 'var(--typo-btn)'; + } + cs-display-multiple-property[name="fields"]{ + float: left; + } +} /*XXXXXXXXXXXXXXXXXXXXX DETAIL RESSOURCES XXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ cs-display-step-property[label="Step"] p{ @@ -1097,6 +1232,13 @@ cs-validate-action div{ text-align: right; } +#requests sib-set-default[name="content"] { + padding: 0 18px; + max-height: 0; + overflow: hidden; + transition: max-height 0.2s ease-out; + } + /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXX PROFILE XXXXXXXXXXXXXXXXXXXXX