Added get_comment overridable method to TaskState

pull/6257/head
Karl Hobley 2020-03-10 11:33:08 +00:00 zatwierdzone przez Matt Westcott
rodzic 92a3423350
commit 2bd0026d49
2 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -83,6 +83,8 @@
{% else %}
<div class="status-tag primary">{{ task_state.get_status_display }}</div>
{% endif %}
<p>{{ task_state.specific.get_comment }}</p>
</td>
{% endfor %}
</tr>
@ -126,6 +128,8 @@
{% else %}
<div class="status-tag primary">{{ timeline_item.task_state.get_status_display }}</div>
{% endif %}
<p>{{ task_state.specific.get_comment }}</p>
{% endif %}
</td>
</tr>

Wyświetl plik

@ -3066,6 +3066,15 @@ class TaskState(MultiTableCopyMixin, models.Model):
instance.save()
return instance
def get_comment(self):
"""
Returns a string that is displayed in workflow history.
This could be a comment by the reviewer, or generated.
Use mark_safe to return HTML.
"""
return ""
class Meta:
verbose_name = _('Task state')
verbose_name_plural = _('Task states')