103 lines
3.6 KiB
HTML
103 lines
3.6 KiB
HTML
{% extends "users/base.html" %}
|
|
{% block content %}
|
|
<div class="content-section col-12">
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="#" onclick="javascript:goToStandardMain()">Standards</a></li>
|
|
<li class="breadcrumb-item active"><a href="#" onclick="javascript:goToArea('t_{{areaid}}')">{{areaname}}</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page"><a href="{% url 'standard-task' taskid %}">{{taskname}}</a></li>
|
|
</ol>
|
|
</nav>
|
|
<h4>Standards aus dem Tätigkeitsbereich {{taskname}} des Bereichs {{areaname}} von {{vieweduser.get_full_name}}
|
|
<a class="btn btn-primary btn-sm" href="{% url 'standard-add' %}" style="float: right;"><i class="fas fa-plus"></i> Standard</a>
|
|
</h4>
|
|
<hr>
|
|
<div class="col-12">
|
|
<table class="table hover " id="standardstable">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Titel</th>
|
|
<th scope="col">Erstellt von</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 item in standards_of_agency_task %}
|
|
{% if item.public or item.created_standard_by == user or perms.users.standardmanager %}
|
|
<tr>
|
|
<td><a href="{% url 'standard-single' item.pk %}">{{item.name}}</a></td>
|
|
<td>{{item.created_standard_by.first_name}} {{item.created_standard_by.last_name}}</td>
|
|
<td data-sort='{{ item.created_standard_date|date:"U"}}'>{{ item.created_standard_date|date:"d.m.Y, H:i"}}</td>
|
|
<td>{{ item.last_modified_by.first_name }} {{ item.last_modified_by.last_name }}</td>
|
|
<td data-sort='{{ item.created_standard_date|date:"U"}}'>{{ item.last_modified_on|date:"d.m.Y, H:i"}}</td>
|
|
<td>{{item.public|yesno:"Öffentlich,Nicht öffentlich"}}</td>
|
|
<td>
|
|
{% if item.created_standard_by == user or perms.users.standardmanager %}
|
|
<a style="float: right" class="btn btn-secondary btn-sm ml-2" href="{% url 'standard-delete' item.pk %}">
|
|
<small>
|
|
<i class="fas fa-trash"></i></small></a>
|
|
|
|
<a style="float: right" class="btn btn-secondary btn-sm " href="{% url 'standard-add' item.pk %}">
|
|
<small>
|
|
<i class="fas fa-pen"></i>
|
|
</small></a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
function goToStandardMain(){
|
|
localStorage.setItem('activeTab', "");
|
|
location.href = "{% url 'standards' %}";
|
|
}
|
|
|
|
function goToArea(name){
|
|
localStorage.setItem('activeTab', name);
|
|
location.href = "{% url 'standards' %}";
|
|
}
|
|
|
|
$(document).ready( function () {
|
|
|
|
|
|
$('#standardstable').DataTable({
|
|
order: [2, 'desc'],
|
|
responsive: true,
|
|
"language": {
|
|
"search" : "Suche",
|
|
"info": "Zeige _START_ bis _END_ of _TOTAL_ Einträgen",
|
|
"lengthMenu": "Zeige _MENU_ Einträge",
|
|
"zeroRecords": "Nichts gefunden",
|
|
"infoEmpty": "Keine Einträge",
|
|
"paginate": {
|
|
"first": "Erste",
|
|
"last": "Letzte",
|
|
"next": "Nächste",
|
|
"previous": "Zurück"
|
|
},
|
|
},
|
|
"pageLength": 50,
|
|
"buttons" : {
|
|
"className" : "btn-danger"
|
|
}
|
|
});
|
|
|
|
|
|
} );
|
|
</script>
|
|
<style>
|
|
/* DATATABLES */
|
|
.paginate_button {
|
|
padding: 0px !important;
|
|
border: 0px !important;
|
|
}
|
|
</style>
|
|
{% endblock content %}
|