diff --git a/cfp/templates/cfpdetails.html b/cfp/templates/cfpdetails.html index 7a894dc..a1c00c7 100644 --- a/cfp/templates/cfpdetails.html +++ b/cfp/templates/cfpdetails.html @@ -18,6 +18,12 @@ in topic {{ proposal.topic }}

{% endif %}

Status

-

This proposal is in {{ proposal.get_status_display }} state.

+

This proposal is in +{% if proposal.scheduled %} +Scheduled +{% else %} +{{ proposal.get_status_display }} +{% endif %} + state.

Back {% endblock %} diff --git a/cfp/templates/cfpedit.html b/cfp/templates/cfpedit.html index 7989e01..8541b6c 100644 --- a/cfp/templates/cfpedit.html +++ b/cfp/templates/cfpedit.html @@ -9,7 +9,7 @@

Reviewer notes:

{{ proposal.reviewer_notes }}

{% endif %} -
+ {% endblock %} {% block formfooter %} diff --git a/cfp/templates/cfplist.html b/cfp/templates/cfplist.html index e3cdb1c..89162ed 100644 --- a/cfp/templates/cfplist.html +++ b/cfp/templates/cfplist.html @@ -31,12 +31,7 @@ {{ proposal.topic.name }} -{% if proposal.proposer == user and proposal.status != 'A' %} - -{% else %} - -{% endif %} -{{ proposal.title }} + {{ proposal.title }} {{ proposal.proposer.first_name }} {{ proposal.proposer.last_name }} {{ proposal.status }} diff --git a/cfp/templates/topiclist.html b/cfp/templates/topiclist.html index aee7468..dcfd506 100644 --- a/cfp/templates/topiclist.html +++ b/cfp/templates/topiclist.html @@ -39,11 +39,7 @@ {% endif %} -{% if proposal.scheduled %} {{ proposal.title }} -{% else %} -{{ proposal.title }} -{% endif %} {{ proposal.proposer.first_name }} {{ proposal.proposer.last_name }} {{ proposal.status }} diff --git a/cfp/urls.py b/cfp/urls.py index 2ac3bc4..3f0d4ba 100644 --- a/cfp/urls.py +++ b/cfp/urls.py @@ -19,7 +19,6 @@ from django.conf.urls.defaults import * urlpatterns = patterns('odsreg.cfp.views', (r'^details/(\d+)$', 'details'), (r'^create$', 'create'), - (r'^edit/(\d+)$', 'edit'), (r'^review/(\d+)$', 'review'), (r'^switch/(\d+)$', 'switch'), (r'^delete/(\d+)$', 'delete'), diff --git a/cfp/views.py b/cfp/views.py index f294450..a91e97d 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -72,14 +72,6 @@ def topicstatus(request): return render(request, "topicstatus.html", {'topics': topics}) -@login_required -def details(request, proposalid): - proposal = Proposal.objects.get(id=proposalid) - return render(request, "cfpdetails.html", - {'proposal': proposal, - 'blueprints': linkify(proposal.blueprints)}) - - @login_required def create(request): if request.method == 'POST': @@ -98,11 +90,14 @@ def create(request): @login_required -def edit(request, proposalid): +def details(request, proposalid): proposal = Proposal.objects.get(id=proposalid) - if (((proposal.proposer != request.user) or proposal.status in ['A', 'S']) - and not topiclead(request.user, proposal.topic)): - return forbidden() + if (proposal.scheduled or + (((proposal.proposer != request.user) or proposal.status == 'A') + and not topiclead(request.user, proposal.topic))): + return render(request, "cfpdetails.html", + {'proposal': proposal, + 'blueprints': linkify(proposal.blueprints)}) if request.method == 'POST': form = ProposalEditForm(request.POST, instance=proposal) if form.is_valid():