<div class="modal fade" id="modal-print-repository-row-label" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <% if @printers.size > 0 %>
        <%= form_tag print_repository_repository_rows_path do %>
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">
              <% if @repository_rows.size == 1 %>
                <%= t('repository_row.modal_print_label.head_title', repository_row: @repository_rows.first.name) %>
                <span class="id-label">
                  <%= t('repository_row.modal_print_label.id_label', repository_row_id: @repository_rows.first.code) %>
                </span>
              <% else %>
                <%= t('repository_row.modal_print_label.head_title_multiple', repository_rows: @repository_rows.size) %>
              <% end %>
            </h4>
          </div>
          <div class="modal-body">
            <% @repository_rows.each do |repository_row| %>
              <%= hidden_field_tag 'repository_row_ids[]', repository_row.id %>
            <% end %>
            <div class=printers-container>
              <label><%= t('repository_row.modal_print_label.printer') %></label>
              <%= select_tag :label_printer_id, options_for_select(@printers.map { |p| [p.display_name, p.id] }) %>
            </div>
            <p class="sci-input-container">
              <label><%= t('repository_row.modal_print_label.number_of_copies') %></label>
              <%= number_field_tag :copies, 1, min: 1, class: 'sci-input-field print-copies-input' %>
            </p>
          </div>
          <div class="modal-footer">
            <%= submit_tag t('repository_row.modal_print_label.print_label'), class: 'btn btn-primary' %>
          </div>
        <% end %>
      <% else %>
        <div class="modal-body no-printers-container">
          <button type="button" class="close modal-absolute-close-button" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <%= image_tag 'printers/no_available_printers.png' %>
          <p class="no-printer-title">
            <%= t('repository_row.modal_print_label.no_printers.title') %>
          </p>
          <p class="no-printer-body">
            <%= t('repository_row.modal_print_label.no_printers.description') %>
          </p>
        </div>
        <div class="modal-footer">
          <%= link_to t('repository_row.modal_print_label.no_printers.visit_blog'), Constants::SCINOTE_FLUICS_URL, class: "btn btn-primary", target: "_blank" %>
        </div>
      <% end %>
    </div>
  </div>
</div>
