151 lines
5.9 KiB
HTML
151 lines
5.9 KiB
HTML
{% extends "users/base.html" %}
|
|
{% load counter_tag %}
|
|
{% block content %}
|
|
<div class="content-section col-12">
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="{% url 'standards' %}">Standards</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page"><a href="{% url 'standard-area' standard.area.pk %}">{{standard.area.name}}</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page"><a href="{% url 'standard-task' standard.task.pk %}">{{standard.task.name}}</a></li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<h2>{{standard.name}}
|
|
|
|
<span style="float: right">
|
|
{% if standard.created_standard_by == user or perms.users.standard_management %}
|
|
<a style="float: right" class="btn btn-secondary btn-sm ml-2" href="{% url 'standard-delete' standard.pk %}"><small><i class="fas fa-trash"></i></small></a>
|
|
<a style="float: right" class="btn btn-secondary btn-sm " href="{% url 'standard-update' standard.pk %}"><small><i class="fas fa-pen"></i></small></a>
|
|
{% endif %}
|
|
</span>
|
|
</h2>
|
|
|
|
<hr>
|
|
<div class="row col">
|
|
|
|
{% if standard.addedfiles.all|length > 0 or standard.linked_standards.all|length > 0 or standard.authority.count > 0 or standard.executor.count > 0 or standard.representative.count > 0 or standard.addedfiles.all|length > 0 or standard.linked_standards.all|length > 0 or standard.freefield_title|length > 0 %}
|
|
<div class="card col-9" style="min-height: 500px">
|
|
{% else %}
|
|
<div class="card col-12" style="min-height: 500px">
|
|
{% endif %}
|
|
<div class="card-body">
|
|
<h5 class="card-title"></h5>
|
|
<p class="card-text">
|
|
{{standard.media}}
|
|
{{standard.content|safe}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- PERSONEN -->
|
|
{% if standard.authority.count > 0 or standard.executor.count > 0 or standard.representative.count > 0 or standard.addedfiles.all|length > 0 or standard.linked_standards.all|length > 0 or standard.freefield_title|length > 0 %}
|
|
<div class="col-3">
|
|
|
|
|
|
{% if standard.freefield_title|length > 0 %}
|
|
<div class="card col-14 ml-1 mb-2" style="">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{standard.freefield_title}}</h5>
|
|
<p class="card-text">
|
|
{{standard.freefield_content}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% if standard.authority.count > 0 or standard.executor.count > 0 or standard.representative.count > 0 %}
|
|
<div class="card col-14 ml-1 mb-2" style="">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Personen</h5>
|
|
<p class="card-text">
|
|
|
|
{% if standard.authority.count > 0 %}
|
|
Verantwortlich: <br />
|
|
{% for u in standard.authority.all %}
|
|
<a href="{% url 'orga-single' u.pk%}"> {{u.first_name}} {{u.last_name}}</a>{% if forloop.counter < standard.authority.count%} | {% endif %}
|
|
{% endfor %}
|
|
<br />
|
|
{% endif %}
|
|
|
|
{% if standard.executor.count > 0 %}
|
|
Ausführende:<br />
|
|
{% for u in standard.executor.all %}
|
|
<a href="{% url 'orga-single' u.pk%}"> {{u.first_name}} {{u.last_name}}</a>{% if forloop.counter < standard.executor.count%} | {% endif %}
|
|
{% endfor %}
|
|
<br />
|
|
{% endif %}
|
|
|
|
{% if standard.representative.count > 0 %}
|
|
Vertreter:<br />
|
|
{% for u in standard.representative.all %}
|
|
<a href="{% url 'orga-single' u.pk%}"> {{u.first_name}} {{u.last_name}}</a>{% if forloop.counter < standard.representative.count%} | {% endif %}
|
|
{% endfor %}
|
|
<br />
|
|
{% endif %}
|
|
|
|
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
|
|
<!-- FILES -->
|
|
|
|
{% if standard.addedfiles.all|length > 0 %}
|
|
<div class="card col-14 ml-1 mb-2" style="">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Dateien</h5>
|
|
<p class="card-text">
|
|
{% for files in standard.addedfiles.all %}
|
|
<a href="{% url 'cloud-td' files.pk %}" target="_blank">{{files.name|truncatechars:30}}</a><br />
|
|
{% endfor %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<!-- STANDARDS -->
|
|
{% if standard.linked_standards.all|length > 0 %}
|
|
<div class="card col-14 ml-1" style="">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Verwandte Standards</h5>
|
|
<p class="card-text">
|
|
{% for standard in standard.linked_standards.all %}
|
|
|
|
|
|
{% setbool False %}
|
|
{% for ag in standard.visibleby.all %}
|
|
{% if request.user|has_group:ag.group.name %}
|
|
{% setbool True %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
{% if standard.visibleby.all|length == 0 %}
|
|
{% setbool True %}
|
|
{% endif %}
|
|
|
|
{% getbool as groupchecker %}
|
|
|
|
{% if groupchecker %}
|
|
<a href="{% url 'standard-single' standard.pk %}">{{standard.name|truncatechars:30}}</a><br />
|
|
{% else %}
|
|
<i class="fas fa-lock"></i> {{standard.name|truncatechars:30}}</p>
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="mt-2">
|
|
<small>
|
|
Erstellt durch <a href="{% url 'orga-single' standard.created_standard_by.pk %}">{{standard.created_standard_by.first_name}} {{standard.created_standard_by.last_name}}</a> am {{standard.created_standard_date}} | Zuletzt bearbeitet von <a href="{% url 'orga-single' standard.last_modified_by.pk %}">{{ standard.last_modified_by.first_name}} {{ standard.last_modified_by.last_name}}</a> am {{ standard.last_modified_on}}
|
|
</small>
|
|
</div>
|
|
</div>
|
|
{% endblock content %} |