This commit is contained in:
Ross
2021-09-09 17:28:03 +01:00
parent 025ed5ec9b
commit 2c772d5f2c
4 changed files with 29 additions and 6 deletions
@@ -0,0 +1,18 @@
# Generated by Django 3.2.6 on 2021-09-09 16:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('generic', '0013_questionnote_user_author'),
]
operations = [
migrations.AlterField(
model_name='questionnote',
name='note',
field=models.TextField(blank=True),
),
]
+1 -1
View File
@@ -128,7 +128,7 @@ class QuestionNote(models.Model):
user_author = models.ForeignKey( settings.AUTH_USER_MODEL,
on_delete=models.CASCADE, blank=True, null=True)
note = models.TextField()
note = models.TextField(blank=True)
created_on = models.DateTimeField(auto_now_add=True)
complete = models.BooleanField(default=False)
@@ -19,12 +19,10 @@ User: {{user}}
<div class="fieldWrapper">
{{ form.content_type.errors }}
<label for="{{ form.content_type.id_for_label }}">Content Type</label>
{{ form.content_type }}
</div>
<div class="fieldWrapper">
{{ form.object_id.errors }}
<label for="{{ form.object_id.id_for_label }}">Object id</label>
{{ form.object_id }}
</div>
<div class="fieldWrapper">
@@ -34,7 +32,7 @@ User: {{user}}
</div>
<div class="fieldWrapper">
{{ form.note.errors }}
<label for="{{ form.note.id_for_label }}">Note</label>
<label for="{{ form.note.id_for_label }}">Additional information</label><br/>
{{ form.note }}
</div>
<input type="submit" value="Submit">
@@ -44,7 +44,8 @@
href="{% url 'rapids:author_detail' pk=author.pk %}">{{author}}</a>, {% endfor %}</p>
<p><b>Checked by:</b> {% for verified in question.verified.all %} <a
href="{% url 'rapids:verified_detail' pk=verified.pk %}">{{verified}}</a>, {% endfor %}</p>
{% comment %} <p><b>Scrapped:</b> {{ question.scrapped }} <a href="{% url 'rapids:rapid_scrap' pk=question.pk %}">(toggle)</a></p> {% endcomment %}
{% comment %} <p><b>Scrapped:</b> {{ question.scrapped }} <a
href="{% url 'rapids:rapid_scrap' pk=question.pk %}">(toggle)</a></p> {% endcomment %}
<p class="pre-whitespace">
Answers (score): {% for answer in question.answers.all %}
<span {% if answer.proposed %}class="proposed-answer" data-aid="{{answer.pk}}" data-question-type="rapid"
@@ -69,7 +70,13 @@
<ul class="notes">
{% for note in question.anon_notes.all %}
<li {% if note.complete %}class='complete' {% endif %}>
{{ note.created_on }} by {{ note.author }}: {{note.note_type}} / {{ note.note }}
{{ note.created_on }} by
{% if note.user_author %}
{{note.user_author}}
{% else %}
{{ note.author }} (unregistered):
{% endif %}
{{note.note_type}} / {{ note.note }}
{% if not note.complete %}
(<a href="{% url 'feedback_mark_complete' pk=note.pk %}">Mark complete</a>)
{% endif %}