<%#
  Copyright (C) 2022  The Software Heritage developers
  See the AUTHORS file at the top-level directory of this distribution
  License: GNU Affero General Public License version 3, or any later version
  See top-level LICENSE file for more information
%>

<div class="card">
  <div class="card-header" id="heading<%= index %>}">
    <h2 class="mb-0">
      <button class="btn btn-link" type="button" data-toggle="collapse" data-target="#collapse<%= index %>"
              aria-expanded="true" aria-controls="collapse$<%= index %>">
        From <%= event.actor %> (<%= event.actor_role %>) on <%= event.date.slice(0, 16) %>
        <%if (event.new_status !== null) { %>
        <span style="padding-left: 10px;">New status:<span> <%= event.new_status %>
        <% } %>
      </button>
    </h2>
  </div>
  <div id="collapse<%= index %>" class="collapse" aria-labelledby="headingOne" data-parent="#requestHistory">
    <div class="card-body">
      <p><%= event.text %></p>
      <%if (event.new_status !== null) { %>
        <p>
         <span>Status changed to:<span> <strong><%= event.new_status %></strong>
        </p>
      <% } %>
    </div>
  </div>
</div>
