{% load sekizai_tags static %} {% load guardian_tags %} {% load ochre %} {% if item.is_model or item.is_object %} {% get_obj_perms request.user for item as "perms" %} {% endif %} {% get_obj_perms request.user for documentation_model as "doc_perms" %} {% ochre_get_documentation_object request.path_info item as doc_info %} {% comment %}
{% if request.user.is_authenticated %} {% if item.is_model and not item.is_object and item.get_add_perm in perms %} {% include "ochre/template_pack/modal.html" with mode="create" uid=uid index=index csrf_token=csrf_token item=item serializer=serializer %} {% endif %} {% if item.is_object and item.get_change_perm in perms %} {% include "ochre/template_pack/modal.html" with mode="edit" uid=uid index=index csrf_token=csrf_token item=item %} {% endif %} {% if item.is_object and item.get_delete_perm in perms %} {% include "ochre/template_pack/modal.html" with mode="permissions" uid=uid index=index csrf_token=csrf_token item=item %} {% include "ochre/template_pack/modal.html" with mode="delete" uid=uid index=index csrf_token=csrf_token item=item %} {% endif %} {% if doc_info.can_edit %} {% include "ochre/template_pack/modal.html" with mode="documentation" uid=uid index=index csrf_token=csrf_token item=item doc_info=doc_info %} {% endif %} {% endif %}
{% if doc_info.object.id and doc_info.object.get_view_perm in doc_perms %}
{{doc_info.object.render|safe}}
{% endif %}
{% endcomment %}