From 7e34dda7f1c785e8c4edbbe2b218c5512805906d Mon Sep 17 00:00:00 2001
From: Benoit Alessandroni <benoit@happy-dev.fr>
Date: Wed, 10 Jul 2019 18:37:53 +0200
Subject: [PATCH] Updating to sib-core 0.8

---
 src/includes/head.pug             |  2 +-
 src/includes/mentor/create.pug    | 63 +++++++++++++++++++++++++++++++
 src/includes/resource/edit.pug    |  2 +-
 src/includes/resource/list.pug    | 24 +++++-------
 src/includes/splash.pug           |  2 +-
 src/includes/templates/header.pug |  2 +-
 6 files changed, 77 insertions(+), 18 deletions(-)

diff --git a/src/includes/head.pug b/src/includes/head.pug
index 1c19e5ae..db6e75e6 100644
--- a/src/includes/head.pug
+++ b/src/includes/head.pug
@@ -2,7 +2,7 @@ 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.7")
+    script(type="module" src="https://unpkg.com/@startinblox/core@0.8")
     script(type="module" src="https://unpkg.com/@startinblox/router@0.7")
     script(type="module" src="https://unpkg.com/@startinblox/oidc@0.6")
     script(src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous")
diff --git a/src/includes/mentor/create.pug b/src/includes/mentor/create.pug
index 71ce5c03..2e9de531 100644
--- a/src/includes/mentor/create.pug
+++ b/src/includes/mentor/create.pug
@@ -4,4 +4,67 @@ details
     summary All available fields:
         sib-form(
             data-src=`${endpoints.users}`
+            fields="account_information(username, last_name, first_name, mentor_profile.organisation,\
+                    email, mentor_profile.phone, mentor_profile.language,\
+                    password, password_confirmation, account.picture),\
+                    about_you(mentor_profile.headline, mentor_profile.city, mentor_profile.country,\
+                    mentor_profile.biography, mentor_profile.skills),\
+                    social_media(mentor_profile.linkedin, mentor_profile.twitter)"
+            
+            label-account_information="Create a mentor account"
+            label-about_you="About you"
+            label-social_media="Social medias"
+            
+            label-first_name="Surname"
+            label-last_name="Name"
+            label-email="Email"
+            label-mentor_profile.organisation="Organisation"
+            label-mentor_profile.phone="Phone number"
+            label-password="Password"
+            label-password_confirmation="Password confirmation"
+            label-mentor_profile.language="Language"
+            label-account.picture="Photo"
+            label-mentor_profile.headline="Headline or current position"
+            label-mentor_profile.city="City"
+            label-mentor_profile.country="Country"
+            label-mentor_profile.biography="Tell us more about your activities"
+            label-mentor_profile.skills="What skills can you share with our entrepreneurs ?"
+            label-mentor_profile.linkedin="Linkedin"
+            label-mentor_profile.twitter="Twitter"
+
+
+            submit-button="CREATE AN ACCOUNT"
+            widget-username="sib-form-hidden"
         )
+
+
+    //-  Name, Surname, Organisation, Email, Phone number, 
+    //-  Language, Password, Password Confirmation
+    
+    //-  About you 
+    //-  Photo, Headline or current position, City, Country, 
+    //-  Tell use more about your activities, Whats skills can you share with our entrepreneurs ?
+    
+    //-  Social medias
+    //-  Linkedin, Twitter
+
+
+    //-  data-src="{{request.scheme}}://{{ request.META.HTTP_HOST }}/api/users/{{ request.user.id }}/"
+    //-   data-fields="username, first_name, last_name, email, userprofile.photo, userprofile.city, userprofile.postcode"
+
+    //-   label-first_name="Prénom"
+    //-   label-last_name="Nom"
+    //-   label-email="Email"
+    //-   label-userprofile.photo="Photo"
+    //-   label-userprofile.city="Ville"
+    //-   label-userprofile.postcode="Code postal"
+
+    //-   widget-username="sib-form-hidden"
+    //-   widget-first_name="sib-form-label-placeholder-text"
+    //-   widget-last_name="sib-form-label-placeholder-text"
+    //-   widget-email="sib-form-label-placeholder-text"
+    //-   widget-userprofile.photo="sib-form-label-placeholder-text"
+    //-   widget-userprofile.city="sib-form-label-placeholder-text"
+    //-   widget-userprofile.postcode="sib-form-label-placeholder-text"
+
+    //-   next="accueil"
diff --git a/src/includes/resource/edit.pug b/src/includes/resource/edit.pug
index a38e3e94..63c30f7f 100644
--- a/src/includes/resource/edit.pug
+++ b/src/includes/resource/edit.pug
@@ -3,7 +3,7 @@ h2 Edit this resource
 sib-form.block(
     bind-resources
    
-    data-fields='title, description, skills, closingDate'
+    fields='title, description, skills, closingDate'
 
     class-title='field form-label is-light is-expanded'
     label-title='Title*'
diff --git a/src/includes/resource/list.pug b/src/includes/resource/list.pug
index dd4eca3f..8cfc6c60 100644
--- a/src/includes/resource/list.pug
+++ b/src/includes/resource/list.pug
@@ -14,19 +14,15 @@ div.resources__newresource
 
 #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'
-
+        data-src=`${sdn}/resources/`,
+        fields='content(title, description), format, info(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,
+        
+        next='edit'
     )
-
     //- group-by='step'
\ No newline at end of file
diff --git a/src/includes/splash.pug b/src/includes/splash.pug
index c0e742a2..caa93d28 100644
--- a/src/includes/splash.pug
+++ b/src/includes/splash.pug
@@ -14,4 +14,4 @@ sib-link(next='entrepreneur-login')
     include mentor/login.pug
 
 #entrepreneur-login(hidden).no-sidebar
-    include entrepreneur/login.pug
\ No newline at end of file
+    include entrepreneur/login.pug
diff --git a/src/includes/templates/header.pug b/src/includes/templates/header.pug
index 16d06eeb..7d250afe 100644
--- a/src/includes/templates/header.pug
+++ b/src/includes/templates/header.pug
@@ -12,7 +12,7 @@ sib-widget(name='account-user-name')
         include menu.pug
 
         sib-display#user-controls__profile(
-            data-fields='first_name, account.picture',
+            fields='first_name, account.picture',
             widget-first_name='account-user-name',
             widget-account.picture='account-user-avatar',
             bind-user
-- 
GitLab