{% load guardian_tags %} {% get_obj_perms request.user for item as "obj_perms" %}
{{item.name}}
{% if slide_model.get_add_perm in perms %} {% include "ochre/template_pack/modal.html" with mode="create" index=index uid=uid index="0" csrf_token=csrf_token item=slide_model serializer=serializer %} {% endif %} {% if item.get_change_perm in obj_perms %} {% include "ochre/template_pack/modal.html" with mode="edit" uid=uid index=index csrf_token=csrf_token item=item %} {% endif %} {% if item.get_delete_perm in obj_perms %} {% include "ochre/template_pack/modal.html" with mode="permissions" uid=uid index=index csrf_token=csrf_token item=item %} {% endif %} {% if item.get_delete_perm in obj_perms %} {% include "ochre/template_pack/modal.html" with mode="delete" uid=uid index=index csrf_token=csrf_token item=item %} {% endif %}