Recht umgebaut

This commit is contained in:
holger.trampe 2020-10-11 12:46:52 +02:00
parent 8ada632aca
commit 8d14ad4b34
3 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,7 @@
{% extends "adm/adm_base.html" %} {% extends "adm/adm_base.html" %}
{% block content %} {% block content %}
{% load adm_tags %} {% load adm_tags %}
<!-- Mitarbeier ist immer der angemeledete!!! -->
<div class="content-section col-12"> <div class="content-section col-12">
<h4>{{user.get_full_name}} aus {{user.profile.agency.name}}</h4> <h4>{{user.get_full_name}} aus {{user.profile.agency.name}}</h4>
<hr> <hr>

View File

@ -1,4 +1,8 @@
{% load counter_tag %} {% load counter_tag %}
<!--
TASK:
-->
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-hover" id="usertableall"> <table class="table table-hover" id="usertableall">
<thead> <thead>
@ -14,7 +18,7 @@
</tr> </tr>
</thead> </thead>
<tbody id="tableresults"> <tbody id="tableresults">
{% for item in usersofagency %} {% for item in usersofagencytm %}
<tr> <tr>
<td>{{item.first_name }}</td> <td>{{item.first_name }}</td>
<td>{{ item.last_name }}</td> <td>{{ item.last_name }}</td>

View File

@ -402,9 +402,8 @@ def TimeManagement(request, activemonth=False, activeyear=False):
"workdays" : Workday.objects.filter(agency=request.user.profile.agency, user=request.user, start__month=activemonth, start__year=active_year).order_by("start").exclude(end=None), "workdays" : Workday.objects.filter(agency=request.user.profile.agency, user=request.user, start__month=activemonth, start__year=active_year).order_by("start").exclude(end=None),
"userhasworkdays" : user_has_workdays "userhasworkdays" : user_has_workdays
} }
#if(request.user.has_perm("users.usersmanager")):
if(request.user.has_perm("users.usersmanager")): context.update({"usersofagencytm" : User.objects.filter(profile__agency=request.user.profile.agency).order_by('last_name')})
context.update({"usersofagency" : User.objects.filter(profile__agency=request.user.profile.agency).order_by('last_name')})
return render(request, 'timemanagement/timemanagement_management.html', context) return render(request, 'timemanagement/timemanagement_management.html', context)