added view for date_exact filter type

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@222 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent c7552d8e5b
commit eb411d1e8c
  1. 13
      app/views/cost_reports/filter_types/_date_exact.rhtml

@ -0,0 +1,13 @@
<%= text_field_tag "#{name_prefix}[values][]", (filter.values.first if filter.values), :size => 10, :class => "select-small", :id => "#{id_prefix}_date1"%> <%= calendar_for("#{id_prefix}_date1") %>
<span id="<%= id_prefix %>_between_tags">
<%
between_tags =
l(:label_until) + " " +
text_field_tag("#{name_prefix}[values][]", (filter.values.last if filter.values), :size => 10, :class => "select-small", :id => "#{id_prefix}_date2") + " " +
calendar_for("#{id_prefix}_date2")
%>
<%= javascript_tag "#{id_prefix}_between_tags = '#{escape_javascript(between_tags)}';" %>
<%= observe_field "#{id_prefix}_operator", :function => "if (value == '<>d') {$('#{id_prefix}_between_tags').update(#{id_prefix}_between_tags);} else {$('#{id_prefix}_between_tags').update('');}" %>
<%= between_tags if filter.operator == '<>d' %>
Loading…
Cancel
Save