{% if "detail" in buttons %} {% endif %} {% if "changelog" in buttons %} {% endif %} {% if "approve" in buttons and have_permission and record.is_active_stage and can_approve and not record.approval_workflow.is_canceled %} {% if request.user not in record.users_that_already_approved %} {% else %} {% endif %} {% endif %} {% if "deny" in buttons and have_permission and record.is_active_stage and request.user not in record.users_that_already_approved and can_approve and not record.approval_workflow.is_canceled %} {% if request.user not in record.users_that_already_approved %} {% else %} {% endif %} {% endif %} {% if "comment" in buttons and have_permission and record.is_not_done_stage and not record.approval_workflow.is_canceled %} {% endif %}