Ansicht Standards Fertig

This commit is contained in:
Holger Trampe 2019-12-09 17:27:15 +01:00
parent ede475d3a1
commit 04f2dd24a6
59 changed files with 19 additions and 27 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Binary file not shown.

View File

@ -30,31 +30,24 @@
<div class="tab-content" id="area_contents">
{% for area in areas %}
<div class="tab-pane fade" id="t_{{area.id}}" role="tabpanel" aria-labelledby="{{area.id}}">
<table class="table">
<thead>
<tr>
{% for task in tasks %}
{% if task.area == area %}
<th scope="col">{{task.name}}</th>
{% endif %}
{% endfor %}
</tr>
{% for task in tasks %}
{% for standard in standards_of_agency %}
<tr>
{% if standard.task == task %}
<td>{{standard.name}}</td>
{% endif %}
</tr>
<h5 class="mt-3">Standards aus dem Bereich {{area.name}}</h5>
<hr>
{% endfor %}
{% endfor %}
{% for task in tasks %}
{% if task.area == area %}
<div class="card text-center mt-1 mr-3 mb-3" style="width: 18rem; float: left">
<div class="card-body">
<h5 class="card-title">{{task.name}}</h5>
{% for standard in standards_of_agency %}
{% if standard.task == task and standard.area == area %}
<p class="card-text"><a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a></p>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% endfor %}
</table>
<hr>
</div>
{% endfor %}

View File

@ -11,8 +11,8 @@
<a class="btn btn-primary" href="{% url 'tasks-addtask' %}">Neue Aufgabe anlegen</a>
</div>
</div>
<hr>
<div class="row">
<div class="row mt-3">
<table class="table">
<thead>
@ -30,7 +30,6 @@
<td>{{ item.area.name }}</td>
<td>{{ item.created_area_by.first_name }} {{ item.created_area_by.last_name }}</td>
<td>{{ item.created_area_date }}</td>
<td>{{standard.created_standard_by.first_name}} {{standard.created_standard_by.last_name}}</td>
<td>
<div class="dropdown no-arrow">
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

View File

@ -18,7 +18,7 @@ class TasksManagement(LoginRequiredMixin, ListView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
# # Get all Users of the Same Agency as logged user
tasks_of_agency = Tasks.objects.filter(agency__pk=self.request.user.profile.agency.pk)
tasks_of_agency = Tasks.objects.filter(agency__pk=self.request.user.profile.agency.pk).order_by('name')
context.update({'active_link' : 'tasksmanagement', 'tasks_of_agency':tasks_of_agency})
return context