103 lines
4.3 KiB
HTML
103 lines
4.3 KiB
HTML
{% extends "users/base.html" %}
|
|
{% block content %}
|
|
<div class="content-section col-12">
|
|
<h3>Standards</h3>
|
|
<small>Sichtbar sind alle veröffentlichten und von {{ user.first_name }} {{ user.last_name}} erstellten Standards.</small>
|
|
<hr>
|
|
<p>
|
|
Standards dokumentieren und erläutern verschiedenen Verfahren, strukturiert nach Bereichen und Aufgaben.
|
|
</p>
|
|
<div class="row">
|
|
<div class="content-section col-4">
|
|
<a class="btn btn-primary" href="{% url 'standard-add' %}">Neuen Standard anlegen</a>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<ul class="nav nav-tabs" id="area_tabs" role="tablist">
|
|
{% for area in areas %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" id="{{area.id}}" data-toggle="tab" href="#t_{{area.id}}" role="tab" aria-controls="t_{{area.id}}" aria-selected="false">{{area.name}}</a>
|
|
</li>
|
|
{% endfor %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" id="userown" data-toggle="tab" href="#t_userown" role="tab" aria-controls="t_userown" aria-selected="false">Eigene Standards</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="col">
|
|
<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}}">
|
|
<h5 class="mt-3">Standards aus dem Bereich {{area.name}}</h5>
|
|
<hr>
|
|
|
|
{% 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 %}
|
|
|
|
</div>
|
|
{% endfor %}
|
|
<div class="tab-pane fade" id="t_userown" role="tabpanel" aria-labelledby="userown">
|
|
<h4 class="mt-4 mb-4">Ihre Standards</h4>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Titel</th>
|
|
<th scope="col">Erstellt am</th>
|
|
<th scope="col">Geändert von</th>
|
|
<th scope="col">Geändert am</th>
|
|
<th scope="col">Öffentlichkeitsstatus</th>
|
|
<th scope="col"> </th>
|
|
</tr>
|
|
</thead>
|
|
{% for standard in standards_of_user %}
|
|
<tr>
|
|
<td><a href="{% url 'standard-single' standard.pk %}">{{standard.name}}</a></td>
|
|
<td>{{standard.created_standard_date|date:"d.m.Y, H:i"}}</td>
|
|
<td>{{standard.last_modified_by.first_name}} {{standard.last_modified_by.last_name}}</td>
|
|
<td>{{standard.last_modified_on|date:"d.m.Y, H:i"}}</td>
|
|
<td>{{standard.public|yesno:"Öffentlich,Nicht öffentlich"}}</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">
|
|
<i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
|
|
<a class="dropdown-item" href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
|
<div class="dropdown-divider"></div>
|
|
<a class="dropdown-item text-danger" href="{% url 'standard-delete' standard.pk %}" >Löschen</a>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$('#area_tabs li:first-child a').tab('show');
|
|
})
|
|
|
|
|
|
$('#area_tabs a').on('click', function (e) {
|
|
e.preventDefault()
|
|
$(this).tab('show')
|
|
});
|
|
</script>
|
|
{% endblock content %} |