From 8035d0e0cfe699904e372199707a7fc1f55ad6f8 Mon Sep 17 00:00:00 2001
From: Tom Wiesing <tkw01536@gmail.com>
Date: Tue, 6 Jun 2017 17:19:09 +0200
Subject: [PATCH] Group people into active / inactive

---
 _config.yml                    | 26 +++++++++++++++++++++++---
 _includes/menu_sub.html        |  2 +-
 _includes/people_list.html     | 28 ++++++++++++++++++++++++++++
 people/README.md               |  6 +++---
 people/akohlhase.md            |  5 ++---
 people/cjucovschi.md           |  3 +--
 people/clange.md               |  5 ++---
 people/cmueller.md             |  5 ++---
 people/dginev.md               |  5 ++---
 people/dmueller.md             |  5 ++---
 people/fhorozal.md             |  5 ++---
 people/former.html             |  9 +++++++++
 people/frabe.md                |  3 +--
 people/hstamerjohanns.md       |  5 ++---
 people/index.html              |  9 +++++++++
 people/index.md                | 16 ----------------
 people/inormann.md             |  5 ++---
 people/jbetzendal.md           |  3 +--
 people/miancu.md               |  4 ++--
 people/mkohlhase-activities.md |  7 -------
 people/mkohlhase-cv.md         |  7 -------
 people/mkohlhase.md            |  2 --
 people/nmueller.md             |  5 ++---
 people/twiesing.md             |  2 +-
 people/vzholudev.md            |  5 ++---
 25 files changed, 99 insertions(+), 78 deletions(-)
 create mode 100644 _includes/people_list.html
 create mode 100644 people/former.html
 create mode 100644 people/index.html
 delete mode 100644 people/index.md
 delete mode 100644 people/mkohlhase-activities.md
 delete mode 100644 people/mkohlhase-cv.md

diff --git a/_config.yml b/_config.yml
index bf3efe6..72e8c95 100644
--- a/_config.yml
+++ b/_config.yml
@@ -45,10 +45,12 @@ menu:
     - title: 'News'
       url: '/news/'
     - title: 'People'
-      folder: 'people'
       items:
+        - title: 'Current Members'
+          url: '/people/'
+        - title: 'Former Members'
+          url: '/people/former/'
         - title: 'Bibliography'
-          menu_order: 10000
           external: true
           url: 'https://kwarc.github.io/bibs/'
     - title: 'Research'
@@ -68,7 +70,25 @@ menu:
 # Settings for compressing everything
 compress_html:
   clippings: []
-  comments: ["<!-- ", " -->"]      
+  comments: ["<!-- ", " -->"]
+ 
+# roles for people and their name
+roles:
+    - 
+        id: faculty
+        name: Faculty
+    -
+        id: postdoc
+        name: Postdocs
+    - 
+        id: phd-student
+        name: "Phd Students"
+    - 
+        id: master-student
+        name: "Master Students"
+    -
+        id: bachelor-student
+        name: "Bachelor Students"
   
 
 # default values -- the one for all **must** be first 
diff --git a/_includes/menu_sub.html b/_includes/menu_sub.html
index fa31534..de57fe2 100644
--- a/_includes/menu_sub.html
+++ b/_includes/menu_sub.html
@@ -48,7 +48,7 @@
 
                         <!-- if we have items, iterate over them -->
                         {% if item.items %}
-                            {% for item in (item.items | sort: "menu_order") %}
+                            {% for item in item.items %}
                                 {% include menu_single.html %}
                             {% endfor %}
                         {% endif %}
diff --git a/_includes/people_list.html b/_includes/people_list.html
new file mode 100644
index 0000000..af5c26a
--- /dev/null
+++ b/_includes/people_list.html
@@ -0,0 +1,28 @@
+{% comment %}
+    Generates a list of people. 
+    Expects 'people' as an argument, representing the list of people to show. 
+{% endcomment %}
+
+{% for role in site.roles %}
+    {% assign rollers = people | where: "role", role.id %}
+    
+    {% if rollers.size > 0 %}
+        <ul class="collection with-header">
+            <li class="collection-header"><h4>{{role.name}}</h4></li>
+            {% for person in rollers %}
+                <li class="collection-item avatar">
+                    <img src="/{{person.pic}}" alt="" class="circle">
+                        <a href="{{person.url}}" class="title">{{person.fullname}}</a>
+                        <p>
+                            {% if person.start_date %}
+                                from {{person.start_date}} <br/>
+                            {% endif %}
+                            {% if person.end_date %}
+                                until {{person.end_date}} <br/>
+                            {% endif %}
+                        </p>
+                </li>
+            {% endfor %}
+        </ul>
+    {% endif %}
+{% endfor %}
\ No newline at end of file
diff --git a/people/README.md b/people/README.md
index 015fe0b..8fb3ef9 100644
--- a/people/README.md
+++ b/people/README.md
@@ -15,9 +15,9 @@ Each file  needs some specific parameters:
  * **affiliation** the academic affiliation 
  * **account** (the base name of the file)
  * **cv** (optionall) ink to a CV.
- * **start-date** (optional) a start date (YYYY-MM) 
- * **end-date** (optional) an end date (YYYY-MM) 
+ * **start_date** (optional) a start date (YYYY-MM) 
+ * **end_date** (optional) an end date (YYYY-MM) 
  * **role** one of *master-student*, *bachelor-student*, *phd-student*, *postdoc*, *faculty* or *guest* 
  * **crossref** (optional) if the home page is outside this web site.
 
-
+A person is considered as 'active' (i.e. a current member) if and only if their `end_date` is unset. 
\ No newline at end of file
diff --git a/people/akohlhase.md b/people/akohlhase.md
index d5a2b64..f4bcd7b 100644
--- a/people/akohlhase.md
+++ b/people/akohlhase.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Andrea Kohlhase
-menu_order: 102
 fullname: Prof. Dr. Andrea Kohlhase
 role: postdoc
 pic: public/images/akohlhase.jpg
-start-date: 2005-12
-end-date: 2014-08
+start_date: 2005-12
+end_date: 2014-08
 ---
 ### Description
 
diff --git a/people/cjucovschi.md b/people/cjucovschi.md
index 7d87355..ab5d2fc 100644
--- a/people/cjucovschi.md
+++ b/people/cjucovschi.md
@@ -1,13 +1,12 @@
 ---
 layout: person
 title: Constantin Jucovschi
-menu_order: 101
 fullname: Constantin Jucovschi
 affiliation: Computer Science, FAU Erlangen-Nürnberg
 account: cjucovschi
 role: phd-student
 pic: public/images/cjucovschi.jpeg
-start-date: 2007-10
+start_date: 2007-10
 ---
 
 ### Description: 
diff --git a/people/clange.md b/people/clange.md
index 9c6a397..0d3ac1c 100644
--- a/people/clange.md
+++ b/people/clange.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Christoph Lange
-menu_order: 102
 fullname: Dr. Christoph Lange
 role: phd-student
 pic: public/images/clange.jpg
-start-date: 2008-07
-end-date: 2012-08
+start_date: 2008-07
+end_date: 2012-08
 ---
 ### Thesis Title:
 Enabling Collaboration on Semiformal Mathematical Knowledge by Semantic Web Integration 
diff --git a/people/cmueller.md b/people/cmueller.md
index 7da3cd5..e7c3e45 100644
--- a/people/cmueller.md
+++ b/people/cmueller.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Christine Müller
-menu_order: 102
 fullname: Dr. Christine Müller
 role: phd-student
 pic: public/images/cmueller.jpg
-start-date: 2006-09
-end-date: 2010-05
+start_date: 2006-09
+end_date: 2010-05
 ---
 ### Description
 In May 2010 I have received my PhD in computer science at the Jacobs  University.
diff --git a/people/dginev.md b/people/dginev.md
index 97144a3..5d1ffd7 100644
--- a/people/dginev.md
+++ b/people/dginev.md
@@ -1,12 +1,11 @@
 ---
 layout: person
-title: Deyan Ginev 
-menu_order: 101
+title: Deyan Ginev
 fullname: Deyan Ginev
 affiliation: Computer Science, FAU Erlangen-Nürnberg
 account: dginev
 role: phd-student
-start-date: 2007-02
+start_date: 2007-02
 pic: public/images/dginev.jpeg
 ---
 ### Contact
diff --git a/people/dmueller.md b/people/dmueller.md
index de5e302..6730f7c 100644
--- a/people/dmueller.md
+++ b/people/dmueller.md
@@ -1,12 +1,11 @@
 ---
 layout: person
-title: Dennis Müller 
-menu_order: 101
+title: Dennis Müller
 fullname: Dennis Müller
 affiliation: Computer Science, FAU Erlangen-Nürnberg
 account: dmueller
 role: phd-student
-start-date: 2015-04
+start_date: 2015-04
 pic: public/images/dmueller.jpg
 ---
  Ph.D. Student at KWARC
diff --git a/people/fhorozal.md b/people/fhorozal.md
index 9cf91e2..5d7e68d 100644
--- a/people/fhorozal.md
+++ b/people/fhorozal.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Fulya Horozal
-menu_order: 102
 fullname: Dr. Fulya Horozal
 role: phd-student
 pic: public/images/fhorozal.jpg
-start-date: 2010-05
-end-date: 2014-12
+start_date: 2010-05
+end_date: 2014-12
 ---
 ### Thesis Title:
 Framework for Defining Declarative Languages 
diff --git a/people/former.html b/people/former.html
new file mode 100644
index 0000000..85cee9c
--- /dev/null
+++ b/people/former.html
@@ -0,0 +1,9 @@
+---
+layout: default
+title: KWARC People
+---
+
+<h2>Former Members of the KWARC Group</h2>
+
+{% assign people = site.pages | where: "layout", "person" | where_exp: "person", "person.end_date != null" | sort: "start_date" %}
+{% include people_list.html %}
\ No newline at end of file
diff --git a/people/frabe.md b/people/frabe.md
index 4d9644e..e5f720c 100644
--- a/people/frabe.md
+++ b/people/frabe.md
@@ -1,10 +1,9 @@
 ---
 layout: person
 title: Florian Rabe
-menu_order: 102
 fullname: PD Dr. Florian Rabe
 account: frabe
 role: postdoc
-start-date: 2005-09
+start_date: 2005-09
 ---
 to be decided how to integrate his stuff
diff --git a/people/hstamerjohanns.md b/people/hstamerjohanns.md
index 38ee4dd..9e2e79d 100644
--- a/people/hstamerjohanns.md
+++ b/people/hstamerjohanns.md
@@ -1,11 +1,10 @@
 ---
 layout: person
 title: Heinrich Stamerjohanns
-menu_order: 102
 fullname: Dr. Heinrich Stamerjohanns
 role: postdoc
-start-date: 2005-09
-end-date: 2014-03
+start_date: 2005-09
+end_date: 2014-03
 crossref: http://www.eecs.jacobs-university.de/wiki/index.php/Heinrich_Stamerjohanns
 ---
 
diff --git a/people/index.html b/people/index.html
new file mode 100644
index 0000000..44745eb
--- /dev/null
+++ b/people/index.html
@@ -0,0 +1,9 @@
+---
+layout: default
+title: KWARC People
+---
+
+<h2>Current Members of the KWARC Group</h2>
+
+{% assign people = site.pages | where: "layout", "person" | where_exp: "person", "person.end_date == null" | sort: "start_date" %}
+{% include people_list.html %}
\ No newline at end of file
diff --git a/people/index.md b/people/index.md
deleted file mode 100644
index badf399..0000000
--- a/people/index.md
+++ /dev/null
@@ -1,16 +0,0 @@
----
-layout: default
-title: KWARC People
-menu_title: Current
-menu_order: 100
----
-## Current Members of the KWARC Group([former members](/people/former))
-
-listing to be generated here.
-
-
-
-
-
-
-
diff --git a/people/inormann.md b/people/inormann.md
index 4f7efaa..b9219dd 100644
--- a/people/inormann.md
+++ b/people/inormann.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Immanuel Normann
-menu_order: 102
 fullname: Dr. Immanuel Normann
 role: phd-student
 pic: public/images/inormann.jpg
-start-date: 2004-01
-end-date: 2008-12
+start_date: 2004-01
+end_date: 2008-12
 ---
 ### Description
 Immanuel Normann was a Ph.D. student at KWARC,
diff --git a/people/jbetzendal.md b/people/jbetzendal.md
index c9ba4e3..a25ec13 100644
--- a/people/jbetzendal.md
+++ b/people/jbetzendal.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Jonas Betzendal
-menu_order: 102
 fullname: B.Sc. Jonas Betzendal
 affiliation: Data Engineering, Jacobs University
 account: twiesing
 role: master-student
-start-date: 2016-08
+start_date: 2016-08
 pic: public/images/jbetzendal.jpg
 ---
 
diff --git a/people/miancu.md b/people/miancu.md
index 62674b1..edd555c 100644
--- a/people/miancu.md
+++ b/people/miancu.md
@@ -1,12 +1,12 @@
 ---
 layout: person
 title: Mihnea Iancu
-menu_order: 101
 fullname: Mihnea Iancu
 affiliation: Computer Science, FAU Erlangen-Nürnberg
 account: miancu
 role: phd-student
-start-date: 2012-04
+start_date: 2012-04
+end_date: 2017-01
 ---
 Ph.D. Student at KWARC
  working on various projects within the KWARC group in the direction of iMMT and OMDoc2.
diff --git a/people/mkohlhase-activities.md b/people/mkohlhase-activities.md
deleted file mode 100644
index 52bc4d7..0000000
--- a/people/mkohlhase-activities.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-layout: page
-menu_hidden: true
----
-## Academic Activities
-
-just testing
diff --git a/people/mkohlhase-cv.md b/people/mkohlhase-cv.md
deleted file mode 100644
index d67b8c2..0000000
--- a/people/mkohlhase-cv.md
+++ /dev/null
@@ -1,7 +0,0 @@
----
-layout: page
-menu_hidden: true
----
-## CV Michael Kohlhase
-
-just testing
diff --git a/people/mkohlhase.md b/people/mkohlhase.md
index 617bd49..e30ac33 100644
--- a/people/mkohlhase.md
+++ b/people/mkohlhase.md
@@ -1,12 +1,10 @@
 ---
 layout: person
 title: Michael Kohlhase
-menu_order: 101
 fullname: Prof. Dr. Michael Kohlhase
 fulltitle: Professur für Wissensrepräsentation und -verarbeitung
 affiliation: Computer Science, FAU Erlangen-Nürnberg
 account: mkohlhase
-cv: people/mkohlhase-cv
 role: faculty
 pic: public/images/mkohlhase.jpg
 ---
diff --git a/people/nmueller.md b/people/nmueller.md
index 71a7208..cddab14 100644
--- a/people/nmueller.md
+++ b/people/nmueller.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Normen Müller
-menu_order: 102
 fullname: Dr. Normen Müller
 role: phd-student
 pic: public/images/nmueller.jpg
-start-date: 2005-09
-end-date: 2010-07
+start_date: 2005-09
+end_date: 2010-07
 ---
 ### Description
 In May 2010 I have received my PhD in computer science at the Jacobs  University.
diff --git a/people/twiesing.md b/people/twiesing.md
index 2f61c22..afb337e 100644
--- a/people/twiesing.md
+++ b/people/twiesing.md
@@ -1,12 +1,12 @@
 ---
 layout: person
 title: Tom Wiesing
-menu_order: 102
 fullname: B.Sc. Tom Wiesing
 affiliation: Data Engineering, Jacobs University
 account: twiesing
 role: master-student
 pic: public/images/twiesing.jpg
+start_date: 2013-02
 ---
 
 ### Description: 
diff --git a/people/vzholudev.md b/people/vzholudev.md
index 185c183..b8f9a66 100644
--- a/people/vzholudev.md
+++ b/people/vzholudev.md
@@ -1,12 +1,11 @@
 ---
 layout: person
 title: Vyacheslav Zholudev
-menu_order: 102
 fullname: Dr. Vyacheslav Zholudev
 role: phd-student
 pic: public/images/vzholudev.jpg
-start-date: 2007-09
-end-date: 2012-07
+start_date: 2007-09
+end_date: 2012-07
 ---
 ### Description
 In July 2012 I have received my PhD in computer science at the Jacobs  University.
-- 
GitLab