<span class="flag-content">
  <% if show_flag_action? investment %>
    <a id="flag-expand-investment-<%= investment.id %>" data-toggle="flag-drop-investment-<%= investment.id %>" title="<%= t('shared.flag') %>">
      <span class="icon-flag flag-disable"></span>
    </a>
    <span class="dropdown-pane" id="flag-drop-investment-<%= investment.id %>" data-dropdown data-auto-focus="true">
      <%= link_to t('shared.flag'), flag_budget_investment_path(investment.budget, investment.id),
                                    method: :put,
                                    remote: true,
                                    id: "flag-investment-#{ investment.id }" %>
    </span>
  <% end %>

  <% if show_unflag_action? investment %>
    <a id="unflag-expand-investment-<%= investment.id %>" data-toggle="unflag-drop-investment-<%= investment.id %>" title="<%= t('shared.unflag') %>">
      <span class="icon-flag flag-active"></span>
    </a>
    <span class="dropdown-pane" id="unflag-drop-investment-<%= investment.id %>" data-dropdown data-auto-focus="true">
      <%= link_to t('shared.unflag'), unflag_budget_investment_path(investment.budget, investment.id),
                                      method: :put,
                                      remote: true,
                                      id: "unflag-investment-#{ investment.id }" %>
    </span>
  <% end %>
</span>
