Mercurial > hg > soundsoftware-site
comparison app/views/timelog/_date_range.html.erb @ 1298:4f746d8966dd redmine_2.3_integration
Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:28:30 +0100 |
parents | 622f24f53b42 |
children | dffacf8a6908 |
comparison
equal
deleted
inserted
replaced
1297:0a574315af3e | 1298:4f746d8966dd |
---|---|
1 <fieldset id="date-range" class="collapsible"> | 1 <div id="query_form_content" class="hide-when-print"> |
2 <legend onclick="toggleFieldset(this);"><%= l(:label_date_range) %></legend> | 2 <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> |
3 <div> | 3 <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> |
4 <p> | 4 <div style="<%= @query.new_record? ? "" : "display: none;" %>"> |
5 <%= label_tag "period_type_list", l(:description_date_range_list), :class => "hidden-for-sighted" %> | 5 <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
6 <%= radio_button_tag 'period_type', '1', !@free_period, :onclick => '$("#from,#to").attr("disabled", true);$("#period").removeAttr("disabled");', :id => "period_type_list"%> | 6 </div> |
7 <%= select_tag 'period', options_for_period_select(params[:period]), | 7 </fieldset> |
8 :onchange => 'this.form.submit();', | 8 <fieldset class="collapsible collapsed"> |
9 :onfocus => '$("#period_type_1").attr("checked", true);', | 9 <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend> |
10 :disabled => @free_period %> | 10 <div style="display: none;"> |
11 </p> | 11 <table> |
12 <p> | 12 <tr> |
13 <%= label_tag "period_type_interval", l(:description_date_range_interval), :class => "hidden-for-sighted" %> | 13 <td><%= l(:field_column_names) %></td> |
14 <%= radio_button_tag 'period_type', '2', @free_period, :onclick => '$("#from,#to").removeAttr("disabled");$("#period").attr("disabled", true);', :id => "period_type_interval" %> | 14 <td><%= render_query_columns_selection(@query) %></td> |
15 <%= l(:label_date_from_to, | 15 </tr> |
16 :start => ((label_tag "from", l(:description_date_from), :class => "hidden-for-sighted") + | 16 </table> |
17 text_field_tag('from', @from, :size => 10, :disabled => !@free_period) + calendar_for('from')), | 17 </div> |
18 :end => ((label_tag "to", l(:description_date_to), :class => "hidden-for-sighted") + | 18 </fieldset> |
19 text_field_tag('to', @to, :size => 10, :disabled => !@free_period) + calendar_for('to'))).html_safe %> | |
20 </p> | |
21 </div> | 19 </div> |
22 </fieldset> | 20 |
23 <p class="buttons"> | 21 <p class="buttons hide-when-print"> |
24 <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %> | 22 <%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %> |
25 <%= link_to l(:button_clear), {:controller => controller_name, :action => action_name, :project_id => @project, :issue_id => @issue}, :class => 'icon icon-reload' %> | 23 <%= link_to l(:button_clear), {:project_id => @project, :issue_id => @issue}, :class => 'icon icon-reload' %> |
26 </p> | 24 </p> |
27 | 25 |
28 <div class="tabs"> | 26 <div class="tabs"> |
29 <% url_params = @free_period ? { :from => @from, :to => @to } : { :period => params[:period] } %> | 27 <% query_params = params.slice(:f, :op, :v, :sort) %> |
30 <ul> | 28 <ul> |
31 <li><%= link_to(l(:label_details), url_params.merge({:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue }), | 29 <li><%= link_to(l(:label_details), query_params.merge({:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue }), |
32 :class => (action_name == 'index' ? 'selected' : nil)) %></li> | 30 :class => (action_name == 'index' ? 'selected' : nil)) %></li> |
33 <li><%= link_to(l(:label_report), url_params.merge({:controller => 'timelog', :action => 'report', :project_id => @project, :issue_id => @issue}), | 31 <li><%= link_to(l(:label_report), query_params.merge({:controller => 'timelog', :action => 'report', :project_id => @project, :issue_id => @issue}), |
34 :class => (action_name == 'report' ? 'selected' : nil)) %></li> | 32 :class => (action_name == 'report' ? 'selected' : nil)) %></li> |
35 </ul> | 33 </ul> |
36 </div> | 34 </div> |
37 | |
38 <%= javascript_tag do %> | |
39 $('#from, #to').change(function(){ | |
40 $('#period_type_interval').attr('checked', true); $('#from,#to').removeAttr('disabled'); $('#period').attr('disabled', true); | |
41 }); | |
42 <% end %> |