<%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filtrováno položek:
"><%= !settings[:params]["checkbox_pool"].blank? ? settings[:params]["checkbox_pool"].split(",").count : 0 %>
Odznačit vše
|
<% end %>
<% if !settings[:row].blank? && !settings[:row][:functions].blank? %>
<% end %> <% order_by_arr = settings[:params][:order_by].downcase.split(",") unless settings[:params][:order_by].blank? %> <% settings[:columns].each do |col| %> <% order_asc_id = (col[:table].blank? || col[:name].blank?) ? "" : (col[:table] + "___" + col[:name] + "___asc") %> <% order_desc_id = (col[:table].blank? || col[:name].blank?) ? "" : (col[:table] + "___" + col[:name] + "___desc") %> |
<%= col[:label].html_safe %>
<% if col[:column_method].blank? && col[:row_method].blank? && !col[:name].blank? %>
', 'asc', this); return false;"
ondblclick="TableSorting.force_change_sorting('<%= settings[:form_id] %>','<%= col[:table] + "." +col[:name] %>', 'asc', this); return false;"
title="Seřadit vzestupně"
class="icon-arrow-up sort_button sort-up <%= (order_by_arr.include?(col[:table] + "." + col[:name] + " asc")) ? "active" : "inactive" %>"
id="<%= order_asc_id %>">
', 'desc', this); return false;"
ondblclick="TableSorting.force_change_sorting('<%= settings[:form_id] %>','<%= col[:table] + "." +col[:name] %>', 'desc', this); return false;"
title="Seřadit sestupně"
class="icon-arrow-down sort_button sort-down <%= (order_by_arr.include?(col[:table] + "." + col[:name] + " desc")) ? "active" : "inactive" %>"
id="<%= order_desc_id %>">
<% end %>
<% case col[:filter] %>
<% when :find %>
<% saved_param = (!settings[:params].blank? && !settings[:params]['find'].blank? && !settings[:params]['find']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['find']["#{col[:table]}.#{col[:name]}"] : "" %>
<%= text_field_tag "find[#{col[:table]}.#{col[:name]}]", saved_param,
{:class => "input-small text #{settings[:form_id] + '_column_find'}"} %>
<% when :multichoice %>
<% saved_param = (!settings[:params].blank? && !settings[:params]['multichoice'].blank? && !settings[:params]['multichoice']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['multichoice']["#{col[:table]}.#{col[:name]}"] : [] %>
<%= select_tag("multichoice[#{col[:table]}.#{col[:name]}]", options_for_select(col[:filter_data], saved_param),
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
:multiple => true,
:class => "multiselect_class") %>
<% when :number %>
<% saved_param = (!settings[:params].blank? && !settings[:params]['date_from'].blank? && !settings[:params]['date_from']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['date_from']["#{col[:table]}.#{col[:name]}"] : "" %>
<%= text_field_tag "number_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "input-small input-mini #{settings[:form_id] + '_column_find'}",
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
:title => "Vetší nebo rovno"} %>
<% saved_param = (!settings[:params].blank? && !settings[:params]['date_to'].blank? && !settings[:params]['date_to']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['date_to']["#{col[:table]}.#{col[:name]}"] : "" %>
<%#= label_tag "date_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
<%= text_field_tag "number_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "input-small input-mini #{settings[:form_id] + '_column_find'}",
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
:title => "Menší nebo rovno"} %>
<% when :date %>
<% saved_param = (!settings[:params].blank? && !settings[:params]['date_from'].blank? && !settings[:params]['date_from']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['date_from']["#{col[:table]}.#{col[:name]}"] : "" %>
<%#= label_tag "date_from[#{col[:table]}.#{col[:name]}]", "Od", :class => "datetime_class_label" %>
<%= text_field_tag "date_from[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "datetime_class input-small",
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
:title => "Datum od"} %>
<% saved_param = (!settings[:params].blank? && !settings[:params]['date_to'].blank? && !settings[:params]['date_to']["#{col[:table]}.#{col[:name]}"].blank?) ? settings[:params]['date_to']["#{col[:table]}.#{col[:name]}"] : "" %>
<%#= label_tag "date_to[#{col[:table]}.#{col[:name]}]", "Do", :class => "datetime_class_label" %>
<%= text_field_tag "date_to[#{col[:table]}.#{col[:name]}]", saved_param, {:class => "datetime_class input-small",
:onchange => "form_submit_watcher('#{settings[:form_id]}')",
:title => "Datum do"} %>
<% else %>
<% end %>
|
<% end %>
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %> |