backlog 0.22.1 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +28 -0
- data/README.txt +23 -2
- data/app/controllers/application.rb +15 -2
- data/app/controllers/periods_controller.rb +3 -0
- data/app/controllers/tasks_controller.rb +2 -2
- data/app/controllers/user_controller.rb +2 -2
- data/app/controllers/work_accounts_controller.rb +14 -0
- data/app/controllers/works_controller.rb +23 -3
- data/app/models/report_filter.rb +7 -3
- data/app/models/task.rb +11 -10
- data/app/models/work.rb +3 -2
- data/app/views/customers/_name_list.rhtml +5 -0
- data/app/views/periods/_show_active.rhtml +1 -0
- data/app/views/periods/_title.rhtml +8 -1
- data/app/views/periods/edit.rhtml +1 -1
- data/app/views/periods/order.rjs +0 -1
- data/app/views/tasks/_task.rhtml +6 -5
- data/app/views/user/login.rhtml +1 -1
- data/app/views/work_accounts/_title.rhtml +4 -0
- data/app/views/work_accounts/edit.rhtml +1 -3
- data/app/views/work_accounts/list.rhtml +9 -3
- data/app/views/work_accounts/show.rhtml +47 -30
- data/app/views/works/_form.rhtml +6 -0
- data/app/views/works/_row.rhtml +16 -9
- data/app/views/works/_row_field.rhtml +2 -2
- data/app/views/works/daily_work_sheet.rhtml +37 -7
- data/app/views/works/daily_work_sheet_old.rhtml +93 -0
- data/app/views/works/list.rhtml +11 -5
- data/app/views/works/update_row.rjs +5 -2
- data/config/environment.rb +19 -3
- data/lang/en.yaml +5 -0
- data/lang/no.yaml +5 -0
- data/lib/class_table_inheritance.rb +10 -3
- data/no_test.rb~ +6 -0
- data/test/client/login.rb +25 -0
- data/test/client/login.rb~ +33 -0
- data/test/client/login_test.rb +64 -0
- data/test/client/setup.rb +24 -0
- data/test/functional/works_controller_test.rb +3 -2
- data/test/unit/party_test.rb +10 -0
- data/test/unit/user_test.rb +15 -17
- metadata +12 -2
data/app/views/works/_form.rhtml
CHANGED
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
<%=detour_to l(:new_task), :controller => 'tasks', :action => :new %>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
|
+
<p><%=l :description%>:<br/>
|
|
20
|
+
<%=text_field 'work', 'description' %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
19
23
|
<% if @work.task.nil? || @work.task.track_times?%>
|
|
20
24
|
<p><label for="work_started_at"><%=l :started_at%></label><br/>
|
|
21
25
|
<%= text_field 'work', 'started_at', :size => 16, :value => @work.started_at ? @work.started_at.strftime('%Y-%m-%d %H:%M') : nil %>
|
|
@@ -56,10 +60,12 @@
|
|
|
56
60
|
</p>
|
|
57
61
|
<% end %>
|
|
58
62
|
|
|
63
|
+
<!--
|
|
59
64
|
<% if @work.task.nil? || @work.task.enable_users? %>
|
|
60
65
|
<p><label for="work_user_id"><%=l :user%></label><br/>
|
|
61
66
|
<%= select 'work', 'user_id', @users.map{|user| [user.login, user.id]} %></p>
|
|
62
67
|
<% end %>
|
|
68
|
+
-->
|
|
63
69
|
|
|
64
70
|
<% if @work.task.nil? || @work.task.track_done?%>
|
|
65
71
|
<p style="float: left;"><label for="work_hours"><%=l :hours%></label><br/>
|
data/app/views/works/_row.rhtml
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
<tr id="work_<%=@work.id%>" style="border: 1px solid black">
|
|
2
2
|
<td>
|
|
3
|
-
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :
|
|
4
|
-
<%=f.select :work_account_id, @work_accounts.map {|wa| [wa.name, wa.id]}, {}, :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?
|
|
3
|
+
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :next_field => :customer_name}, :html => {:id => "work_#{@work.id}_form"} do |f|%>
|
|
4
|
+
<%=f.select :work_account_id, @work_accounts.map {|wa| [wa.name, wa.id]}, {}, :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?next_field=customer_name', {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)})"%>
|
|
5
5
|
<% end %>
|
|
6
6
|
</td>
|
|
7
7
|
<td>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :next_field => :description} do |f|%>
|
|
9
|
+
<%=f.select :customer_id, [['', '']] + @customers.map {|cu| [cu.name, cu.id]}, {}, :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?next_field=description', {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)})"%>
|
|
10
|
+
<% end %>
|
|
11
|
+
</td>
|
|
12
|
+
<td>
|
|
13
|
+
<%=render :partial => 'row_field', :locals => {:field => 'description', :next_field => 'started_at_time'} %>
|
|
12
14
|
</span>
|
|
13
15
|
<td align="right">
|
|
14
|
-
<%=render :partial => 'row_field', :locals => {:field => 'started_at_time'} %>
|
|
16
|
+
<%=render :partial => 'row_field', :locals => {:field => 'started_at_time', :next_field => 'completed_at_time'} %>
|
|
15
17
|
</td>
|
|
16
18
|
<td align="right">
|
|
17
|
-
<%=render :partial => 'row_field', :locals => {:field => 'completed_at_time'} %>
|
|
19
|
+
<%=render :partial => 'row_field', :locals => {:field => 'completed_at_time', :next_field => 'hours_time'} %>
|
|
18
20
|
</td>
|
|
19
21
|
<td align="right">
|
|
20
22
|
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id} do |f|%>
|
|
21
|
-
<%=f.text_field :hours_time, :value => t(@work.hours), :class => 'task_hours'%>
|
|
23
|
+
<%=f.text_field :hours_time, :value => (@work.hours && @work.hours > 0 ? t(@work.hours) : ''), :id => "work_#{@work.id}_hours_time", :class => 'task_hours', :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?field=description', {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)})"%>
|
|
22
24
|
<% end %>
|
|
23
25
|
</td>
|
|
26
|
+
<td align="right">
|
|
27
|
+
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id} do |f|%>
|
|
28
|
+
<%=f.check_box :invoice, :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?field=description', {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)})"%>
|
|
29
|
+
<% end %>
|
|
30
|
+
</td>
|
|
24
31
|
<td>
|
|
25
32
|
<%=image_detour_to('delete.png', l(:delete), {:controller => 'works', :action => :destroy, :id => @work, :confirm => true}, nil, true)%>
|
|
26
33
|
<% if @work.task %>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :
|
|
2
|
-
<%=text_field :work, field, :id => "work_#{@work.id}_#{field}", :class => ('task_time' if field=~/_at_time$/) %>
|
|
1
|
+
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :next_field => next_field} do |f|%>
|
|
2
|
+
<%=text_field :work, field, :id => "work_#{@work.id}_#{field}", :class => ('task_time' if field=~/_at_time$/), :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?next_field=#{next_field}', {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)})" %>
|
|
3
3
|
<% end %>
|
|
@@ -18,10 +18,12 @@
|
|
|
18
18
|
|
|
19
19
|
<tr>
|
|
20
20
|
<th><%=l :account %></th>
|
|
21
|
+
<th><%=l :customer %></th>
|
|
21
22
|
<th><%=l :description %></th>
|
|
22
23
|
<th><%=l :started_at %></th>
|
|
23
24
|
<th><%=l :completed_at %></th>
|
|
24
25
|
<th><%=l :done %></th>
|
|
26
|
+
<th><%=l :invoice %></th>
|
|
25
27
|
<th/>
|
|
26
28
|
</tr>
|
|
27
29
|
|
|
@@ -33,26 +35,31 @@
|
|
|
33
35
|
<% last_work = @work %>
|
|
34
36
|
<% @work = nil %>
|
|
35
37
|
|
|
36
|
-
<% if last_work.completed_at %>
|
|
37
38
|
<% form_tag with_detour(:controller => 'works', :action => 'create') do %>
|
|
38
39
|
<%=submit_tag('checkmark', :value => l(:save), :style => 'display: none')%>
|
|
39
40
|
<%=hidden_field :work, :completed_at, :value => @date %>
|
|
40
41
|
|
|
41
42
|
<tr>
|
|
42
43
|
<td valign="bottom">
|
|
43
|
-
<%=text_field_with_auto_complete :work, :work_account_name, {:value => '', :size => 16, :class => :task_description} %>
|
|
44
|
+
<%=text_field_with_auto_complete :work, :work_account_name, {:value => '', :size => 16, :class => :task_description}, {:delay => "0.01"} %>
|
|
45
|
+
</td>
|
|
46
|
+
<td valign="bottom">
|
|
47
|
+
<%=text_field_with_auto_complete :work, :customer_name, {:value => '', :size => 16, :class => :task_description} %>
|
|
44
48
|
</td>
|
|
45
49
|
<td valign="bottom">
|
|
46
|
-
<%=text_field_with_auto_complete :work, :description, {:
|
|
50
|
+
<%=text_field_with_auto_complete :work, :description, {:class => :task_description} %>
|
|
47
51
|
</td>
|
|
48
52
|
<td align="right" valign="bottom">
|
|
49
|
-
<%=text_field :work, :started_at_time, :value => last_work && last_work.completed_at.strftime('%H:%M'), :class => 'task_time' %>
|
|
53
|
+
<%=text_field :work, :started_at_time, :value => last_work && last_work.completed_at && last_work.completed_at.strftime('%H:%M'), :class => 'task_time' %>
|
|
50
54
|
</td>
|
|
51
55
|
<td align="right" valign="bottom">
|
|
52
|
-
<%=text_field :work, :completed_at_time, :class => 'task_time', :value => @work && @work.completed_at.strftime('%H:%M') %>
|
|
56
|
+
<%=text_field :work, :completed_at_time, :class => 'task_time', :value => @work && @work.completed_at.strftime('%H:%M'), :onchange => "update_hours(this.form);" %>
|
|
53
57
|
</td>
|
|
54
58
|
<td align="right" valign="bottom">
|
|
55
59
|
<%=text_field :work, :hours_time, :value => '', :class => 'task_hours' %>
|
|
60
|
+
</td>
|
|
61
|
+
<td align="right" valign="bottom">
|
|
62
|
+
<%=check_box :work, :invoice %>
|
|
56
63
|
</td>
|
|
57
64
|
<td valign="bottom">
|
|
58
65
|
</td>
|
|
@@ -62,9 +69,10 @@
|
|
|
62
69
|
<th><%=l :totals %></th>
|
|
63
70
|
<th/>
|
|
64
71
|
<th/>
|
|
65
|
-
|
|
72
|
+
<th/>
|
|
73
|
+
<th id="hours_total" class="hours"><%='%d:%02d' % [day_total.to_i, 60 * (day_total % 1)] %></th>
|
|
74
|
+
<th/>
|
|
66
75
|
</tr>
|
|
67
|
-
<% end %>
|
|
68
76
|
</table>
|
|
69
77
|
<%= submit_tag l(:save) %>
|
|
70
78
|
<%= back_or_link_to l(:back), '' %>
|
|
@@ -82,6 +90,28 @@
|
|
|
82
90
|
|
|
83
91
|
<script type="text/JavaScript">
|
|
84
92
|
//<!--
|
|
93
|
+
function update_hours(form){
|
|
94
|
+
var started_at = form.elements['work_started_at_time'];
|
|
95
|
+
var completed_at = form.elements['work_completed_at_time'];
|
|
96
|
+
var hours_field = form.elements['work_hours_time'];
|
|
97
|
+
|
|
98
|
+
if (started_at.value.length >= 4 && completed_at.value.length >= 4){
|
|
99
|
+
var start_hours = started_at.value.substr(0,2);
|
|
100
|
+
var start_minutes = started_at.value.substr(3,5);
|
|
101
|
+
var end_hours = completed_at.value.substr(0,2);
|
|
102
|
+
var end_minutes = completed_at.value.substr(3,5);
|
|
103
|
+
|
|
104
|
+
var hours = end_hours - start_hours;
|
|
105
|
+
var minutes = end_minutes - start_minutes;
|
|
106
|
+
if ( minutes < 0){
|
|
107
|
+
hours--;
|
|
108
|
+
minutes += 60;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
hours_field.value = '' + hours + ':' + (minutes < 10 ? '0' : '') + minutes;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
85
115
|
<% if last_work.completed_at %>
|
|
86
116
|
start_field = $('work_work_account_name')
|
|
87
117
|
<% else %>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<% @page_title = "#{l :experimental} #{l :daily_work_sheet} on #{@date}" + (" for #{user.login}" if user?) %>
|
|
2
|
+
|
|
3
|
+
<div id="spotlight">
|
|
4
|
+
|
|
5
|
+
<div style="float: left"><%=image_link_to('arrow_left.png', l(:previous_week), {:id => @date - 7}, :class => nil)%></div>
|
|
6
|
+
<div style="float: left"><%=image_link_to('arrow_left.png', l(:previous_day), {:id => @date-1}, :class => nil)%></div>
|
|
7
|
+
<div style="float: right"><%=image_link_to('arrow_right.png', l(:next_week), {:id => @date + 7}, :class => nil)%></div>
|
|
8
|
+
<div style="float: right"><%=image_link_to('arrow_right.png', l(:next_day), {:id => @date+1}, :class => nil)%></div>
|
|
9
|
+
|
|
10
|
+
<br clear="all" />
|
|
11
|
+
|
|
12
|
+
<table sstyle="width: 100%" border="0">
|
|
13
|
+
<tr>
|
|
14
|
+
<th align="right" colspan="5">
|
|
15
|
+
<%=link_to l(:weekly_work_sheet), :action => :weekly_work_sheet_by_work_account%>
|
|
16
|
+
</th>
|
|
17
|
+
</tr>
|
|
18
|
+
|
|
19
|
+
<tr>
|
|
20
|
+
<th><%=l :account %></th>
|
|
21
|
+
<th><%=l :description %></th>
|
|
22
|
+
<th><%=l :started_at %></th>
|
|
23
|
+
<th><%=l :completed_at %></th>
|
|
24
|
+
<th><%=l :done %></th>
|
|
25
|
+
<th/>
|
|
26
|
+
</tr>
|
|
27
|
+
|
|
28
|
+
<% day_total = 0 %>
|
|
29
|
+
<% for @work in @works %>
|
|
30
|
+
<% day_total += @work.hours if @work %>
|
|
31
|
+
<%=render :partial => 'row'%>
|
|
32
|
+
<% end %>
|
|
33
|
+
<% last_work = @work %>
|
|
34
|
+
<% @work = nil %>
|
|
35
|
+
|
|
36
|
+
<% if last_work.completed_at %>
|
|
37
|
+
<% form_tag with_detour(:controller => 'works', :action => 'create') do %>
|
|
38
|
+
<%=submit_tag('checkmark', :value => l(:save), :style => 'display: none')%>
|
|
39
|
+
<%=hidden_field :work, :completed_at, :value => @date %>
|
|
40
|
+
|
|
41
|
+
<tr>
|
|
42
|
+
<td valign="bottom">
|
|
43
|
+
<%=text_field_with_auto_complete :work, :work_account_name, {:value => '', :size => 16, :class => :task_description} %>
|
|
44
|
+
</td>
|
|
45
|
+
<td valign="bottom">
|
|
46
|
+
<%=text_field_with_auto_complete :work, :description, {:size => 16, :class => :task_description} %>
|
|
47
|
+
</td>
|
|
48
|
+
<td align="right" valign="bottom">
|
|
49
|
+
<%=text_field :work, :started_at_time, :value => last_work && last_work.completed_at.strftime('%H:%M'), :class => 'task_time' %>
|
|
50
|
+
</td>
|
|
51
|
+
<td align="right" valign="bottom">
|
|
52
|
+
<%=text_field :work, :completed_at_time, :class => 'task_time', :value => @work && @work.completed_at.strftime('%H:%M') %>
|
|
53
|
+
</td>
|
|
54
|
+
<td align="right" valign="bottom">
|
|
55
|
+
<%=text_field :work, :hours_time, :value => '', :class => 'task_hours' %>
|
|
56
|
+
</td>
|
|
57
|
+
<td valign="bottom">
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
<tr>
|
|
61
|
+
<td/>
|
|
62
|
+
<th><%=l :totals %></th>
|
|
63
|
+
<th/>
|
|
64
|
+
<th/>
|
|
65
|
+
<th class="hours"><%='%d:%02d' % [day_total.to_i, 60 * (day_total % 1)] %></th>
|
|
66
|
+
</tr>
|
|
67
|
+
<% end %>
|
|
68
|
+
</table>
|
|
69
|
+
<%= submit_tag l(:save) %>
|
|
70
|
+
<%= back_or_link_to l(:back), '' %>
|
|
71
|
+
<% end %>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<% if @period %>
|
|
75
|
+
<%= link_to l(:back), :controller => 'periods', :action => :show, :id => @period %>
|
|
76
|
+
<% end %>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<% if @period %>
|
|
80
|
+
<%=render :partial => '/periods/burn_down_chart' %>
|
|
81
|
+
<% end %>
|
|
82
|
+
|
|
83
|
+
<script type="text/JavaScript">
|
|
84
|
+
//<!--
|
|
85
|
+
<% if last_work.completed_at %>
|
|
86
|
+
start_field = $('work_work_account_name')
|
|
87
|
+
<% else %>
|
|
88
|
+
start_field = $('work_<%=last_work.id%>_completed_at_time')
|
|
89
|
+
<% end %>
|
|
90
|
+
start_field.focus();
|
|
91
|
+
start_field.select();
|
|
92
|
+
//-->
|
|
93
|
+
</script>
|
data/app/views/works/list.rhtml
CHANGED
|
@@ -51,12 +51,10 @@
|
|
|
51
51
|
<% end %>
|
|
52
52
|
<% end %>
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
54
|
<table id="summary">
|
|
57
55
|
<tr>
|
|
58
|
-
<th><%=l :total
|
|
59
|
-
<
|
|
56
|
+
<th><%=l :total%>:</th>
|
|
57
|
+
<th><%=@works.inject(BigDecimal('0')){|total, work| total += work.hours}%> <%=l(:hours).downcase%></td>
|
|
60
58
|
<td><%=link_to l(:spreadsheet), {:export => :excel}.update(params) %></td>
|
|
61
59
|
</tr>
|
|
62
60
|
</table>
|
|
@@ -89,14 +87,22 @@
|
|
|
89
87
|
<td><%= link_to 'Destroy', { :controller => 'works', :action => 'destroy', :id => work }, :confirm => 'Are you sure?', :method => :post %></td>
|
|
90
88
|
</tr>
|
|
91
89
|
<% end %>
|
|
90
|
+
<tr>
|
|
91
|
+
<th><%=l :total%>:</th>
|
|
92
|
+
<td/>
|
|
93
|
+
<th><%=@works.inject(BigDecimal('0')){|total, work| total += work.hours}%> <%=l(:hours).downcase%></td>
|
|
94
|
+
</tr>
|
|
92
95
|
</table>
|
|
93
96
|
|
|
94
97
|
<%=will_paginate @works %>
|
|
95
98
|
<br />
|
|
96
99
|
|
|
97
100
|
<% if @period %>
|
|
98
|
-
<%=
|
|
101
|
+
<%=back_or_link_to l(:back), :controller => 'periods', :action => :show, :id => @period %>
|
|
102
|
+
<% else %>
|
|
103
|
+
<%=back_or_link_to l(:back), :controller => 'work_accounts', :action => :show, :id => @work_account %>
|
|
99
104
|
<% end %>
|
|
105
|
+
|
|
100
106
|
</div>
|
|
101
107
|
|
|
102
108
|
<% if @period %>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
page.replace "work_#{@work.id}", :partial => 'row', :object => @work
|
|
2
2
|
page.replace "notice", :partial => '/layouts/notice'
|
|
3
|
-
page
|
|
4
|
-
page
|
|
3
|
+
page.visual_effect(:highlight, "notice")
|
|
4
|
+
page.replace_html "hours_total", "#{'%d:%02d' % [@day_total.to_i, 60 * (@day_total % 1)]}"
|
|
5
|
+
page["work_#{@work.id}_#{@next_field}"].select
|
|
6
|
+
page["work_#{@work.id}_#{@next_field}"].focus
|
|
7
|
+
|
data/config/environment.rb
CHANGED
|
@@ -25,15 +25,27 @@ if File.exists? APP_CONFIG_FILE
|
|
|
25
25
|
if db_settings = app_conf['database']
|
|
26
26
|
puts "Found global database connection settings: #{db_settings.inspect}"
|
|
27
27
|
db_conf['production'] = db_settings
|
|
28
|
-
else
|
|
29
|
-
puts "Did not find global database connection settings: #{app_conf.inspect}"
|
|
30
28
|
end
|
|
31
29
|
db_conf
|
|
32
30
|
end
|
|
33
31
|
end
|
|
34
32
|
end
|
|
35
33
|
else
|
|
36
|
-
|
|
34
|
+
puts "Optional global config file not present (#{APP_CONFIG_FILE})"
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
DB_CONFIG_FILE = Config::CONFIG["sysconfdir"] + '/backlog/config/database.yml'
|
|
38
|
+
if File.exists? DB_CONFIG_FILE
|
|
39
|
+
puts "Found global database config file (#{DB_CONFIG_FILE})"
|
|
40
|
+
module Rails
|
|
41
|
+
class Configuration
|
|
42
|
+
def database_configuration_file
|
|
43
|
+
DB_CONFIG_FILE
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
else
|
|
48
|
+
puts "Optional global database config file not present (#{DB_CONFIG_FILE})"
|
|
37
49
|
end
|
|
38
50
|
|
|
39
51
|
if RUBY_PLATFORM =~ /java/
|
|
@@ -98,6 +110,10 @@ require 'version_from_history'
|
|
|
98
110
|
require 'user_system'
|
|
99
111
|
require 'url_for_fix'
|
|
100
112
|
|
|
113
|
+
if RUBY_PLATFORM !~ /i386-mswin32/
|
|
101
114
|
gem 'slave'
|
|
102
115
|
require 'slave'
|
|
103
116
|
work_lock_nagger_thread = Slave.object(:async=>true) {WorkLockNagger.new.nag}
|
|
117
|
+
else
|
|
118
|
+
puts 'Not spawning worklognagger on windows'
|
|
119
|
+
end
|
data/lang/en.yaml
CHANGED
|
@@ -37,6 +37,7 @@ estimate: Estimate
|
|
|
37
37
|
experimental: Experimental!
|
|
38
38
|
files: Files
|
|
39
39
|
friday: Friday
|
|
40
|
+
grab_task: Grab task
|
|
40
41
|
group: Group
|
|
41
42
|
groups: Groups
|
|
42
43
|
home: Home
|
|
@@ -66,9 +67,12 @@ new_task: Add new task
|
|
|
66
67
|
new_work: Add new work record
|
|
67
68
|
new_work_account: Add new work account
|
|
68
69
|
next: Next
|
|
70
|
+
no_backlog: No Backlog
|
|
69
71
|
no_pending_tasks: There are no pending tasks in this sprint.
|
|
70
72
|
no_pending_tasks_in_backlog: There are no pending tasks in this backlog.
|
|
73
|
+
not_grabbed: Not grabbed by anyone
|
|
71
74
|
notes: Notes
|
|
75
|
+
paging: Paging
|
|
72
76
|
password: Password
|
|
73
77
|
period: Sprint
|
|
74
78
|
periods: Sprints
|
|
@@ -78,6 +82,7 @@ postponed: Postponed
|
|
|
78
82
|
previous: Previous
|
|
79
83
|
previous_abr: Prev.
|
|
80
84
|
projection: Projection
|
|
85
|
+
release_task: Release task
|
|
81
86
|
reopen: Reopen task
|
|
82
87
|
resolution: Resolution
|
|
83
88
|
resolution_abr: Res.
|
data/lang/no.yaml
CHANGED
|
@@ -37,6 +37,7 @@ estimate: Estimat
|
|
|
37
37
|
experimental: Eksperimentell!
|
|
38
38
|
files: Files
|
|
39
39
|
friday: Fredag
|
|
40
|
+
grab_task: Grip oppgave
|
|
40
41
|
group: Gruppe
|
|
41
42
|
groups: Grupper
|
|
42
43
|
home: Hjem
|
|
@@ -66,9 +67,12 @@ new_task: Legg til ny oppgave
|
|
|
66
67
|
new_work: Registrer arbeid
|
|
67
68
|
new_work_account: Legg til timeføringskonto
|
|
68
69
|
next: Neste
|
|
70
|
+
no_backlog: Uten oppgaveliste
|
|
69
71
|
no_pending_tasks: Det er ingen ventende oppgaver i denne perioden.
|
|
70
72
|
no_pending_tasks_in_backlog: Det er ingen ventende oppgaver i denne oppgavelisten.
|
|
73
|
+
not_grabbed: Ikke tatt av noen
|
|
71
74
|
notes: Notater
|
|
75
|
+
paging: Del opp i flere sider
|
|
72
76
|
password: Passord
|
|
73
77
|
period: Periode
|
|
74
78
|
periods: Perioder
|
|
@@ -78,6 +82,7 @@ postponed: Utsatt
|
|
|
78
82
|
previous: Forrige
|
|
79
83
|
previous_abr: Forrige
|
|
80
84
|
projection: Projeksjon
|
|
85
|
+
release_task: Slipp oppgave
|
|
81
86
|
reopen: Gjenåpne
|
|
82
87
|
resolution: Avslutningsmåte
|
|
83
88
|
resolution_abr: Avsl.
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# This library makes an ActiveRecord subclass model use one table per subclass level.
|
|
2
|
+
# Instances are instances of the _super class_, with a proxy instance handling the subclass attributes
|
|
3
|
+
# and method calls.
|
|
4
|
+
|
|
1
5
|
class ActiveRecord::Base
|
|
2
6
|
class_inheritable_array :default_eager_loading
|
|
3
7
|
|
|
@@ -54,6 +58,7 @@ class ActiveRecord::Base
|
|
|
54
58
|
end
|
|
55
59
|
|
|
56
60
|
has_one_without_cti proxy_symbol, :class_name => proxy_class.name, :foreign_key => primary_key_name, :dependent => :destroy
|
|
61
|
+
validates_associated proxy_symbol
|
|
57
62
|
|
|
58
63
|
if options[:save_before_superclass_callbacks] || true
|
|
59
64
|
# We need the after_save filter for this association to run /before/ any other after_save's already registered on a superclass,
|
|
@@ -123,8 +128,10 @@ class ActiveRecord::Base
|
|
|
123
128
|
method_missing_super(method_symbol, *parameters)
|
|
124
129
|
end
|
|
125
130
|
end
|
|
126
|
-
|
|
127
|
-
delegate :
|
|
131
|
+
# TODO (uwe): validates_uniqueness_of should only be delegated for colimns not in super class???
|
|
132
|
+
delegate :validates_uniqueness_of, {:to => #{proxy_class_name}}
|
|
133
|
+
|
|
134
|
+
delegate :foreign_keys, {:to => #{proxy_class_name}}
|
|
128
135
|
end
|
|
129
136
|
EOV
|
|
130
137
|
|
|
@@ -141,7 +148,7 @@ class ActiveRecord::Base
|
|
|
141
148
|
[reflection.name, "#{reflection.name}=".to_sym, "#{reflection.name}?".to_sym, "build_#{reflection.name}".to_sym, "create_#{reflection.name}".to_sym]
|
|
142
149
|
end
|
|
143
150
|
end
|
|
144
|
-
delegate
|
|
151
|
+
delegate(*(delegate_methods << {:to => proxy_symbol}))
|
|
145
152
|
|
|
146
153
|
proxy_class.belongs_to(:base, :class_name => options[:proxy_class_belongs_to], :foreign_key => primary_key_name) if options[:proxy_class_belongs_to]
|
|
147
154
|
|