Project

General

Profile

Patch #7190 ยป date_range.diff

a first version of the patch - Daniel Neis Araujo, 2010-12-29 00:46

View differences:

app/views/time_entry_reports/report.rhtml
14 14
  <%= hidden_field_tag('project_id', params[:project_id]) if @project %>
15 15
  <%= hidden_field_tag('issue_id', params[:issue_id]) if @issue %>
16 16
  <%= render :partial => 'timelog/date_range' %>
17
  <%= render :partial => 'timelog/tabs' %>
17 18

  
18 19
  <p><%= l(:label_details) %>: <%= select_tag 'columns', options_for_select([[l(:label_year), 'year'],
19 20
                                                                            [l(:label_month), 'month'],
app/views/timelog/_date_range.rhtml
14 14
													 :end => (text_field_tag('to', @to, :size => 10) + calendar_for('to'))) %>
15 15
</span>
16 16
</p>
17
</div>
18
</fieldset>
19 17
<p class="buttons">
20 18
	<%= link_to_remote l(:button_apply), 
21 19
	                   { :url => { },
......
24 22
                            :method => :get
25 23
	                   }, :class => 'icon icon-checked' %>
26 24
</p>
27

  
28
<div class="tabs">
29
<% url_params = @free_period ? { :from => @from, :to => @to } : { :period => params[:period] } %>
30
<ul>
31
    <li><%= link_to(l(:label_details), url_params.merge({:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue }),
32
                                       :class => (@controller.action_name == 'index' ? 'selected' : nil)) %></li>
33
    <li><%= link_to(l(:label_report), url_params.merge({:controller => 'time_entry_reports', :action => 'report', :project_id => @project, :issue_id => @issue}),
34
                                       :class => (@controller.action_name == 'report' ? 'selected' : nil)) %></li>
35
</ul>
36 25
</div>
26
</fieldset>
27

  
app/views/timelog/_tabs.rhtml
1
<div class="tabs">
2
<% url_params = @free_period ? { :from => @from, :to => @to } : { :period => params[:period] } %>
3
<ul>
4
    <li><%= link_to(l(:label_details), url_params.merge({:controller => 'timelog', :action => 'index', :project_id => @project, :issue_id => @issue }),
5
                                       :class => (@controller.action_name == 'index' ? 'selected' : nil)) %></li>
6
    <li><%= link_to(l(:label_report), url_params.merge({:controller => 'time_entry_reports', :action => 'report', :project_id => @project, :issue_id => @issue}),
7
                                       :class => (@controller.action_name == 'report' ? 'selected' : nil)) %></li>
8
</ul>
9
</div>
10

  
app/views/timelog/index.html.erb
12 12
<%= hidden_field_tag('project_id', params[:project_id]) if @project %>
13 13
<%= hidden_field_tag 'issue_id', params[:issue_id] if @issue %>
14 14
<%= render :partial => 'date_range' %>
15
<%= render :partial => 'tabs' %>
15 16
<% end %>
16 17

  
17 18
<div class="total-hours">
public/stylesheets/application.css
280 280
fieldset.collapsible legend { padding-left: 16px; background: url(../images/arrow_expanded.png) no-repeat 0% 40%; cursor:pointer; }
281 281
fieldset.collapsible.collapsed legend { background-image: url(../images/arrow_collapsed.png); }
282 282

  
283
fieldset#date-range p { margin: 2px 0 2px 0; }
283
fieldset#date-range p { margin: 2px 0 2px 0; display: inline; }
284 284
fieldset#filters table { border-collapse: collapse; }
285 285
fieldset#filters table td { padding: 0; vertical-align: middle; }
286 286
fieldset#filters tr.filter { height: 2em; }
    (1-1/1)