mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +08:00
69 lines
3.9 KiB
Text
69 lines
3.9 KiB
Text
<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">
|
|
<div class="printers-available <%='hidden' if @printers.blank? %>">
|
|
<%= form_tag print_repository_repository_rows_path, { class: "print-label-form",
|
|
data: { remote: true, zebra_progress: print_zpl_repository_repository_rows_path,
|
|
valid_columns: validate_label_template_columns_repository_repository_rows_path } } do %>
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<p 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 %>
|
|
</p>
|
|
</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>
|
|
<% if @printers.present? %>
|
|
<%= select_tag :label_printer_id, options_for_select(@printers.map { |p| [p.display_name, p.id,
|
|
{'data-params' => {type: p.type_of, name:p.display_name}.to_json}] }) %>
|
|
<% else %>
|
|
<%= select_tag :label_printer_id, {} %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class=labels-container>
|
|
<label><%= t('repository_row.modal_print_label.label') %></label>
|
|
<%= select_tag :label_template_id, options_for_select(@label_templates.map { |p| [p.name, p.id,
|
|
{'data-params' => {type: p.type, default: p.default}.to_json}] }) %>
|
|
<div class="label-template-warning"></div>
|
|
</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">
|
|
<button type='button' class='btn btn-default' data-dismiss='modal'><%= t('general.cancel')%></button>
|
|
<%= submit_tag t('repository_row.modal_print_label.print_label'), class: 'btn btn-primary print-button' %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div class="no-printers-available <%='hidden' if @printers.present? %>">
|
|
<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">×</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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|