<h4 class="header-underline">Evidence information
  <span class="actions pt-1">
    <div class="action">
      <div class="dropdown">
        <%= link_to 'javascript:void(0)', class: 'dropdown-toggle', data: { bs_toggle: 'dropdown' } do %>
          <i class="fa-solid fa-plus"></i> New Evidence
        <% end %>
        <%= render 'shared/templates_dropdown',
          name: 'Evidence',
          new_path: new_project_issue_evidence_path(current_project, @issue),
          category_id: nil
        %>
      </div>
    </div>
  </span>
</h4>

<% if @issue.affected.any? %>
  <% cache ['issue-evidence-tab', @issue, @issue.evidence] do %>
    <div data-behavior="datatable-paths"
      data-table-destroy-url="<%= multiple_destroy_project_issue_evidence_index_path(current_project, @issue) %>"
      data-table-destroy-confirmation="Are you sure?&#10;&#10;Proceeding will delete the selected evidence."
      data-table-close-console-url="<%= project_issue_path(current_project, @issue, tab: 'evidence-tab') %>">
      <%= render 'issues/evidence/table' %>
    </div>
  <% end %>
<% else %>
  <div class="empty-state mt-3">
    <div class="empty-state-icon">
      <%= image_tag "icons/#{rand(9)}.svg" %>
    </div>
    <div class="empty-state-body">
      <div class="container">
        <h4 class="empty-state-title">This issue doesn't have any evidence yet</h4>
        <p class="empty-state-body-text">Use evidence to detail changes from one instance of the vulnerability to the next: port number, specific versions, banners grabbed by scanners, etc.</p>
        <div class="empty-state-actions">
          <a href="https://dradis.com/support/guides/projects/issues.html"
          class="empty-state-docs-link" target="_blank">More about issues and evidence</a>
        </div>
      </div>
    </div>
  </div>
<% end %>
