2012-08-07 20:41:46 +04:00
|
|
|
<%= javascript_tag do %>
|
2012-09-25 22:23:11 +04:00
|
|
|
var operatorLabels = <%= raw_json Query.operators_labels %>;
|
|
|
|
var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
|
|
|
|
var availableFilters = <%= raw_json query.available_filters_as_json %>;
|
|
|
|
var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
|
2012-08-07 20:41:46 +04:00
|
|
|
$(document).ready(function(){
|
|
|
|
initFilters();
|
|
|
|
<% query.filters.each do |field, options| %>
|
2012-09-25 22:23:11 +04:00
|
|
|
addFilter("<%= field %>", <%= raw_json query.operator_for(field) %>, <%= raw_json query.values_for(field) %>);
|
2012-08-07 20:41:46 +04:00
|
|
|
<% end %>
|
|
|
|
});
|
|
|
|
<% end %>
|
|
|
|
|
2012-03-24 04:03:05 +04:00
|
|
|
<table style="width:100%">
|
2007-03-12 20:59:02 +03:00
|
|
|
<tr>
|
|
|
|
<td>
|
2012-08-07 20:41:46 +04:00
|
|
|
<table id="filters-table">
|
2007-03-12 20:59:02 +03:00
|
|
|
</table>
|
|
|
|
</td>
|
2008-04-13 15:18:09 +04:00
|
|
|
<td class="add-filter">
|
2011-07-02 15:49:13 +04:00
|
|
|
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
|
2012-08-07 20:41:46 +04:00
|
|
|
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2011-04-01 19:00:23 +04:00
|
|
|
<%= hidden_field_tag 'f[]', '' %>
|
2012-08-07 20:41:46 +04:00
|
|
|
<% include_calendar_headers_tags %>
|