diff --git a/cfp/models.py b/cfp/models.py index 20f6ed4..7621a5a 100644 --- a/cfp/models.py +++ b/cfp/models.py @@ -77,11 +77,6 @@ class Proposal(models.Model): "blueprint called 'accounting'. You can specify multiple " "links, separated by spaces. This field is optional.") status = models.CharField(max_length=1, choices=STATUSES) - proposer_notes = models.TextField(blank=True, - help_text="Notes from the proposer to the evaluation committee. " - "Those notes will not appear in the public description. " - "This field is optional.") - reviewer_notes = models.TextField(blank=True) scheduled = models.BooleanField(default=False) last_modified = models.DateTimeField(auto_now=True) @@ -92,23 +87,38 @@ class Proposal(models.Model): return self.title +class Comment(models.Model): + proposal = models.ForeignKey(Proposal) + posted_date = models.DateTimeField(auto_now=True) + author = models.ForeignKey(User) + content = models.TextField(verbose_name="Add your comment") + + class Meta: + ordering = ['posted_date'] + + +class CommentForm(ModelForm): + class Meta: + model = Comment + exclude = ('proposal', 'posted_date', 'author') + + class ProposalForm(ModelForm): class Meta: model = Proposal - exclude = ('proposer', 'reviewer_notes', 'status', 'scheduled') + exclude = ('proposer', 'status', 'scheduled') class ProposalEditForm(ModelForm): class Meta: model = Proposal - exclude = ('topic', 'proposer', 'reviewer_notes', 'status', - 'scheduled') + exclude = ('topic', 'proposer', 'status', 'scheduled') class ProposalReviewForm(ModelForm): class Meta: model = Proposal - fields = ('status', 'reviewer_notes') + fields = ('status',) class ProposalSwitchForm(ModelForm): diff --git a/cfp/templates/cfpdetails.html b/cfp/templates/cfpdetails.html index 822d130..6b3ffc9 100644 --- a/cfp/templates/cfpdetails.html +++ b/cfp/templates/cfpdetails.html @@ -1,9 +1,9 @@ -{% extends "base.html" %} +{% extends "regform.html" %} {% block helppage %}
This screen lets you see the details of a proposed session.
Note that you can only edit sessions that you suggested yourself (or if you're the topic lead). Sessions in Preapproved state cannot be changed.
{% endblock %} -{% block content %} +{% block formtitle %}Proposed by {{ proposal.proposer }} in topic {{ proposal.topic }}
@@ -29,4 +29,17 @@ Scheduled Edit {% endif %} Back +Comment by {{ comment.author }}
+on {{ comment.posted_date|date:"Y-m-d G:i O" }}:
+{{ comment.content|linebreaks|urlize }}