summaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
authorPrashant S2017-11-01 16:32:10 +0530
committerGitHub2017-11-01 16:32:10 +0530
commitad15d16d45efeb85ff2fc2bcbc085cdb66975b17 (patch)
tree0a5891d90093922344aa4f7a3c6da9e8f85f90e2 /website
parent207371786b489704adc42a7773ec3fb2fe1942d1 (diff)
parent067a47bceb631b538982f750e1b4c830ba247550 (diff)
downloadSciPy2017-ad15d16d45efeb85ff2fc2bcbc085cdb66975b17.tar.gz
SciPy2017-ad15d16d45efeb85ff2fc2bcbc085cdb66975b17.tar.bz2
SciPy2017-ad15d16d45efeb85ff2fc2bcbc085cdb66975b17.zip
Merge pull request #29 from Sashi20/devel
Added option to submit 1 workshop and 1 talk
Diffstat (limited to 'website')
-rwxr-xr-xwebsite/templates/submit-cfp.html2
-rwxr-xr-xwebsite/templates/submit-cfw.html2
-rwxr-xr-xwebsite/templates/view-abstracts.html18
-rwxr-xr-xwebsite/views.py12
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 %}
<div class="container">
- {% 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 <a href="{% url 'website:view_abstracts' %}" class ="btn btn-info" role="button"> here</a>
<!-- <h2>{{ user.get_full_name|default:user.username }} </h2> -->
{% else %} <br>
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 @@
</center>
</p>
<hr>
- {% 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 <a href="{% url 'website:view_abstracts' %}" class="btn "> here</a>
{% else %}
<!-- <h2>{{ user.get_full_name|default:user.username }} </h2> -->
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 @@
<h5 style="color:blue;">{{proposal.status}}</h5>
{% endif %}
</td>
- </tr>
+
+ <div>
+ {% if not user.is_superuser and type == 'ABSTRACT' %}
+ <a href="{% url 'website:submitcfw' %}" class ="btn btn-info" role="button">Submit workshop </a>
+ {% elif not user.is_superuser and type == 'WORKSHOP' %}
+ <a href="{% url 'website:submitcfp' %}" class ="btn btn-info" role="button"> Submit paper </a>
+ {% elif not user.is_superuser%}
+ {% endif %}
+ </div>
+ <br>
+ </tr>
{% endfor %}
- </table>
- </div>
+ </table>
+ </div><br>
</p>
+
+
{% if user.is_superuser %}
<input type="submit" id="delete" class ="btn btn-info" value="Delete" name="delete"/>
<center>
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: