From 839f7aa0cc3534f769be9f6d1565ca07e1d880f9 Mon Sep 17 00:00:00 2001
From: Benoit Alessandroni <benoit@happy-dev.fr>
Date: Wed, 12 Jun 2019 10:30:47 +0200
Subject: [PATCH] First draft of the listing of resources on the homepage

---
 src/includes/dashboard.pug       |  3 +++
 src/includes/home.pug            | 34 +++++++++++++++++++++++++++++---
 src/includes/request/create.pug  |  0
 src/includes/resource/detail.pug |  0
 4 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 src/includes/dashboard.pug
 create mode 100644 src/includes/request/create.pug
 create mode 100644 src/includes/resource/detail.pug

diff --git a/src/includes/dashboard.pug b/src/includes/dashboard.pug
new file mode 100644
index 00000000..8112419c
--- /dev/null
+++ b/src/includes/dashboard.pug
@@ -0,0 +1,3 @@
+//TODO: Dashboard is the Mentor Dashboard, only
+//accessible when logged-in, so should be protected
+//by sid-oidc.
\ No newline at end of file
diff --git a/src/includes/home.pug b/src/includes/home.pug
index cdeebc0f..499e58b9 100644
--- a/src/includes/home.pug
+++ b/src/includes/home.pug
@@ -1,10 +1,38 @@
 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"
+    // From two different endpoints I guess
+    //-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',
-        search-fields='title, description',
-        next='group'
+        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'
       )
+
+
+        //- group-by='step'
diff --git a/src/includes/request/create.pug b/src/includes/request/create.pug
new file mode 100644
index 00000000..e69de29b
diff --git a/src/includes/resource/detail.pug b/src/includes/resource/detail.pug
new file mode 100644
index 00000000..e69de29b
-- 
GitLab