Skip to content
Snippets Groups Projects
Commit 5ef68e5e authored by Nico Vermaas's avatar Nico Vermaas
Browse files

add annotation button and 'has_quality_remarks' field

parent 19acd7e9
No related branches found
No related tags found
2 merge requests!227working on annotation,!224Sdc 436 validation
......@@ -126,6 +126,13 @@ class Task(models.Model):
except:
return None
@property
def has_quality_remarks(self):
try:
return self.remarks['quality']
except:
return None
@property
def quality_as_list(self):
try:
......
......@@ -44,7 +44,24 @@
<td>{{ task.quality|default_if_none:"-" }}</td>
<td>
{% if task.has_quality_remarks %}
<a class="open-modal btn btn-primary btn-sm"
href="{% url 'task-quality' task.id my_tasks.number %}"
data-popup-url="{% url 'task-quality' task.id my_tasks.number %}">
<i class="fas fa-pen-alt"></i>
</a>&nbsp;
{% else %}
<a class="open-modal btn btn-secondary btn-sm"
href="{% url 'task-quality' task.id my_tasks.number %}"
data-popup-url="{% url 'task-quality' task.id my_tasks.number %}">
<i class="fas fa-pen-alt"></i>
</a>&nbsp;
{% endif %}
</td>
<td>
<a href="{% url 'task-validate-view' task.pk 'poor' 'validated' my_tasks.number %}" class="btn btn-danger btn-sm" role="button"><i class="fas fa-check"></i> P</a>
<a href="{% url 'task-validate-view' task.pk 'moderate' 'validated' my_tasks.number %}" class="btn btn-warning btn-sm" role="button"><i class="fas fa-check"></i> M</a>
<a href="{% url 'task-validate-view' task.pk 'good' 'validated' my_tasks.number %}" class="btn btn-success btn-sm" role="button"><i class="fas fa-check"></i> G</a>
......
......@@ -25,6 +25,7 @@
<th>Sensitivity</th>
<th>Conditions</th>
<th>Plots</th>
<th>Current Q</th>
<th>Choose</th>
<th>Quality</th>
<th>Edit</th>
<th>Poor/Moderate/Good</th>
</tr>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment