{% extends "users/base.html" %} {% load counter_tag %} {% block content %}

{{standard.name}} {% checkifsharedstandardinagency request.user.profile.agency standard as isshared %} {% if isshared == False and standard.agency != request.user.profile.agency %} {% elif standard.agency == request.user.profile.agency %} Standard ist aus ihrer Agentur {% else %} Standard übernommen {% endif %}


{% 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 %}
{% else %}
{% endif %}

{{standard.media}} {{standard.content|safe}}

{% if standard.freefield_title|length > 0 %}
{{standard.freefield_title}}

{{standard.freefield_content}}

{% endif %} {% if standard.addedfiles.all|length > 0 %}
Dateien

{% for files in standard.addedfiles.all %} {{files.name|truncatechars:30}} {% endfor %}

{% endif %}
Erstellt in Agentur {{standard.agency.name}} und zuletzt bearbeitet am {{ standard.last_modified_on}}. Der Standard wurde bereits {{standard.agencynetworkcounter}} mal übernommen.

{{comments|length}} {% if comments|length == 1 %} Kommentar {% elif comments|length == 0 %} Kommentare {% else %} Kommentare {% endif %}

{% getifuserdidcomment standard request.user as userdidcomment%} {% if userdidcomment == False %} {% else %} Sie haben diesen Standard bereits kommentiert. {% endif %}
{% if userdidcomment == False %} {% endif %}

{% for comment in comments %} {% getcommentstat_user comment.pk request.user as cstat %}
Von {{comment.comment_by.first_name}} {{comment.comment_by.last_name}} am {{comment.last_modified_on|date:"d.m.Y H:i"}}
{{comment.content}}
  {% getcommentsdown comment.pk as cdown %} {% if cdown > 0 %}{{cdown}}   {% endif %}   {% getcommentsup comment.pk as cup %} {% if cup > 0 %}{{cup}}{% endif %} {% if comment.comment_by == request.user or standard.created_standard_by == request.user or standard.last_modified_by == request.user %} {% endif %}

{% endfor %}
{% endblock content %}