<%= render Moderation::Shared::IndexComponent.new(@budget_investments) do %>
  <table>
    <thead>
      <tr>
        <th><%= t("moderation.budget_investments.index.headers.budget_investment") %></th>
        <th><%= t("moderation.budget_investments.index.headers.moderate") %></th>
      </tr>
    </thead>

    <tbody>
      <% @budget_investments.each do |investment| %>
        <tr id="investment_<%= investment.id %>">
          <td>
            <%= link_to investment.title, admin_budget_budget_investment_path(
                                            budget_id: investment.budget_id,
                                            id: investment.id
                                          ) %>
            <br>
            <span class="date"><%= l investment.updated_at.to_date %></span>
            <span class="bullet">&nbsp;&bull;&nbsp;</span>
            <%= investment.flags_count %><span class="icon-flag flag-disable"></span>
            <span class="bullet">&nbsp;&bull;&nbsp;</span>
            <%= investment.author.username %>
            <br>
            <div class="moderation-description">
              <%= wysiwyg(investment.description) %>
            </div>
          </td>
          <td class="text-center">
            <%= check_box_tag "budget_investment_ids[]", investment.id, nil, id: "#{dom_id(investment)}_check" %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>
