diff --git a/opentech/apply/activity/templates/activity/include/listing_base.html b/opentech/apply/activity/templates/activity/include/listing_base.html index 8f13bc06b68f315de7e3a96c9ffbdeb9f0d0fa6c..95352d4d922dce15b32b2ffbb69523a802752db1 100644 --- a/opentech/apply/activity/templates/activity/include/listing_base.html +++ b/opentech/apply/activity/templates/activity/include/listing_base.html @@ -17,9 +17,9 @@ </a> </p> {% endif %} - {% if activity.edited %} - <p class="feed__meta-item feed__meta-item--last-edited">(Last edited: <span class="js-last-edited">{{ activity.edited|date:"Y-m-d H:i" }}</span>)</p> - {% endif %} + <p class="feed__meta-item feed__meta-item--last-edited" {% if not activity.edited %} hidden {% endif %}> + (Last edited: <span class="js-last-edited">{{ activity.edited|date:"Y-m-d H:i" }}</span>) + </p> {% endif %} {% if activity.private %} diff --git a/opentech/static_src/src/javascript/apply/edit-comment.js b/opentech/static_src/src/javascript/apply/edit-comment.js index c7245e2e8fc698fe5ba51e6fe30ebcb4f75660a7..3b7c3d88d3283c98bfad623468bb89a495e61d0d 100644 --- a/opentech/static_src/src/javascript/apply/edit-comment.js +++ b/opentech/static_src/src/javascript/apply/edit-comment.js @@ -123,7 +123,7 @@ const updateLastEdited = (el, date) => { const parsedDate = new Date(date).toISOString().split('T')[0]; const time = new Date(date).toLocaleTimeString([], {hour: '2-digit', minute: '2-digit'}); - + $(el).closest(feedContent).find(lastEdited).parent().attr('hidden', false); $(el).closest(feedContent).find(lastEdited).html(`${parsedDate} ${time}`); };