diff --git a/adm/templates/adm/adm_agencys.html b/adm/templates/adm/adm_agencys.html index d8772b3..4cd5e12 100644 --- a/adm/templates/adm/adm_agencys.html +++ b/adm/templates/adm/adm_agencys.html @@ -3,6 +3,8 @@ {% load adm_tags %}
| {{abday.end|date:"d.M Y"}} | {{abday.reason.name}} | {{abday.info}} | -{% if abday.confirm_status == 0 %} Genehmigt {% elif abday.confirm_status == 1 %} Beantragt {% else %} Abgelehnt {% endif %} | +{% if abday.confirm_status == 0 %} {% elif abday.confirm_status == 1 %} Beantragt {% else %} {% endif %} |
diff --git a/timemanagement/templates/timemanagement/tm_ab_update.html b/timemanagement/templates/timemanagement/tm_ab_update.html
index e30dfb2..64c9c38 100644
--- a/timemanagement/templates/timemanagement/tm_ab_update.html
+++ b/timemanagement/templates/timemanagement/tm_ab_update.html
@@ -8,6 +8,11 @@
Abwesenheit von {{absence.user.first_name}} {{absence.user.last_name}} Bearbeiten+ {% getLastEditedAbsence absence as absencehistorie %} + + {% if absencehistorie.history_user != None %} + Zuletzt bearbeitet von {{absencehistorie.history_user.first_name}} {{absencehistorie.history_user.last_name}} am {{absencehistorie.history_date|date:"d.m.Y, H:i"}} + {% endif %}
diff --git a/timemanagement/templates/timemanagement/tm_ab_userown.html b/timemanagement/templates/timemanagement/tm_ab_userown.html
index bf88b24..d82c3d6 100644
--- a/timemanagement/templates/timemanagement/tm_ab_userown.html
+++ b/timemanagement/templates/timemanagement/tm_ab_userown.html
@@ -59,8 +59,9 @@
Start |
Ende |
Grund |
- Status |
+ Antrag |
Begründung |
+ Status |
| {{abday.start|date:"d.M Y"}} | {{abday.end|date:"d.M Y"}} | {{abday.reason.name}} | -{% if abday.confirm_status == 0 %} Genehmigt {% elif abday.confirm_status == 1 %} Beantragt {% else %} Abgelehnt {% endif %} | +{{abday.info}} | {{abday.confirm_info}} | +{% if abday.confirm_status == 0 %} {% elif abday.confirm_status == 1 %} Beantragt {% else %} {% endif %} | {% endfor %} diff --git a/users/models.py b/users/models.py index 8ae4bef..e273f2d 100644 --- a/users/models.py +++ b/users/models.py @@ -7,7 +7,7 @@ from django.utils import timezone from django.contrib.auth.models import User, Group, Permission from django.contrib.contenttypes.models import ContentType import datetime - +from simple_history.models import HistoricalRecords # UNIQUE and NO BLANK fields while user-registration User._meta.get_field('email')._unique = True User._meta.get_field('email').blank = False @@ -515,15 +515,26 @@ class RegNotfallhilfe(models.Model): wassend = models.BooleanField(default=False) orderdate = models.DateField(default=timezone.now, null=True) - - # SUBCLASS class UserFullName(User): - class Meta: - proxy = True - def __unicode__(self): - return "placeholder" + history = HistoricalRecords() + + class Meta: + proxy = True + + def __unicode__(self): + return "placeholder" + + def __str__(self): + return f'{self.first_name + " " + self.last_name}' + +# Hier Audit-Logeinträge einbauen für die versch. Models +from django.utils.six import python_2_unicode_compatible +from auditlog.registry import auditlog + +auditlog.register(User) +auditlog.register(Agency) + + - def __str__(self): - return f'{self.first_name + " " + self.last_name}' \ No newline at end of file diff --git a/users/templates/users/base.html b/users/templates/users/base.html index 7c3c90e..d548032 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -305,7 +305,7 @@ Impressum