<%
  item_css = ['list-item']
  item_css << ' active' if (request.format.html? and @issue == issue)
%>

<%= content_tag :div, id: "#{dom_id(issue)}_link", class: item_css.join do %>
  <%= link_to  main_app.project_issue_path(current_project, issue) do %>
    <%= colored_icon_for_model(issue, 'fa-bug', 'list-item-icon') %>
    <%= issue.title %>
  <% end %>

  <div class="list-item-actions">
    <%= link_to main_app.edit_project_issue_path(current_project, issue), class:'list-item-action-edit' do %>
      <i class="fa-solid fa-pencil fa-fw"></i><span class="visually-hidden">Edit</span>
    <% end %>

    <%= link_to main_app.project_issue_path(current_project, issue),
        method: :delete,
        data: { confirm: "Are you sure?\n\nProceeding will delete this issue and any associated evidence." },
        class: 'list-item-action-delete' do %>
      <i class="fa-solid fa-trash fa-fw"></i><span class="visually-hidden">Delete</span>
    <% end %>
  </div>

<% end %>
