{% load i18n learning %} {# object: instance of BasicObjectMixin #} {# object_collaborator : instance of ObjectCollaboratorMixin#} {# page_obj: paginator object with instances of ObjectCollaboratorMixin #} {% if page_obj.object_list %}
{% trans "Name" %} | {% trans "Role" %} | {% trans "Permissions" %} | |
---|---|---|---|
{{ object_collaborator.collaborator }} | {{ object_collaborator.get_role_display }} | {% if course.access == "PRIVATE" or activity.access == "PRIVATE" or resource.access == "PRIVATE" %} {% else %} {% get_object_perms object object_collaborator.collaborator as collaborator_object_perms %} {% for permission in collaborator_object_perms %} {% get_permission_icon permission object as icon %} {{ icon }} {% endfor %} {% endif %} | {% if "change_collaborator_"|add:object_name in object_perms %} {% with "learning:"|add:object_name|add:"/detail/collaborator/change" as target_url %} {% include "learning/_includes/collaborators/change_collaborator_on_object.html" with object=object object_collaborator=object_collaborator target_url=target_url %} {% endwith %} {% endif %} {% if "delete_collaborator_"|add:object_name in object_perms %} {% with "learning:"|add:object_name|add:"/detail/collaborator/delete" as target_url %} {% include "learning/_includes/collaborators/delete_collaborator_on_object.html" with object=object object_collaborator=object_collaborator target_url=target_url %} {% endwith %} {% endif %} |
{% blocktrans count counter=number_collaborator %}You have only one collaborator.{% plural %}You have {{ counter }} collaborators.{% endblocktrans %}
{% include "learning/_includes/paginator_buttons.html" with current_page=page_obj %} {% else %}