<% ch_pp2 = true %> <% int_pp2 = 1 %> <% if (@current_params[:hide_pp2] && @current_params[:hide_pp2].to_i == 0) %> <% ch_pp2 = false %> <% int_pp2 = 0 %> <% end %>
<%= form_tag({controller: "searches", action: "create"}, id: "pw_search_form", name: "pw_search_form", class: "form-inline" ) do %>

<%= hidden_field_tag(:hide_pp2, int_pp2) %> <% if @providers.count > 1 && !(Server.type_is?('PIXTECH'))%> <%= check_box_tag :res_per_prov,0,@current_params[:res_per_prov] %> <%= label_tag :res_per_prov, I18n.t('results_by_provider', provider_word: I18n.t(session[:provider_word], count: 1)) %> <% end %> <% unless ( Server.itself?(PP2_SERVER_NAME) || Server.itself?(PTREF_SERVER_NAME) || Server.type_is?('PIXTECH') || @show_pp2_results == 'false' ) %> <%= check_box_tag :res_pp2, 1, ch_pp2 %> <%= label_tag :res_pp2, 'PP2' %> <% end %> <%= text_field_tag :key_words, @current_params['key_words'], maxlength: 2000, size: 40, class: 'form-control input-xs' %> <%= submit_tag 'OK', class: 'btn btn-primary', style: 'font-weight: bold;' %> <% if show_paris2024 %> <%= check_box_tag :paris2024, 1, @current_params['paris2024']=='1' %> <%= label_tag :paris2024, t('paris2024') %> <% end %> <%= hidden_field_tag 'default_per_page', current_user.setting.default_per_page %> <%#= hidden_field_tag 'ppp_res', @current_params['ppp_res'] %> <% if session[:pixtech] && !session[:pixtech].blank? && Pixways.get_pixtech_param_value(session[:pixtech],'automatic_images_flow')!='true' && Server.itself?(PIXADMIN_SERVER_NAME) %> <%= label_tag t(Pixways.get_pixtech_param_value(session[:pixtech],'flow_label','flow_label')) %> <%= select_tag(:flow, options_for_select(@flow_select, @current_params['flow']), :class => 'form-control input-xs') %> <% end %> <% if Server.type_is?('PIXTECH') %> <% if session[:pixtech] && session[:pixtech].partition('_vitrine')[0] == 'saif' %> <%= label_tag I18n.t('supplemental_category_saif') %> <%= select_tag(:supplemental_category, options_for_select(SAIF_SUPP_CATEGORY_LIST, @current_params['supplemental_category']), include_blank: true, class: 'form-control input-xs') %> <%#= label_tag I18n.t('category_saif') %> <%#= select_tag(:category, options_for_select(SAIF_CATEGORY_LIST, @current_params['category']), include_blank: true, class: 'form-control input-xs') %> <% end %> <% else %> <%= label_tag 'Médias' %> <%= select_tag(:media_typ, options_for_select([[I18n.t('all'), 'all'], ['Photos', 'photos'], ['Vidéos', 'videos']], @current_params['media_typ']), :class => 'form-control input-xs') %> <%= label_tag I18n.t('search_since') %> <%= select_tag(:search_since, options_for_select([ [I18n.t('all'), 'all'], [I18n.t('10_minutes'), '10_minutes'], [I18n.t('1_hour'), '1_hour'], [I18n.t('1_day'), '1_day'], [I18n.t('1_week'), '1_week'], [I18n.t('1_month'), '1_month'], [I18n.t('3_month'), '3_month'] ], default_setting_since), :class => 'form-control input-xs') %> <%= label_tag I18n.t('sort') %> <%= select_tag(:sort, options_for_select(sort_list, @current_params['sort']), :class => 'form-control input-xs') %> <% if show_pp_category %> <%= label_tag t('pp_category.search_name') %> <%= select_tag(:'pp_category_id[]', options_for_select([[I18n.t('all_s'), 'all'], [I18n.t('pp_category.label.news'), 1], [I18n.t('pp_category.label.people'), 2], [I18n.t('pp_category.label.sport'), 3], [I18n.t('pp_category.label.stock'), 0]], @current_params['pp_category_id']), multiple: false, class: 'form-control input-xs') %> <% end %> <% end %>
<% if Server.type_is?('PIXTECH') %>
<%= label_tag I18n.t('search_since') %> <%= select_tag(:search_since, options_for_select([ [I18n.t('all'), 'all'], [I18n.t('10_minutes'), '10_minutes'], [I18n.t('1_hour'), '1_hour'], [I18n.t('1_day'), '1_day'], [I18n.t('1_week'), '1_week'], [I18n.t('1_month'), '1_month'], [I18n.t('3_month'), '3_month'] ], default_setting_since), :class => 'form-control input-xs') %> <%= label_tag I18n.t('sort') %> <%= select_tag(:sort, options_for_select([ [I18n.t('sort_reception_date'), 'reception_date'], [I18n.t('sort_asc_date'), 'asc_date'], [I18n.t('sort_relevance'), 'relevance'], [I18n.t('sort_date_created'), 'date_created'], [I18n.t('sort_asc_created'), 'asc_created'], [I18n.t('sort_random'), 'random'] ], @current_params['sort']), :class => 'form-control input-xs') %> <%= label_tag I18n.t('date_created') %> <%= label_tag(:from, I18n.t('from')) %> <%= text_field_tag :date_created_begin, @current_params['date_created_begin'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%> <%= label_tag(:from, I18n.t('to')) %> <%= text_field_tag :date_created_end, @current_params['date_created_end'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%>     <%= label_tag I18n.t('reception_date') %> <%= label_tag(:from, I18n.t('from')) %> <%= text_field_tag :reception_date_begin, @current_params['reception_date_begin'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%> <%= label_tag(:from, I18n.t('to')) %> <%= text_field_tag :reception_date_end, @current_params['reception_date_end'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%>
<%= label_tag I18n.t('colours') %> <%= select_tag(:b_and_w, options_for_select([[I18n.t('all_colours'), 'all'], [I18n.t('colour'), 0], [I18n.t('black_and_white'), 1]], @current_params['b_and_w']), :class => 'form-control input-xs') %> <%= label_tag I18n.t('image_format') %> <%= radio_button_tag(:ratio, 'all', (@current_params['ratio'].blank? || @current_params['ratio'] == 'all')) %> <%= label_tag(:ratio_all, I18n.t('all')) %> <%= radio_button_tag(:ratio, 'horizontal', (@current_params['ratio'] == 'horizontal')) %> <%= label_tag(:ratio_horizontal, I18n.t('horizontal')) %> <%= radio_button_tag(:ratio, 'vertical', (@current_params['ratio'] == 'vertical')) %> <%= label_tag(:ratio_vertical, I18n.t('vertical')) %> <%= radio_button_tag(:ratio, 'panoramic', (@current_params['ratio'] == 'panoramic')) %> <%= label_tag(:ratio_panoramic, I18n.t('panoramic')) %> <%= radio_button_tag(:ratio, 'square', (@current_params['ratio'] == 'square')) %> <%= label_tag(:ratio_square, I18n.t('square')) %>
<% else %>
<%= label_tag I18n.t('date_created') %> <%= label_tag(:from, I18n.t('from')) %> <%= text_field_tag :date_created_begin, @current_params['date_created_begin'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%> <%= label_tag(:from, I18n.t('to')) %> <%= text_field_tag :date_created_end, @current_params['date_created_end'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%>     <%= label_tag I18n.t('reception_date') %> <%= label_tag(:from, I18n.t('from')) %> <%= text_field_tag :reception_date_begin, @current_params['reception_date_begin'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%> <%= label_tag(:from, I18n.t('to')) %> <%= text_field_tag :reception_date_end, @current_params['reception_date_end'], maxlength: 10, size: 10, class: 'datepicker form-control input-xs' -%>
<%= label_tag I18n.t('colours') %> <%= select_tag(:b_and_w, options_for_select([[I18n.t('all_colours'), 'all'], [I18n.t('colour'), 0], [I18n.t('black_and_white'), 1]], @current_params['b_and_w']), :class => 'form-control input-xs') %>     <%= label_tag I18n.t('image_format') %> <%= radio_button_tag(:ratio, 'all', (@current_params['ratio'].blank? || @current_params['ratio'] == 'all') ) %> <%= label_tag(:ratio_all, I18n.t('all')) %> <%= radio_button_tag(:ratio, 'horizontal', (@current_params['ratio'] == 'horizontal') ) %> <%= label_tag(:ratio_horizontal, I18n.t('horizontal')) %> <%= radio_button_tag(:ratio, 'vertical', (@current_params['ratio'] == 'vertical') ) %> <%= label_tag(:ratio_vertical, I18n.t('vertical')) %> <%= radio_button_tag(:ratio, 'panoramic', (@current_params['ratio'] == 'panoramic') ) %> <%= label_tag(:ratio_panoramic, I18n.t('panoramic')) %> <%= radio_button_tag(:ratio, 'square', (@current_params['ratio'] == 'square') ) %> <%= label_tag(:ratio_square, I18n.t('square')) %>
<% end %>
<%= label_tag I18n.t('iptc_search') %> : <% if (session[:pixtech] && session[:pixtech]=='saif') && (current_user.is_provider_admin? || current_user.is_superadmin? || current_user.is_photographer? || current_user.is_photographer_admin?) %> <%= label_tag I18n.t('supplemental_category') %> <%= select_tag(:supplemental_category, options_for_select(SAIF_SUPP_CATEGORY_LIST, @current_params['supplemental_category']), include_blank: true, class: 'form-control input-xs') %> <% end %>     <%= label_tag I18n.t('subject') %> <%= text_field_tag :subject, @current_params['subject'], maxlength: 500, size: 20, class: 'form-control input-xs' %>     <%= label_tag I18n.t('creator_iptc',creator_word: (I18n.t(session[:creator_word]))) %> <%= text_field_tag :creator, @current_params['creator'], maxlength: 500, size: 20, class: 'form-control input-xs' %>     <%= label_tag I18n.t('city') %> <%= text_field_tag :city, @current_params['city'], maxlength: 500, size: 20, class: 'form-control input-xs' %>     <%= label_tag I18n.t('iptc_country') %> <%= text_field_tag :country, @current_params['country'], maxlength: 500, size: 20, class: 'form-control input-xs' %>
<%= select_tag(:image_searchable, options_for_select(@image_fields), class: 'pw_params_builder form-control input-xs') %> <%= select_tag(:image_searchable_selected,options_for_select(@displayed_image_fields), class: 'display_none') %>
<% end %> <% unless session[:pixtech] && session[:pixtech].include?('vitrine') %>
<% end %>