diff --git a/scipost/models.py b/scipost/models.py index 4ac08a3252b017891e33b473a1a7acc4e9918e29..afd4c5c3c6311087da65966de8657276181190f9 100644 --- a/scipost/models.py +++ b/scipost/models.py @@ -295,6 +295,12 @@ class Contributor(models.Model): output += '</ul>' return mark_safe(output) + def expertises_as_string(self): + output = '' + for exp in self.expertises: + output += subject_areas_dict[exp] + ', ' + return output + def assignments_summary_as_td(self): assignments = self.editorialassignment_set.all() nr_ongoing = assignments.filter(accepted=True, completed=False).count() diff --git a/scipost/templates/scipost/VGM_detail.html b/scipost/templates/scipost/VGM_detail.html index b593933875137fb124bb147a905426da77c15dfe..a330b3fd7b438f55e5a11485cfe8c3b7462cc472 100644 --- a/scipost/templates/scipost/VGM_detail.html +++ b/scipost/templates/scipost/VGM_detail.html @@ -137,6 +137,55 @@ $(document).ready(function(){ </form> </div> </div> + <div class="row"> + <div class="col-6"> + <div class="flex-container"> + <div class="flex-greybox"> + <h3>Current Fellows</h3> + </div> + </div> + <div class="flex-container"> + <div class="flex-whitebox"> + <table class="tableofInviteesResponded"> + {% for Fellow in current_Fellows %} + <tr><td>{{ Fellow }}</td><td>{{ Fellow.discipline_as_string }}</td> + <td>{{ Fellow.expertises_as_string }}</td></tr> + {% endfor %} + </table> + </div> + </div> + </div> + <div class="col-6"> + <div class="flex-container"> + <div class="flex-greybox"> + <h3>Invitations currently outstanding</h3> + </div> + </div> + <div class="flex-container"> + <div class="flex-whitebox"> + <table class="tableofInvitees"> + {% for invitee in pending_inv_Fellows %} + <tr><td>{{ invitee.first_name }} {{ invitee.last_name }}</td></tr> + {% endfor %} + </table> + </div> + </div> + <div class="flex-container"> + <div class="flex-greybox"> + <h3>Invitations which have been turned down</h3> + </div> + </div> + <div class="flex-container"> + <div class="flex-whitebox"> + <table class="tableofInviteesDeclined"> + {% for invitee in declined_inv_Fellows %} + <tr><td>{{ invitee.first_name }} {{ invitee.last_name }}</td></tr> + {% endfor %} + </table> + </div> + </div> + </div> + </div> {% if nominations %} <div class="row"> @@ -145,6 +194,8 @@ $(document).ready(function(){ <h2>Nominations under consideration</h2> </div> </div> + </div> + <div class="row"> <div class="col-1"></div> <div class="col-10"> <ul style="list-style-type: none;"> diff --git a/scipost/views.py b/scipost/views.py index 4af50e1ab02c86a442c2f3a0e114eec79d417ac3..7310fa5c46fc13435c7de0f201e065851c2397e6 100644 --- a/scipost/views.py +++ b/scipost/views.py @@ -1490,6 +1490,12 @@ def VGM_detail(request, VGM_id): VGM_information = Template(VGM_instance.information).render(Context({})) feedback_received = Feedback.objects.filter(VGM=VGM_instance).order_by('date') feedback_form = FeedbackForm() + current_Fellows = Contributor.objects.filter( + user__groups__name='Editorial College').order_by('user__last_name') + sent_inv_Fellows = RegistrationInvitation.objects.filter( + invitation_type='F', responded=False) + pending_inv_Fellows = sent_inv_Fellows.filter(declined=False).order_by('last_name') + declined_inv_Fellows = sent_inv_Fellows.filter(declined=True).order_by('last_name') nomination_form = NominationForm() nominations = Nomination.objects.filter(accepted=None).order_by('last_name') motion_form = MotionForm() @@ -1498,6 +1504,9 @@ def VGM_detail(request, VGM_id): 'VGM_information': VGM_information, 'feedback_received': feedback_received, 'feedback_form': feedback_form, + 'current_Fellows': current_Fellows, + 'pending_inv_Fellows': pending_inv_Fellows, + 'declined_inv_Fellows': declined_inv_Fellows, 'nominations': nominations, 'nomination_form': nomination_form, 'motion_categories_dict': motion_categories_dict,