diff --git a/opentech/apply/funds/models.py b/opentech/apply/funds/models.py index e5f72cdfbeda01f63105e5afe0c3b1f28ed8da98..8f3558e6a329cdcf77523e946b93ae72318d0a4c 100644 --- a/opentech/apply/funds/models.py +++ b/opentech/apply/funds/models.py @@ -575,6 +575,12 @@ class ApplicationSubmission(WorkflowHelpers, BaseStreamForm, AbstractFormSubmiss def active(self): return self.status in active_statuses + @property + def last_edit(self): + # Best estimate of last edit + # TODO update when we have revisioning included + return self.activities.first() + def ensure_user_has_account(self): if self.user and self.user.is_authenticated: self.form_data['email'] = self.user.email diff --git a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html index dd6b4c23194fe2cb1b2eb55d171e64f0ca6d8df0..8c159b45df2f035ba710029b4155b989ac016e3f 100644 --- a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html +++ b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html @@ -48,6 +48,7 @@ <div> <h6 class="heading heading--submission-meta"> <span>Submitted: </span>{{ object.submit_time.date }} by {{ object.user.get_full_name }} + <span>Edited: </span>{{ object.last_edit.timestamp.date }} by {{ object.last_edit.user.get_full_name }} {% if request.user|has_edit_perm:object %} <a href="{% url 'funds:submissions:edit' object.id %}">Edit</a> {% endif %}