{% for subform in member_perms_form.members_permissions %}
  {% set ppoc = subform.member_id.data == ppoc_id %}
  {% set heading_perms = [subform.perms_app_mgmt, subform.perms_funding, subform.perms_reporting, subform.perms_portfolio_mgmt] %}

  <tr>
    <td class='name'>{{ subform.member_name.data }}
      <div>
        {% if ppoc %}
          <span class='you'>PPoC</span>
        {% endif %}
        {% if subform.member_id.data == current_member_id %}
          <span class='you'>(<span class='green'>you</span>)</span>
        {% endif %}
      </div>
    </td>

    {% for access in heading_perms %}
      {% if dict(access.choices).get(access.data) == ('portfolios.members.permissions.edit_access' | translate)  %}
        <td class='green'>{{ 'portfolios.members.permissions.edit_access' | translate }}</td>
      {% else %}
        <td>{{ 'common.view' | translate }}</td>
      {% endif %}
    {% endfor %}

  </tr>
{% endfor %}
