{% extends 'audit_log/events/_base.html' %}

{% block content %}
  {% if event.changed_state.role %}
    from role "{{ event.changed_state.role[0] }}" to "{{ event.changed_state.role[1] }}"
    <br>
  {% endif %}

  for User <code>{{ event.event_details.updated_user_id }}</code> ({{ event.event_details.updated_user_name }})

  {% if event.event_details["environment"] %}
    <br>
    in Environment <code>{{ event.event_details["environment_id"] }}</code> ({{ event.event_details["environment"] }})
    <br>
    in Application <code>{{ event.event_details["application_id"] }}</code> ({{ event.event_details["application"] }})
    <br>
    in Portfolio <code>{{ event.event_details["portfolio_id"] }}</code> ({{ event.event_details["portfolio"] }})
  {% endif %}
{% endblock %}
