Skip to content
Snippets Groups Projects
Commit 7412b002 authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

Merge branch 'feature/adding-resource-create-first' into 'master'

Feature/adding resource create first

See merge request startinblox/applications/coop-starter/coopstarter-front!1
parents 8081b3da 30b5e05b
No related branches found
No related tags found
1 merge request!1Feature/adding resource create first
Showing
with 238 additions and 34 deletions
......@@ -3,20 +3,44 @@
"sdn": "http://127.0.0.1:8000",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "833925"
"client_id": "833925",
"endpoints": {
"resources": "http://127.0.0.1:8000/resources/",
"fields": "http://127.0.0.1:8000/fields/",
"formats": "http://127.0.0.1:8000/formats/",
"types": "http://127.0.0.1:8000/types/",
"languages": "http://127.0.0.1:8000/languages/",
"steps": "http://127.0.0.1:8000/steps/"
}
},
"staging": {
"sdn": "http://test-paris.happy-dev.fr",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "833925"
"client_id": "833925",
"endpoints": {
"resources": "http://127.0.0.1:8000/resources/",
"fields": "http://127.0.0.1:8000/fields/",
"formats": "http://127.0.0.1:8000/formats/",
"types": "http://127.0.0.1:8000/types/",
"languages": "http://127.0.0.1:8000/languages/",
"steps": "http://127.0.0.1:8000/steps/"
}
},
"prod": {
"sdn": "https://api.alpha.happy-dev.fr",
"cdn": "https://cdn.happy-dev.fr",
"xmpp": "https://jabber.happy-dev.fr/http-bind/",
"client_id": "833925"
"client_id": "833925",
"endpoints": {
"resources": "http://127.0.0.1:8000/resources/",
"fields": "http://127.0.0.1:8000/fields/",
"formats": "http://127.0.0.1:8000/formats/",
"types": "http://127.0.0.1:8000/types/",
"languages": "http://127.0.0.1:8000/languages/",
"steps": "http://127.0.0.1:8000/steps/"
}
}
}
//TODO: Dashboard is the Mentor Dashboard, only
//accessible when logged-in, so should be protected
//by sid-oidc.
\ No newline at end of file
// Mentor dashboard, containing
// 3 tabs:
// - History of my validated resources
// - Resources validation request
// -
// Access to all resources
// Capabilities to request a resource
// Like and comment
header#header(role='banner')
include ../templates/header.pug
section#home
h1 Mentorship program
p International index of resources for cooperative mentors and entrepreneurs
p: a Watch a presentation
h2 Search for a resource
//TODO:
//-Distinguish the search form from the listing
//-Create two Sib-displays getting the resources by "types"
......@@ -13,26 +22,13 @@ section#home
//-Testing the group-by right after the 0.8 version release
//-Work on the page architecture
sib-widget(name='resource-format-title')
template
p ${value.title}
#circles
sib-display#circles-list(
data-src=`${sdn}/resources/`,
data-fields='title, description, format, author, publication_year, language.name, steps',
search-fields='title, description, format',
widget-format='resource-format-title',
multiple-format,
widget-steps='resource-format-title',
multiple-steps,
set-content='title, description',
set-info='author, publication_year, language.name',
next='detail'
)
#list(hidden)
include resource/list.pug
#create(hidden).no-sidebar
sib-link(class="backlink", next="list") Back to the list
include resource/create.pug
//- group-by='step'
#edit(hidden).no-sidebar
sib-link(class="backlink", next="list") Back to the list
include resource/edit.pug
\ No newline at end of file
h2 I am an entrepreneur
form(method='POST' action='/login')
div.form-group
label(for='email') Email
input.form-control(type='text' id='email' placeholder='email' name='email')
div.form-group
label(for='password') Password
input.form-control(type='password' id='password' placeholder='password' name='password')
button.btn.btn-primary(type='submit') Log in
\ No newline at end of file
// Dashboard for entrepreneur, containing the search engine
// Access to all resources
// Capabilities to request a resource
// Like and comment
header#header(role='banner')
include ../templates/header.pug
h2 I am a mentor
form(method='POST' action='/login')
div.form-group
label(for='email') Email
input.form-control(type='text' id='email' placeholder='email' name='email')
div.form-group
label(for='password') Password
input.form-control(type='password' id='password' placeholder='password' name='password')
button.btn.btn-primary(type='submit') Log in
sib-router(default-route="home")
.d-flex
details
summary menu
.d-flex.menu-opened
.clients-menu.d-flex.flex-column.col-md-4.col-12.text-center
h2 Clients
.talents-menu.d-flex.flex-column.col-md-4.col-12.text-center
h2 Talents
.about-menu.d-flex.flex-column.col-md-4.col-12.text-center
h2 À propos
sib-router(default-route="list", use-hash)
sib-route(name='list')
div.menu-label Resources
div.menu-icon.icon-people
div.divider
sib-ac-checker(permission="acl:Write")
sib-route(name='create')
div.menu-label Create a resource
div.menu-icon.icon-people
div.divider
sib-ac-checker(permission="acl:Write" bind-resources)
sib-route(id-prefix=`${endpoints.resources}`, name='edit', use-id)
sib-route(name="mentor")
sib-route(name="entrepreneur")
\ No newline at end of file
h2 Create a new resource
details
summary All available fields:
sib-form(
data-src=`${endpoints.resources}`
range-type=`${endpoints.types}`
range-format=`${endpoints.format}`
range-steps=`${endpoints.steps}`
range-language=`${endpoints.language}`
range-field=`${endpoints.field}`
range-related=`${endpoints.resources}`
class-field='form-label is-dark'
label-field='Select the fields of the resource:*'
multiple-field='sib-multiple-select'
widget-field='sib-form-auto-completion'
class-type='form-label is-dark'
label-type='Select the types of the resource:*'
name-type='title'
multiple-type='sib-multiple-select'
widget-type='sib-form-auto-completion'
class-format='form-label is-dark'
label-format='Select the format(s) of the resource:*'
multiple-format='sib-multiple-select'
widget-format='sib-form-auto-completion'
class-steps='form-label is-dark'
label-steps='Select the steps related to the resource:*'
multiple-steps='sib-multiple-select'
widget-steps='sib-form-auto-completion'
class-language='form-label is-dark'
label-language='Select the language of the resource:*'
multiple-language='sib-multiple-select'
widget-language='sib-form-auto-completion'
class-related='form-label is-dark'
label-related='Select related resources:*'
multiple-related='sib-multiple-select'
widget-related='sib-form-auto-completion'
class-description='field form-label is-light is-expanded'
label-description='Description*'
widget-description='sib-form-textarea'
class-skills='field form-label is-light is-expanded'
label-skills='Skills you will blabla*'
widget-skills='sib-form-textarea'
class-publication_year='form-label is-dark'
label-publication_year='Publication date:*'
widget-publication_year='sib-form-number'
next="list"
)
\ No newline at end of file
h2 Edit this resource
sib-form.block(
bind-resources
data-fields='title, description, skills, closingDate'
class-title='field form-label is-light is-expanded'
label-title='Title*'
class-description='field form-label is-light is-expanded'
label-description='Description*'
widget-description='sib-form-textarea'
class-skills='form-label is-dark'
label-skills='The required skills for this mission:*'
multiple-skills='sib-multiple-select'
widget-skills='sib-form-auto-completion'
class-closingDate='form-label is-dark'
label-closingDate='Publication end date:*'
widget-closingDate='sib-form-date'
next='list'
)
sib-widget(name='resource-format-name')
template
div
p ${value.name}
p: a Watch a video presentation
h2 Search for a resource
div.resources__newresource
sib-link(next='create').plus-button
div.icon-plus
div Post a new Resource
#circles
sib-display#circles-list(
data-src=`${sdn}/resources/`,
data-fields='title, description, format, author, publication_year, language.name, steps',
search-fields='title, description, format',
widget-format='resource-format-name',
multiple-format,
widget-steps='resource-format-name',
multiple-steps,
set-content='title, description',
set-info='author, publication_year, language.name',
next='edit'
)
//- group-by='step'
\ No newline at end of file
#circles
sib-display#circles-list(
data-src=`${sdn}/resources/`,
data-fields='title, description',
search-fields='title, description',
next='group'
)
sib-router
sib-route(name='mentor-login')
sib-route(name='entrepreneur-login')
h2 Welcome to our international index of resources for cooperative mentors and entrepreneurs
sib-link(next='mentor-login')
div I am a mentor
sib-link(next='entrepreneur-login')
div I am an entrepreneur
#mentor-login(hidden).no-sidebar
include mentor/login.pug
#entrepreneur-login(hidden).no-sidebar
include entrepreneur/login.pug
\ No newline at end of file
......@@ -20,14 +20,7 @@ sib-widget(name='account-user-name')
button(role='log in' onclick="document.querySelector('sib-auth').login();") Login
#resources(hidden).no-sidebar
include home.pug
#resource-create(hidden).no-sidebar
sib-link(class="backlink", next="resources") Back
include resource/create.pug
button(role='log out' onclick="document.querySelector('sib-auth').logout();") Logout
sib-auth
sib-auth-provider(
......
......@@ -2,5 +2,5 @@ doctype html
html
include includes/head.pug
body
include includes/header.pug
include includes/home.pug
include includes/splash.pug
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment