backlog 0.10.8 → 0.11.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 +14 -0
- data/app/controllers/backlogs_controller.rb +2 -0
- data/app/controllers/work_accounts_controller.rb +51 -0
- data/app/controllers/works_controller.rb +72 -29
- data/app/helpers/application_helper.rb +1 -2
- data/app/helpers/work_accounts_helper.rb +2 -0
- data/app/models/backlog.rb +10 -3
- data/app/models/configuration.rb +2 -0
- data/app/models/customer.rb +2 -0
- data/app/models/task.rb +26 -5
- data/app/models/work.rb +18 -13
- data/app/models/work_account.rb +12 -0
- data/app/views/backlogs/_form.rhtml +5 -4
- data/app/views/layouts/_left_top.rhtml +1 -8
- data/app/views/layouts/_notice.rhtml +15 -0
- data/app/views/layouts/wide.rhtml +4 -10
- data/app/views/tasks/_fields_header.rhtml +1 -1
- data/app/views/work_accounts/_form.rhtml +10 -0
- data/app/views/work_accounts/_name_list.rhtml +5 -0
- data/app/views/work_accounts/edit.rhtml +9 -0
- data/app/views/work_accounts/list.rhtml +27 -0
- data/app/views/work_accounts/new.rhtml +8 -0
- data/app/views/work_accounts/show.rhtml +8 -0
- data/app/views/works/_description_list.rhtml +5 -0
- data/app/views/works/_form.rhtml +8 -2
- data/app/views/works/_row.rhtml +32 -0
- data/app/views/works/_row_field.rhtml +3 -0
- data/app/views/works/daily_work_sheet.rhtml +35 -59
- data/app/views/works/edit.rhtml +1 -1
- data/app/views/works/list.rhtml +1 -1
- data/app/views/works/timeliste.rhtml +3 -3
- data/app/views/works/update_row.rjs +6 -0
- data/app/views/works/weekly_work_sheet.rhtml +5 -5
- data/bin/backlog +4 -1
- data/bin/backlog_init.d +13 -0
- data/config/database.yml +0 -4
- data/config/environment.rb +1 -1
- data/db/backup/backlogs.yml +118 -0
- data/db/backup/estimates.yml +7371 -0
- data/db/backup/groups.yml +37 -0
- data/db/backup/parties.yml +2 -0
- data/db/backup/periods.yml +386 -0
- data/db/backup/task_files.yml +2 -0
- data/db/backup/tasks.yml +15770 -0
- data/db/backup/users.yml +209 -0
- data/db/backup/works.yml +6203 -0
- data/db/migrate/018_create_groups.rb +0 -1
- data/db/migrate/021_create_work_accounts.rb +113 -0
- data/db/schema.rb +35 -10
- data/lang/en.yaml +3 -0
- data/lang/no.yaml +3 -0
- data/lib/change_column_null_migration_fix.rb +13 -0
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +1 -0
- data/nbproject/private/private.xml +4 -0
- data/nbproject/private/rake-t.txt +95 -0
- data/nbproject/project.properties +4 -0
- data/nbproject/project.xml +9 -0
- data/public/Frav/303/246rsskjema.xls +0 -0
- data/public/stylesheets/scaffold.css +74 -0
- data/test/fixtures/backlogs.yml +2 -0
- data/test/fixtures/configurations.yml +5 -0
- data/test/fixtures/customers.yml +7 -0
- data/test/fixtures/tasks.yml +1 -0
- data/test/fixtures/users.yml +3 -5
- data/test/fixtures/work_accounts.yml +7 -0
- data/test/fixtures/works.yml +11 -0
- data/test/functional/backlogs_controller_test.rb +1 -1
- data/test/functional/work_accounts_controller_test.rb +93 -0
- data/test/functional/works_controller_test.rb +6 -2
- data/test/integration/user_system_test.rb +1 -1
- data/test/performance/test.rb +4 -1
- data/test/unit/configuration_test.rb +10 -0
- data/test/unit/customer_test.rb +10 -0
- data/test/unit/estimate_test.rb +1 -1
- data/test/unit/group_test.rb +1 -1
- data/test/unit/period_test.rb +1 -1
- data/test/unit/task_file_test.rb +1 -1
- data/test/unit/task_test.rb +1 -1
- data/test/unit/work_account_test.rb +10 -0
- data/test/unit/work_test.rb +1 -1
- data/vendor/plugins/goldspike/lib/java_library.rb +5 -11
- data/vendor/plugins/goldspike/lib/run.rb +1 -2
- data/vendor/plugins/goldspike/lib/war_config.rb +7 -10
- metadata +50 -3
- data/app/views/tasks/_description_list.rhtml +0 -5
@@ -0,0 +1,12 @@
|
|
1
|
+
class WorkAccount < ActiveRecord::Base
|
2
|
+
has_many :backlogs, :dependent => :nullify
|
3
|
+
has_many :works, :dependent => :destroy
|
4
|
+
|
5
|
+
validates_inclusion_of :track_times, :in => [true, false], :allow_nil => true, :message => ActiveRecord::Errors.default_error_messages[:blank]
|
6
|
+
validates_length_of :invoice_code, :allow_nil => true, :maximum => 255
|
7
|
+
|
8
|
+
def enable_invoicing?
|
9
|
+
invoice_code && invoice_code.length > 0
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
@@ -9,13 +9,14 @@
|
|
9
9
|
<label for="backlog_track_todo"><%=l :track_todo%></label>
|
10
10
|
</p>
|
11
11
|
|
12
|
+
<!-- TODO (uwe): Edit this on WorkAccount -->
|
12
13
|
<p>
|
13
14
|
<%= check_box 'backlog', 'track_done' %>
|
14
|
-
<label for="
|
15
|
+
<label for="backlog_track_done"><%=l :track_done%></label>
|
15
16
|
</p>
|
16
17
|
|
17
18
|
<p>
|
18
|
-
|
19
|
+
<%#= check_box 'backlog', 'track_times' %>
|
19
20
|
<label for="backlog_track_times"><%=l :track_times%></label>
|
20
21
|
</p>
|
21
22
|
|
@@ -35,8 +36,8 @@
|
|
35
36
|
</p>
|
36
37
|
|
37
38
|
<p>
|
38
|
-
<label for="
|
39
|
-
<%=
|
39
|
+
<label for="backlog_work_account"><%=l :work_account%></label><br/>
|
40
|
+
<%=select 'backlog', 'work_account', @work_accounts.map {|wa| [wa.name, wa.id]}.sort %>
|
40
41
|
</p>
|
41
42
|
|
42
43
|
<!--[eoform:task]-->
|
@@ -13,14 +13,7 @@
|
|
13
13
|
<% if user? %>| <%=link_to user.email, :controller => 'user', :action => :edit%><% end %>
|
14
14
|
</div>
|
15
15
|
<div id="header">
|
16
|
-
|
17
|
-
<div id="notice">
|
18
|
-
<%=flash[:notice]%>
|
19
|
-
<%=flash['notice']%>
|
20
|
-
<%=flash[:message]%>
|
21
|
-
<%=flash['message']%>
|
22
|
-
</div>
|
23
|
-
<% end %>
|
16
|
+
<%=render :partial => '/layouts/notice'%>
|
24
17
|
<%= error_messages_for :backlog %>
|
25
18
|
<%= error_messages_for :estimate %>
|
26
19
|
<%= error_messages_for :group %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div id="notice">
|
2
|
+
<% if flash[:notice] || flash['notice'] || flash[:message] || flash['message'] %>
|
3
|
+
<%=flash[:notice]%>
|
4
|
+
<%=flash['notice']%>
|
5
|
+
<%=flash[:message]%>
|
6
|
+
<%=flash['message']%>
|
7
|
+
<%=javascript_tag update_page {|page|
|
8
|
+
page.show 'notice'
|
9
|
+
} %>
|
10
|
+
<% else %>
|
11
|
+
<%=javascript_tag update_page {|page|
|
12
|
+
page.hide 'notice'
|
13
|
+
} %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
@@ -10,16 +10,10 @@
|
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<%=render :partial => '/layouts/left_top'%>
|
18
|
-
<%= yield %>
|
19
|
-
</td>
|
20
|
-
<td valign="top" width="*"></td>
|
21
|
-
</tr>
|
22
|
-
</table>
|
13
|
+
<div width="793" align="center">
|
14
|
+
<%=render :partial => '/layouts/left_top'%>
|
15
|
+
<%= yield %>
|
16
|
+
</div>
|
23
17
|
|
24
18
|
</body>
|
25
19
|
</html>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<th/>
|
3
3
|
<th align="center"><%=active ? '#' : l(:resolution_abr)%></th>
|
4
4
|
<th><%=l :task %></th>
|
5
|
-
<th><%=l :start if backlog.track_times? && track_times %></th>
|
5
|
+
<th><%=l :start if backlog.work_account && backlog.work_account.track_times? && track_times %></th>
|
6
6
|
<th/>
|
7
7
|
<th><%=l :done if backlog.track_done? %></th>
|
8
8
|
<th width="*"><%=l :todo if backlog.track_todo? %></th>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= error_messages_for 'work_account' %>
|
2
|
+
|
3
|
+
<!--[form:work_account]-->
|
4
|
+
<p><label for="work_account_name">Name</label><br/>
|
5
|
+
<%= text_field 'work_account', 'name' %></p>
|
6
|
+
|
7
|
+
<p><label for="work_account_invoice_code">Invoice code</label><br/>
|
8
|
+
<%= text_field 'work_account', 'invoice_code' %></p>
|
9
|
+
<!--[eoform:work_account]-->
|
10
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<h1>Editing work_account</h1>
|
2
|
+
|
3
|
+
<% form_tag :action => 'update', :id => @work_account do %>
|
4
|
+
<%= render :partial => 'form' %>
|
5
|
+
<%= submit_tag 'Edit' %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<%= link_to 'Show', :action => 'show', :id => @work_account %> |
|
9
|
+
<%= link_to 'Back', :action => 'list' %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<h1>Listing work_accounts</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<% for column in WorkAccount.content_columns %>
|
6
|
+
<th><%= column.human_name %></th>
|
7
|
+
<% end %>
|
8
|
+
</tr>
|
9
|
+
|
10
|
+
<% for work_account in @work_accounts %>
|
11
|
+
<tr>
|
12
|
+
<% for column in WorkAccount.content_columns %>
|
13
|
+
<td><%=h work_account.send(column.name) %></td>
|
14
|
+
<% end %>
|
15
|
+
<td><%= link_to 'Show', :action => 'show', :id => work_account %></td>
|
16
|
+
<td><%= link_to 'Edit', :action => 'edit', :id => work_account %></td>
|
17
|
+
<td><%= link_to 'Destroy', { :action => 'destroy', :id => work_account }, :confirm => 'Are you sure?', :method => :post %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<%= link_to 'Previous page', { :page => @work_account_pages.current.previous } if @work_account_pages.current.previous %>
|
23
|
+
<%= link_to 'Next page', { :page => @work_account_pages.current.next } if @work_account_pages.current.next %>
|
24
|
+
|
25
|
+
<br />
|
26
|
+
|
27
|
+
<%= link_to 'New work_account', :action => 'new' %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<ul class="tasks">
|
2
|
+
<% for task in @tasks do -%>
|
3
|
+
<li class="task"><div class="name"><%="#{h task.root_task.backlog.name}: " unless @backlog%><%=h task.description %></div><div class="email" align="right"><span class="informal"><%=h task.root_task.backlog.name %></span></div></li>
|
4
|
+
<% end -%>
|
5
|
+
</ul>
|
data/app/views/works/_form.rhtml
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
<%= error_messages_for 'work' %>
|
2
|
-
|
3
1
|
<!--[form:work]-->
|
4
2
|
|
3
|
+
<p><%=l :work_account%>:<br/>
|
4
|
+
<% if @work.work_account %>
|
5
|
+
<h4><%=link_to @work.work_account.name, :controller => 'work_accounts', :action => :edit, :id => @work.work_account_id %></h4></p>
|
6
|
+
<%= hidden_field 'work', 'work_account_id' %>
|
7
|
+
<% else %>
|
8
|
+
<%= select 'work', 'work_account_id', @work_accounts.map{|wa| [wa.name, wa.id]}.sort %></p>
|
9
|
+
<% end %>
|
10
|
+
|
5
11
|
<p><%=l :task%>:<br/>
|
6
12
|
<% if @work.task %>
|
7
13
|
<h4><%=link_to @work.task.description, :controller => 'tasks', :action => :edit, :id => @work.task.id %></h4></p>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<tr id="work_<%=@work.id%>">
|
2
|
+
<td>
|
3
|
+
<%=image_detour_to('period.png', l(:period), :controller => 'periods', :action => :show, :id => @work.task.period) if @work.task %>
|
4
|
+
</td>
|
5
|
+
<td>
|
6
|
+
<% if @work.task %>
|
7
|
+
<%=link_to(@work.task.root_task.backlog.name, :controller => 'backlogs', :action => :show)%> /
|
8
|
+
<%=link_to(@work.task.description, :controller => 'tasks', :action => :edit)%>
|
9
|
+
<% end %>
|
10
|
+
</td>
|
11
|
+
<td>
|
12
|
+
<%=link_to(@work.work_account.name, :controller => 'work_accounts', :action => :show, :id => @work.work_account.id) if @work.work_account%>
|
13
|
+
</td>
|
14
|
+
<td>
|
15
|
+
<%=in_place_editor_field :work, :description, :id => "work_#{@work.id}_description", :size => 16, :class => :task_description%>
|
16
|
+
</td>
|
17
|
+
<td align="right">
|
18
|
+
<%=render :partial => 'row_field', :locals => {:field => 'started_at_time'} %>
|
19
|
+
</td>
|
20
|
+
<td align="right">
|
21
|
+
</td>
|
22
|
+
<td align="right">
|
23
|
+
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id} do |f|%>
|
24
|
+
<%=f.text_field :hours_time, :value => t(@work.hours), :class => 'task_hours'%>
|
25
|
+
<% end %>
|
26
|
+
</td>
|
27
|
+
<td align="right">
|
28
|
+
<form>
|
29
|
+
<%=image_detour_to('ernes_stop.png', l(:delete), {:controller => 'works', :action => :destroy, :id => @work, :confirm => true}, nil, true)%>
|
30
|
+
</form>
|
31
|
+
</td>
|
32
|
+
</tr>
|
@@ -1,7 +1,5 @@
|
|
1
1
|
<% @page_title = "#{l :experimental} #{l :daily_work_sheet} on #{@date}" + (" for #{user.login}" if user?) %>
|
2
2
|
|
3
|
-
<% track_times = @works.find {|w| w.task.track_times?} %>
|
4
|
-
|
5
3
|
<div id="spotlight">
|
6
4
|
|
7
5
|
<div style="float: left"><%=link_to(image_tag('arrow_left.png'), :id => (@date - 7))%></div>
|
@@ -14,87 +12,64 @@
|
|
14
12
|
<table sstyle="width: 100%" border="0">
|
15
13
|
<tr>
|
16
14
|
<td/>
|
17
|
-
<th><%=l :backlog %></th>
|
18
|
-
<th><%=l :
|
19
|
-
|
20
|
-
<th><%=l :started_at
|
21
|
-
<th><%=l :completed_at
|
22
|
-
<% end %>
|
15
|
+
<th><%=l :backlog %> / <%=l :task %></th>
|
16
|
+
<th><%=l :account %></th>
|
17
|
+
<th><%=l :description %></th>
|
18
|
+
<th><%=l :started_at %></th>
|
19
|
+
<th><%=l :completed_at %></th>
|
23
20
|
<th><%=l :done %></th>
|
21
|
+
<th/>
|
24
22
|
</tr>
|
25
23
|
|
26
24
|
<% day_total = 0 %>
|
27
25
|
<% for @work in @works %>
|
28
26
|
<% day_total += @work.hours if @work %>
|
29
|
-
|
30
|
-
<td>
|
31
|
-
<%=image_detour_to('period.png', l(:period), :controller => 'periods', :action => :show, :id => @work.task.period) %>
|
32
|
-
</td>
|
33
|
-
<td>
|
34
|
-
<form>
|
35
|
-
<%=text_field :work, :backlog_name, :id => "work_#{@work.id}_backlog_name", :value => @work.task.root_task.backlog.name, :size => 16 %>
|
36
|
-
</form>
|
37
|
-
</td>
|
38
|
-
<td>
|
39
|
-
<form>
|
40
|
-
<%=text_field :work, :task_description, :id => "work_#{@work.id}_task_description", :value => @work.task.description, :size => 16, :class => :task_description %>
|
41
|
-
</form>
|
42
|
-
</td>
|
43
|
-
<% if track_times %>
|
44
|
-
<td align="right">
|
45
|
-
<form>
|
46
|
-
<%=text_field :work, :started_at_time, :value => (@work.started_at.strftime('%H:%M')), :class => 'task_time' %>
|
47
|
-
</form>
|
48
|
-
</td>
|
49
|
-
<td align="right">
|
50
|
-
<form>
|
51
|
-
<%=text_field :work, :completed_at_time, :value => (@work.completed_at.strftime('%H:%M')), :class => 'task_time' %>
|
52
|
-
<%=image_button_to('arrow_right.png', l(:calculate), :controller => 'periods', :action => :show, :id => @work.task.period) %>
|
53
|
-
</form>
|
54
|
-
</td>
|
55
|
-
<% end %>
|
56
|
-
<td align="right">
|
57
|
-
<form>
|
58
|
-
<%=text_field :work, :hours_time, :value => t(@work.hours), :class => 'task_hours' %>
|
59
|
-
</form>
|
60
|
-
</td>
|
61
|
-
</tr>
|
27
|
+
<%=render :partial => 'row'%>
|
62
28
|
<% end %>
|
63
|
-
</table>
|
64
29
|
|
65
30
|
|
66
|
-
<% form_tag :controller => 'works', :action => 'create' do %>
|
67
|
-
<%=submit_tag('checkmark', :value => l(:save), :
|
31
|
+
<% form_tag with_detour(:controller => 'works', :action => 'create') do %>
|
32
|
+
<%=submit_tag('checkmark', :value => l(:save), :style => 'display: none')%>
|
68
33
|
<%=hidden_field :work, :completed_at, :value => Time.now %>
|
69
|
-
|
34
|
+
|
70
35
|
<tr>
|
71
36
|
<td width="22"/>
|
72
37
|
<td>
|
73
|
-
|
38
|
+
<script type="text/javascript">
|
39
|
+
function set_backlog_for_task() {
|
40
|
+
work_task_description_auto_completer.url = '<%=url_for(:action => :auto_complete_for_work_task_description)%>?backlog_name=' + $('work_backlog_name').value;
|
41
|
+
}
|
42
|
+
|
43
|
+
</script>
|
44
|
+
<%=text_field_with_auto_complete :work, :backlog_name, {:value => '', :size => 16}, {:after_update_element => "function(element, value) {set_backlog_for_task()}"} %>
|
45
|
+
<%=text_field_with_auto_complete(:work, :task_description, {:value => '', :size => 16, :class => :task_description}, :url => url_for({:action => :auto_complete_for_work_task_description, :backlog_name => "' + $('work_backlog_name').value + '", :escape => false}), :after_update_element => "function(element,value) {if ($('work_backlog_name').value == '') { $('work_backlog_name').value = element.value.split(/: /)[0];element.value = element.value.split(/: /)[1]};set_backlog_for_task();return true; }") %>
|
74
46
|
</td>
|
75
|
-
<td>
|
76
|
-
<%=text_field_with_auto_complete :work, :
|
47
|
+
<td valign="bottom">
|
48
|
+
<%=text_field_with_auto_complete :work, :work_account_name, {:value => '', :size => 16, :class => :task_description} %>
|
49
|
+
</td>
|
50
|
+
<td valign="bottom">
|
51
|
+
<%=text_field_with_auto_complete :work, :description, {:size => 16, :class => :task_description} %>
|
77
52
|
</td>
|
78
|
-
|
79
|
-
<td align="right">
|
53
|
+
<td align="right" valign="bottom">
|
80
54
|
<%=text_field :work, :started_at_time, :value => @work.started_at.strftime('%H:%M'), :class => 'task_time' %>
|
81
55
|
</td>
|
82
|
-
<td align="right">
|
56
|
+
<td align="right" valign="bottom">
|
83
57
|
<%=text_field :work, :completed_at_time, :class => 'task_time', :value => @work.completed_at.strftime('%H:%M') %>
|
84
|
-
|
58
|
+
</td>
|
59
|
+
<td align="right" valign="bottom">
|
60
|
+
<%=text_field :work, :hours_time, :value => '', :class => 'task_hours' %>
|
85
61
|
</td>
|
86
|
-
|
87
|
-
|
88
|
-
<%=text_field :work, :hours_time, :value => t(@work.hours), :class => 'task_hours' %>
|
62
|
+
<td valign="bottom">
|
63
|
+
<%=image_button_to('arrow_left.png', l(:calculate), :controller => 'backlogs', :action => :show) %>
|
89
64
|
</td>
|
90
65
|
</tr>
|
91
66
|
<tr>
|
92
67
|
<td/>
|
93
68
|
<th><%=l :totals %></th>
|
94
|
-
<% if track_times %>
|
95
69
|
<th/>
|
96
70
|
<th/>
|
97
|
-
|
71
|
+
<th/>
|
72
|
+
<th/>
|
98
73
|
<th class="hours"><%='%.2f' % day_total %></th>
|
99
74
|
</tr>
|
100
75
|
</table>
|
@@ -114,7 +89,8 @@
|
|
114
89
|
|
115
90
|
<script type="text/JavaScript">
|
116
91
|
//<!--
|
117
|
-
$('
|
118
|
-
|
92
|
+
start_field = $('work_description')
|
93
|
+
start_field.focus();
|
94
|
+
start_field.select();
|
119
95
|
//-->
|
120
96
|
</script>
|
data/app/views/works/edit.rhtml
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= submit_tag l(:save), :style => 'display: none' %>
|
6
6
|
<%= render :partial => 'form' %>
|
7
7
|
<%= submit_tag l(:save) %>
|
8
|
-
<%=
|
8
|
+
<%= back_or_link_to l(:back), :controller => 'periods', :action => 'list_work', :id => (@work.task && @work.task.period) %>
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
</div>
|
data/app/views/works/list.rhtml
CHANGED
@@ -453,7 +453,7 @@
|
|
453
453
|
<% invoice_works_per_day = @backlogs[backlog_id][0]%>
|
454
454
|
<% if invoice_works_per_day.find{|total| total > 0} %>
|
455
455
|
<Row>
|
456
|
-
<Cell ss:StyleID="s24"><Data ss:Type="Number"><%=Backlog.find(backlog_id).
|
456
|
+
<Cell ss:StyleID="s24"><Data ss:Type="Number"><%=Backlog.find(backlog_id).invoice_code %></Data></Cell>
|
457
457
|
<Cell ss:StyleID="s25"/>
|
458
458
|
<Cell ss:StyleID="s25"><Data ss:Type="String"> X</Data></Cell>
|
459
459
|
<Cell ss:StyleID="s25"/>
|
@@ -471,8 +471,8 @@
|
|
471
471
|
<% internal_works_per_day = @backlogs[backlog_id][1]%>
|
472
472
|
<% if internal_works_per_day.find{|total| total > 0} %>
|
473
473
|
<Row>
|
474
|
-
<Cell ss:StyleID="s24"><Data ss:Type="
|
475
|
-
<Cell ss:StyleID="s25"
|
474
|
+
<Cell ss:StyleID="s24"><Data ss:Type="String"><%=Backlog.find(backlog_id).name %></Data></Cell>
|
475
|
+
<Cell ss:StyleID="s25"><Data ss:Type="String">Mesta2</Data></Cell>
|
476
476
|
<Cell ss:StyleID="s25"/>
|
477
477
|
<Cell ss:StyleID="s25"/>
|
478
478
|
<Cell ss:StyleID="s25"/>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% @page_title = l(:weekly_work_sheet) + (@period ? " for #{@period}" : '') + (user? ? " for #{user.login}" : '')%>
|
2
2
|
|
3
3
|
<div id="spotlight">
|
4
|
-
<% track_times = @rows.find {|r| r.find {|w| w && w.
|
5
|
-
<% invoicing = @rows.find {|r| r.find {|w| w && w.
|
4
|
+
<% track_times = @rows.find {|r| r.find {|w| w && w.work_account.track_times?}} %>
|
5
|
+
<% invoicing = @rows.find {|r| r.find {|w| w && w.work_account.enable_invoicing?}} %>
|
6
6
|
<% columns = 2 + (track_times ? 2 : 0) + (invoicing ? 1 : 0) %>
|
7
7
|
|
8
8
|
<div style="float: left"><%=link_to(image_tag('arrow_left.png'), :id => (@week - 1))%></div>
|
@@ -55,9 +55,9 @@ end %>]
|
|
55
55
|
<% day_totals[day] += @work.hours %>
|
56
56
|
<% week_total += @work.hours %>
|
57
57
|
<td>
|
58
|
-
<%=link_to(h(@work.task.period.name), :controller => 'periods', :action => :show, :id => @work.task.period) if @work.task.period %>
|
59
|
-
<%=link_to(h(@work.task.root_task.backlog.name), :controller => 'backlogs', :action => :show, :id => @work.task.root_task.backlog) %>
|
60
|
-
<%=link_to(h(@work.task.description), :controller => 'periods', :action => :show, :id => @work.task.period, :task_id => @work.task.id) %>
|
58
|
+
<%=link_to(h(@work.task.period.name), :controller => 'periods', :action => :show, :id => @work.task.period) if @work.task && @work.task.period %>
|
59
|
+
<%=link_to(h(@work.task.root_task.backlog.name), :controller => 'backlogs', :action => :show, :id => @work.task.root_task.backlog) if @work.task %>
|
60
|
+
<%=link_to(h(@work.task.description), :controller => 'periods', :action => :show, :id => @work.task.period, :task_id => @work.task.id) if @work.task%>
|
61
61
|
<%=link_to(l(:edit), :controller => 'works', :action => :edit, :id => @work.id) %>
|
62
62
|
</td>
|
63
63
|
<% if invoicing %>
|