<%= render :partial => 'helpers/build_table_pager', :locals => {:settings => settings} %> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<% end %> <% order_by_arr = settings[:params][:order_by].downcase.split(",") %> <% settings[:columns].each do |col| %> <% order_asc_id = (col[:table] + "___" + col[:name] + "___asc") %> <% order_desc_id = (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;"
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;"
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 :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} %> |