From 0b3ba0990e667ae0d6991ada0e7c986a5d316add Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Fri, 26 Mar 2021 05:36:51 +0100
Subject: [PATCH] Mark Senior Fellows in listings

---
 colleges/managers.py                              |  3 ++-
 colleges/templates/colleges/college_detail.html   | 10 ++++++++--
 scipost/templates/scipost/_contributor_short.html |  5 ++++-
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/colleges/managers.py b/colleges/managers.py
index 62ca8210b..9b36568fe 100644
--- a/colleges/managers.py
+++ b/colleges/managers.py
@@ -16,7 +16,8 @@ class FellowQuerySet(models.QuerySet):
 
     def regular(self):
         from .models import Fellowship
-        return self.filter(status=Fellowship.STATUS_NORMAL)
+        print(Fellowship.__dict__)
+        return self.filter(status=Fellowship.STATUS_REGULAR)
 
     def active(self):
         today = timezone.now().date()
diff --git a/colleges/templates/colleges/college_detail.html b/colleges/templates/colleges/college_detail.html
index 45f5581a5..9cd770282 100644
--- a/colleges/templates/colleges/college_detail.html
+++ b/colleges/templates/colleges/college_detail.html
@@ -31,7 +31,7 @@
   <h2 class="highlight">{{ college }}</h2>
 
   <div class="row">
-    <div class="col-12">
+    <div class="col-md-6">
       <button class="btn btn-primary" data-toggle="toggle-show" data-target="#specialties-{{ college.acad_field }}">Select by specialty</button>
       <button class="btn btn-primary" style="display: none;" data-toggle="toggle-show" data-target="#specialties-{{ college.acad_field }}">Show full list of Fellows</button>
       <div id="specialties-{{ college.acad_field }}" class="card bg-white border-default all-specialties mt-2" style="display: none">
@@ -50,10 +50,16 @@
     </div>
   </div>
 
+  <div class="row">
+    <div class="col">
+      [S] denotes a Senior Fellow
+    </div>
+  </div>
+
   <div class="row search-contributors" data-contributors="{{ college.acad_field.slug }}">
     <div class="col-12">
       <div class="card-columns">
-	{% for fellowship in college.fellowships.active.regular %}
+	{% for fellowship in college.fellowships.active %}
 	  <div class="card contributor mb-1">
 	    {% include 'scipost/_contributor_short.html' with fellowship=fellowship %}
 	  </div>
diff --git a/scipost/templates/scipost/_contributor_short.html b/scipost/templates/scipost/_contributor_short.html
index 23cae4724..be8fba4bd 100644
--- a/scipost/templates/scipost/_contributor_short.html
+++ b/scipost/templates/scipost/_contributor_short.html
@@ -9,7 +9,10 @@
   {{ fellowship.contributor.profile.get_title_display }} {{ fellowship.contributor.user.first_name }} {{ fellowship.contributor.user.last_name }}
   {% if fellowship.contributor.profile.webpage %}
     </a>
-  {% endif %}
+    {% endif %}
+    {% if fellowship.senior %}
+    [S]
+    {% endif %}
 </p>
 
 {% if fellowship.contributor.affiliations.active.first %}
-- 
GitLab