  <% other_formats_links do |f| %>
    <%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
  <% end %>

  <div id="csv-export-options" style="display: none;">
    <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
    <%= form_tag(workloads_path(:format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
      <%= workload_params_as_hidden_field_tags(params) %>
      <p>
      <% if User.current.allowed_to_globally? :view_all_workloads %>
        <label><%= radio_button_tag 'filter_type[]', '', true %> <%= l("description_selected_#{filter_type(groups)}") %></label><br />
        <label><%= radio_button_tag 'filter_type[]', "all_#{filter_type(groups)}" %> <%= l("description_all_#{filter_type(groups)}") %></label>
      <% else %>
        <%= hidden_field_tag 'filter_type[]', '' %>
      <% end %>
      </p>
      <%= export_csv_encoding_select_tag %>
      <p class="buttons">
      <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);", :data => { :disable_with => false }, id: 'csv-export-button' %>
      <%= link_to_function l(:button_cancel), "hideModal(this);" %>
      </p>
    <% end %>
  </div>
