diff options
-rwxr-xr-x | website/templates/submit-cfp.html | 2 | ||||
-rwxr-xr-x | website/templates/submit-cfw.html | 2 | ||||
-rwxr-xr-x | website/templates/view-abstracts.html | 18 | ||||
-rwxr-xr-x | 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 %} <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: |