diff --git a/dasettings/templates/dasettings/freedays_add_multiple.html b/dasettings/templates/dasettings/freedays_add_multiple.html deleted file mode 100755 index 37c30a2..0000000 --- a/dasettings/templates/dasettings/freedays_add_multiple.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "users/base.html" %} -{% load crispy_forms_tags %} -{% block content %} -{% if request.user.profile.agency.module_timemanagement %} -
-

Feiertage anlegen

-
-
- {% csrf_token %} - {{form.media}} - {{ form|crispy }} -
-   - Abbrechen -
-
-{% else %} -

Das Modul Abwesenheitsplanung wurden in ihrer Agentur deaktiviert.

-{% endif %} -{% endblock content %} diff --git a/dasettings/templates/dasettings/freedays_management.html b/dasettings/templates/dasettings/freedays_management.html index dcd9bfc..d30b4d7 100644 --- a/dasettings/templates/dasettings/freedays_management.html +++ b/dasettings/templates/dasettings/freedays_management.html @@ -29,7 +29,7 @@ {% if user|usergperm:"moduleorganizer" %} - + {% endif %} @@ -38,6 +38,7 @@ + + + + + + diff --git a/timemanagement/templates/timemanagement/tm_ab_management.html b/timemanagement/templates/timemanagement/tm_ab_management.html index 1dc5084..f5aae5c 100644 --- a/timemanagement/templates/timemanagement/tm_ab_management.html +++ b/timemanagement/templates/timemanagement/tm_ab_management.html @@ -10,11 +10,7 @@
- {% if yearinfo != False %} -

Verbrauchte Urlaubstage: {{yearinfo.days_inuse}} | Verfügbar: {{yearinfo.days}}

- {% else %} -

Keine Abwesenheitsinformationen vorhanden

- {% endif %} +
-
- -
+
@@ -478,24 +472,6 @@ $('#absencetabs a').on('click', function (e) { - {% else %} diff --git a/timemanagement/templates/timemanagement/tm_ab_userown.html b/timemanagement/templates/timemanagement/tm_ab_userown.html index aa18020..1db3531 100644 --- a/timemanagement/templates/timemanagement/tm_ab_userown.html +++ b/timemanagement/templates/timemanagement/tm_ab_userown.html @@ -1,4 +1,39 @@ -
+{% load l10n %} +{% load mathfilters %} +
+
+
+
+ +
+ +
+
+
Übersicht
+ + + + + + + + + + + + + + + + +
Gesamturlaub{{yearinfo.days}} Tage
Genommener Urlaub{{yearinfo.days_inuse}} Tage
Resturlaub{{yearinfo.days|sub:yearinfo.days_inuse}} Tage
+ +
+
+
+ + +
@@ -23,10 +58,11 @@
+ +
+ \ No newline at end of file diff --git a/timemanagement/views.py b/timemanagement/views.py index 09f9ada..78e68ab 100644 --- a/timemanagement/views.py +++ b/timemanagement/views.py @@ -19,6 +19,7 @@ from datetime import timedelta from django.db.models.signals import post_save from users.signals import save_newabsence +# Load freedays def loadingFreeDays(plz): # Getting land @@ -158,8 +159,8 @@ def AbsenceManagmenet(request, activemonth=False, activeyear=False): yearinfo = False try: yearinfo = list(UserYearAbsenceInfo.objects.filter(year=activeyear, user=request.user))[0] - inuse = int(yearinfo.days_inuse) - kontingent = int(yearinfo.days) + inuse = yearinfo.days_inuse + kontingent = yearinfo.days - inuse except: pass @@ -404,7 +405,7 @@ def TimeAjax(request): end_day = request.GET["enddate"].split("__") end_day_obj = datetime.date(int(end_day[0]), int(end_day[1]), int(end_day[2])) - + try: holidayloose_date = datetime.date(start_day_obj.year, int(usertimedata.loose_holidedate.split(".")[1]), int(usertimedata.loose_holidedate.split(".")[0])) except: diff --git a/users/templates/users/base.html b/users/templates/users/base.html index de767e8..074fb64 100644 --- a/users/templates/users/base.html +++ b/users/templates/users/base.html @@ -279,7 +279,7 @@ {% endif %} -