From 067a47bceb631b538982f750e1b4c830ba247550 Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Wed, 1 Nov 2017 16:08:02 +0530 Subject: Added option to submit 1 workshop and 1 talk --- website/templates/submit-cfp.html | 2 +- website/templates/submit-cfw.html | 2 +- website/templates/view-abstracts.html | 18 +++++++++++++++--- website/views.py | 12 +++++++++++- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/website/templates/submit-cfp.html b/website/templates/submit-cfp.html index f8d6982..5104e0f 100755 --- a/website/templates/submit-cfp.html +++ b/website/templates/submit-cfp.html @@ -19,7 +19,7 @@ {% include 'navbar.html' %} {% block content %}
- {% if proposals_a > 1 %} You have exceeded the abstract submission limit. + {% if proposals_a >= 1 %} You have exceeded the abstract submission limit. You may view your submitted proposals by clicking here {% else %}
diff --git a/website/templates/submit-cfw.html b/website/templates/submit-cfw.html index af4a3dd..ee5fb87 100755 --- a/website/templates/submit-cfw.html +++ b/website/templates/submit-cfw.html @@ -26,7 +26,7 @@


- {% if proposals_w > 1 %} You have exceeded the workshop proposal submission limit. + {% if proposals_w >= 1 %} You have exceeded the workshop proposal submission limit. You may view your submitted proposals by clicking here {% else %} diff --git a/website/templates/view-abstracts.html b/website/templates/view-abstracts.html index bcdf74f..d144878 100755 --- a/website/templates/view-abstracts.html +++ b/website/templates/view-abstracts.html @@ -121,11 +121,23 @@
{{proposal.status}}
{% endif %} - + +
+ {% if not user.is_superuser and type == 'ABSTRACT' %} + Submit workshop + {% elif not user.is_superuser and type == 'WORKSHOP' %} + Submit paper + {% elif not user.is_superuser%} + {% endif %} +
+
+ {% endfor %} - -
+ +

+ + {% if user.is_superuser %}
diff --git a/website/views.py b/website/views.py index ce7e138..a66d805 100755 --- a/website/views.py +++ b/website/views.py @@ -261,8 +261,18 @@ def view_abstracts(request): elif user is not None: if Proposal.objects.filter(user = user).exists : proposals = Proposal.objects.filter(user = user).order_by('status') + proposal_list= [pro.proposal_type for pro in proposals] + if 'WORKSHOP' in proposal_list and 'ABSTRACT' in proposal_list: + proposal_type = 'BOTH' + elif 'WORKSHOP' in proposal_list and 'ABSTRACT' not in proposal_list: + proposal_type = 'WORKSHOP' + else: + proposal_type = 'ABSTRACT' + + context['counts'] = count_list - context['proposals'] = proposals + context['proposals'] =proposals + context['type'] = proposal_type context['user'] = user return render(request, 'view-abstracts.html', context) else: -- cgit