{% if edit_type == 'homepage' or edit_type == 'page' %} {% if perms.autodidact.change_page %} Edit this page {% endif %} {% endif%} {% if edit_type == 'course' %} {% if perms.autodidact.change_course %} Edit this course {% endif %} {% endif%} {% if edit_type == 'session' %} {% if request.user.is_staff and perms.autodidact.change_session %} Edit this session {% endif %} {% endif %} {% if edit_type == 'assignment' %} {% if perms.autodidact.change_assignment %} Edit this assignment {% endif %} {% if perms.autodidact.change_step %} - Edit this step - Add new step {% endif %} {% endif %}