From f9faf080a5750a7cb8eded0ead0f94ec80bccc58 Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Sat, 14 Oct 2017 09:04:26 +0200
Subject: [PATCH] Remove petition banner if signed

---
 scipost/templates/scipost/personal_page.html | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/scipost/templates/scipost/personal_page.html b/scipost/templates/scipost/personal_page.html
index 700f4e396..df6434f83 100644
--- a/scipost/templates/scipost/personal_page.html
+++ b/scipost/templates/scipost/personal_page.html
@@ -119,10 +119,12 @@
                     {# END: Scientist fields #}
                     {% endif %}
 
-                    <div class="border border-danger p-2">
-                        <h3 class="text-danger">Scientists, please help us out!</h3>
-                        <p class="mb-1">If it is not listed on our Partners page, please encourage your institution (through a librarian, director, ...) to join by <a class="h3 text-blue" href="{% url 'petitions:petition' slug='join-SPB' %}">signing our petition</a>.</p>
-                    </div>
+                    {% if not request.user.contributor.petition_signatories.exists %}
+                        <div class="border border-danger p-2">
+                            <h3 class="text-danger">Scientists, please help us out!</h3>
+                            <p class="mb-1">If it is not listed on our Partners page, please encourage your institution (through a librarian, director, ...) to join by <a class="h3 text-blue" href="{% url 'petitions:petition' slug='join-SPB' %}">signing our petition</a>.</p>
+                        </div>
+                    {% endif %}
                     <hr>
 
                   {% if 'SciPost Administrators' in user_groups %}
-- 
GitLab