Stnadards Stuff etc.
This commit is contained in:
parent
753509926d
commit
195b20d930
|
|
@ -18,21 +18,17 @@
|
|||
{% endif%}
|
||||
</small>
|
||||
<small><br />
|
||||
Ansprechpartner:
|
||||
{% for taskuser in standard.task.usersfield.all %}
|
||||
<span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' taskuser.pk%}" style="color: #ffffff">{{taskuser.first_name}} {{taskuser.last_name}}</a></span>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if standard.authority %}
|
||||
Verantwortlicher: <a href="{% url 'orga-single' standard.authority.pk%}"> {{standard.authority.first_name}} {{standard.authority.last_name}}</a> |
|
||||
Verantwortlicher: <span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' standard.authority.pk%}" style="color: #ffffff"> {{standard.authority.first_name}} {{standard.authority.last_name}}</a></span> |
|
||||
{% endif %}
|
||||
|
||||
{% if standard.executor %}
|
||||
Ausführende Person: <a href="{% url 'orga-single' standard.executor.pk%}">{{standard.executor.first_name}} {{standard.executor.last_name}}</a> |
|
||||
Ausführende Person: <span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' standard.executor.pk%}" style="color: #ffffff">{{standard.executor.first_name}} {{standard.executor.last_name}}</a></span> |
|
||||
{% endif %}
|
||||
|
||||
{% if standard.representative %}
|
||||
Vertreter: <a href="{% url 'orga-single' standard.representative.pk%}">{{standard.representative.first_name}} {{standard.representative.last_name}}</a> |
|
||||
Vertreter: <span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' standard.representative.pk%}" style="color: #ffffff">{{standard.representative.first_name}} {{standard.representative.last_name}}</a></span> |
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,106 @@
|
|||
{% 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>
|
||||
<small>
|
||||
<h2>{{standard.name}}</h2>
|
||||
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}}
|
||||
{% if standard.created_standard_by == user or perms.users.standard_management %}
|
||||
| <a href="{% url 'standard-delete' standard.pk %}">Löschen</a>
|
||||
| <a href="{% url 'standard-update' standard.pk %}">Bearbeiten</a>
|
||||
{% endif%}
|
||||
</small>
|
||||
<small><br />
|
||||
Ansprechpartner:
|
||||
{% for taskuser in standard.task.usersfield.all %}
|
||||
<span class="badge badge-pill badge-primary" style="font-size: 1.1em; background-color: {{standard.task.area.color}}"><a href="{% url 'orga-single' taskuser.pk%}" style="color: #ffffff">{{taskuser.first_name}} {{taskuser.last_name}}</a></span>
|
||||
{% endfor %}
|
||||
|
||||
{% if standard.authority %}
|
||||
Verantwortlicher: <a href="{% url 'orga-single' standard.authority.pk%}"> {{standard.authority.first_name}} {{standard.authority.last_name}}</a> |
|
||||
{% endif %}
|
||||
|
||||
{% if standard.executor %}
|
||||
Ausführende Person: <a href="{% url 'orga-single' standard.executor.pk%}">{{standard.executor.first_name}} {{standard.executor.last_name}}</a> |
|
||||
{% endif %}
|
||||
|
||||
{% if standard.representative %}
|
||||
Vertreter: <a href="{% url 'orga-single' standard.representative.pk%}">{{standard.representative.first_name}} {{standard.representative.last_name}}</a> |
|
||||
{% endif %}
|
||||
|
||||
|
||||
</small>
|
||||
<hr>
|
||||
<div class="row col">
|
||||
|
||||
{% if standard.addedfiles.all|length == 0 and standard.linked_standards.all|length == 0 %}
|
||||
<div class="card col-12" style="min-height: 500px">
|
||||
{% else %}
|
||||
<div class="card col-9" 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>
|
||||
<!-- FILES -->
|
||||
<div class="col-3">
|
||||
{% if standard.addedfiles.all|length > 0 %}
|
||||
<div class="card col-14 ml-2 mb-3" style="">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Dateien</h5>
|
||||
<p class="card-text">
|
||||
{% for files in standard.addedfiles.all %}
|
||||
<a href="{{files.file.url}}" download>{{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-2" 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>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
Loading…
Reference in New Issue