#163 Checked icons improvement

* adds a second star icon on currently unchecked but previously checked entries
   --> can be detected easier for another check run
* simplifies some related code parts
* moves some translation string into message_templates.py
* enables session timeout after 60 minutes
* improves comment card layout sizing
* adds/updates translations
This commit is contained in:
2022-05-30 10:26:34 +02:00
parent fbab67f897
commit 1e86a1ce5e
15 changed files with 186 additions and 120 deletions

View File

@@ -408,6 +408,20 @@ class CheckableObjectMixin(models.Model):
self.log.add(action)
return action
def get_last_checked_action(self):
""" Getter for the most recent checked action on the log
Returns:
previously_checked (UserActionLogEntry): The most recent checked action
"""
from user.models import UserAction
previously_checked = self.log.filter(
action=UserAction.CHECKED
).order_by(
"-timestamp"
).first()
return previously_checked
class ShareableObjectMixin(models.Model):
# Users having access on this object