From 9dcfbcda42041aea52d1d0f91bde85ef84ab5ead Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Sat, 20 Apr 2019 20:39:43 +0200
Subject: [PATCH] Improve Fellowship detail view

---
 .../colleges/fellowship_details.html          | 44 ++++++++++++++++++-
 .../templates/colleges/fellowship_list.html   |  8 ++--
 2 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/colleges/templates/colleges/fellowship_details.html b/colleges/templates/colleges/fellowship_details.html
index eacba97d5..7687c8786 100644
--- a/colleges/templates/colleges/fellowship_details.html
+++ b/colleges/templates/colleges/fellowship_details.html
@@ -10,7 +10,7 @@
 {% block pagetitle %}: Fellowship details{% endblock pagetitle %}
 
 {% block content %}
-  <h1>Fellowship details</h1>
+  <h1 class="highlight">Fellowship details</h1>
   <h2 class="text-primary">{{ fellowship }}</h2>
   <br>
 
@@ -124,7 +124,47 @@
     </table>
   {% endif %}
 
-  <h3>Pool for this Fellowship</h3>
+  <h3 class="highlight">Assignments</h3>
+  <div class="row">
+    <div class="col-12">
+      <h4>Ongoing:</h4>
+    </div>
+    <div class="col-12">
+      <ul class="list-group list-group-flush">
+        {% for assignment in fellowship.contributor.editorial_assignments.ongoing %}
+          <li class="list-group-item">
+            <div class="card-body px-0">
+              {% include 'partials/submissions/submission_card_content.html' with submission=assignment.submission %}
+              {% include 'partials/submissions/submission_status.html' with submission=assignment.submission %}
+            </div>
+          </li>
+        {% empty %}
+          <li class="list-group-item">No ongoing assignments</li>
+        {% endfor %}
+      </ul>
+    </div>
+
+    <div class="col-12 mt-4">
+      <h4>Completed</h4>
+    </div>
+
+    <div class="col-12">
+      <ul class="list-group list-group-flush">
+        {% for assignment in fellowship.contributor.editorial_assignments.completed %}
+          <li class="list-group-item">
+            <div class="card-body px-0">
+              {% include 'partials/submissions/submission_card_content.html' with submission=assignment.submission %}
+              {% include 'partials/submissions/submission_status.html' with submission=assignment.submission %}
+            </div>
+          </li>
+        {% empty %}
+          <li class="list-group-item">No completed assignments</li>
+        {% endfor %}
+      </ul>
+    </div>
+  </div>
+
+  <h3 class="highlight">Pool for this Fellowship</h3>
   <table class="table table-hover">
     <thead>
       <tr>
diff --git a/colleges/templates/colleges/fellowship_list.html b/colleges/templates/colleges/fellowship_list.html
index ad7e72f27..993ac50e6 100644
--- a/colleges/templates/colleges/fellowship_list.html
+++ b/colleges/templates/colleges/fellowship_list.html
@@ -31,13 +31,13 @@
       View by discipline/subject area:
     </li>
     {% for discipline in subject_areas %}
-      <li class="list-inline-item">
+      <li class="list-inline-item m-0">
         <div class="dropdown">
-          <button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton{{ discipline.0|cut:" " }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ discipline.0 }}</button>
+          <button class="btn btn-primary dropdown-toggle py-1 px-2" type="button" id="dropdownMenuButton{{ discipline.0|cut:" " }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><small>{{ discipline.0 }}</small></button>
           <div class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ discipline.0|cut:" " }}">
-	    <a class="dropdown-item" href="{% url 'colleges:fellowships' discipline=discipline.0|cut:' ' %}">View all in {{ discipline.0 }}</a>
+	    <a class="dropdown-item" href="{% url 'colleges:fellowships' discipline=discipline.0|cut:' ' %}"><small>View all in {{ discipline.0 }}</small></a>
 	    {% for area in discipline.1 %}
-              <a class="dropdown-item" href="{% url 'colleges:fellowships' discipline=discipline.0|cut:' ' expertise=area.0 %}">{{ area.0 }}</a>
+              <a class="dropdown-item" href="{% url 'colleges:fellowships' discipline=discipline.0|cut:' ' expertise=area.0 %}"><small>{{ area.0 }}</small></a>
 	    {% endfor %}
           </div>
         </div>
-- 
GitLab