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/profile/edit.pug b/src/includes/mentor/profile/edit.pug index 556b71bb9b3b16609624e8cd86a40edd56d34076..d5b10e3bdbd6e239583655ba3b2947598f514c45 100644 --- a/src/includes/mentor/profile/edit.pug +++ b/src/includes/mentor/profile/edit.pug @@ -60,3 +60,6 @@ sib-form#mentor_profile_edition.block_log.block_creat_count( submit-button="Save modifications" next='mentor-resource-list' ) + +sib-link(class="backlink", next="mentor-resource-list") Back to the dashboard +sib-link(class="backlink", next="mentor-account") Back to the profile diff --git a/src/includes/public/components/header.pug b/src/includes/public/components/header.pug new file mode 100644 index 0000000000000000000000000000000000000000..ac670d151c8003d1f5e3130ba7df31990364e565 --- /dev/null +++ b/src/includes/public/components/header.pug @@ -0,0 +1,20 @@ +.container + .flex.flex_espace.flex_item_center + sib-link(next='entrepreneur-resource-list') + figure.logo_head.margin_bord_ecran + img(src="../images/logo_head.png" alt="Coopstarter") + + include menu.pug + + div.flex.flex_espace.flex_item_center + sib-form( + data-src=`${endpoints.languages}` + fields='languages' + range-languages=`${endpoints.languages}` + widget-languages='sib-form-dropdown' + selected-languages=`${endpoints.languages}/1/` + label-languages='' + naked + ) + input.ico_droite.ico_search + diff --git a/src/includes/public/components/menu.pug b/src/includes/public/components/menu.pug new file mode 100644 index 0000000000000000000000000000000000000000..19d3bb02784957e11f5583da705f1291d4b1e357 --- /dev/null +++ b/src/includes/public/components/menu.pug @@ -0,0 +1,4 @@ +sib-router(default-route='public-resource-list') + sib-route(name='public-resource-list') + + \ No newline at end of file diff --git a/src/includes/public/dashboard.pug b/src/includes/public/dashboard.pug new file mode 100644 index 0000000000000000000000000000000000000000..ff156e4725b9f3227bd9eabede8d394146442e13 --- /dev/null +++ b/src/includes/public/dashboard.pug @@ -0,0 +1,17 @@ +// Dashboard for entrepreneur, containing the search engine +// Access to all resources +// Capabilities to request a resource +// Like and comment + +header#header(role='banner') + include ./components/header.pug + +section#home + + #public-resource-list(hidden).no-sidebar.container + include ./resources/list.pug + + + + + diff --git a/src/includes/public/resources/detail.pug b/src/includes/public/resources/detail.pug new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/includes/public/resources/list.pug b/src/includes/public/resources/list.pug new file mode 100644 index 0000000000000000000000000000000000000000..1b25577a8dfb027afc049aaf08f5b0ae9aa51b5f --- /dev/null +++ b/src/includes/public/resources/list.pug @@ -0,0 +1,347 @@ +include ../../components/widgets + + +div.container_min + h2.title_lead.fd_bleu International index of resources for cooperative mentors and entrepreneurs + button.button_dark.pull-right Watch the presentation + +//-About : +//It will be great to have autocompletion on country +//I'm waiting for a confirmation to suppress step field + + +container.block_list.flex.flex_espace + div.w_75.block-g-entre + div + h2.title_form Search for a resource + + div#resources-public-loader + hidden Loading resources, please wait... + + sib-form#search-by-keyword( + data-src=`${endpoints.resources}`, + loader-id="resources-public-loader" + fields='keyword(name_keyword, description, author)' + label-keyword="Search by author, name..." + widget-keyword="sib-form-placeholder-text" + + widget-description='cs-display-property' + widget-name_keyword='cs-display-property' + widget-author='cs-display-property' + + naked + ) + + div#keyword_submit.button__actions + div.button_base.ico_gauche Search + + sib-form#instance_database_only( + data-src=`${endpoints.resources}`, + fields='instance_database_only' + widget-instance_database_only='cs-display-checkbox' + class-instance_database_only = 'ss-list checkbox' + + naked + ) + sib-form#more_criterias( + data-src=`${endpoints.resources}`, + fields='header_criterias, format, publication_year, country, language, fields' + label-header_criterias='More criterias' + label-format='Format:' + label-publication_year='Year of publication' + label-country='Country of publication' + label-language='Language' + label-fields='Field' + widget-header_criterias='cs-section_header' + + range-language=`${endpoints.languages}` + range-fields=`${endpoints.fields}` + range-format=`${endpoints.formats}` + + multiple-language='sib-form-dropdown' + widget-language='sib-form-auto-completion' + + multiple-format='sib-form-dropdown' + widget-format='sib-form-auto-completion' + + multiple-fields='sib-form-dropdown' + widget-fields='sib-form-auto-completion' + + naked + ) + + + //Fake tabs to filter by type. + div.tabs.flex_espace + div(class='tablink filter_by_type active', onclick="openFakeTab(this)") + sib-display#type1( + data-src="https://api.coopstarter.happy-dev.fr/types/1/" + fields='name' + widget-name='fake-tabs' + ) + + div(class='tablink filter_by_type', onclick="openFakeTab(this)") + sib-display#type2( + data-src="https://api.coopstarter.happy-dev.fr/types/2/" + fields='name' + widget-name='fake-tabs' + ) + + 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='' + + widget-name='cs-steps-header' + ) + + 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-more_criterias_hidden="hidden-widget" + search-widget-search_for_a_resource="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" + ) + + //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" + ) + + //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" + ) + + //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" + ) + + //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" + ) + diff --git a/src/includes/splash.pug b/src/includes/splash.pug index 126f9521317af9867b701cf3171fe116b3e5fb19..bc841a1a60c32d968dc2a3ad61a075425302ae72 100644 --- a/src/includes/splash.pug +++ b/src/includes/splash.pug @@ -12,4 +12,9 @@ h2.title_lead Welcome to our international index of resources for cooperative me alt="Connect as mentor") cs-login(bind-user) - button#mentor_login.button_base Connect to the knowledge base \ No newline at end of file + button#mentor_login.button_base Connect to the knowledge base + + sib-link(next='public-dashboard') + button#public-acces.button_base Access without registration + + \ No newline at end of file diff --git a/src/index.pug b/src/index.pug index 757c3a2c7f8bdbd28c20a8f5d93cf586fb0f9b44..97b326b592cdd829cecca836c67c617cc06b0c98 100644 --- a/src/index.pug +++ b/src/index.pug @@ -7,6 +7,7 @@ html sib-route(name='account-creation') sib-route(name='mentor-dashboard') sib-route(name='entrepreneur-dashboard') + sib-route(name='public-dashboard') body #mentor-dashboard(hidden).no-sidebar @@ -20,6 +21,9 @@ html #account-creation(hidden).no-sidebar.container include includes/account-creation.pug + + #public-dashboard(hidden).no-sidebar + include includes/public/dashboard.pug sib-auth sib-auth-provider(