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.
Files changed (86) hide show
  1. data/History.txt +14 -0
  2. data/app/controllers/backlogs_controller.rb +2 -0
  3. data/app/controllers/work_accounts_controller.rb +51 -0
  4. data/app/controllers/works_controller.rb +72 -29
  5. data/app/helpers/application_helper.rb +1 -2
  6. data/app/helpers/work_accounts_helper.rb +2 -0
  7. data/app/models/backlog.rb +10 -3
  8. data/app/models/configuration.rb +2 -0
  9. data/app/models/customer.rb +2 -0
  10. data/app/models/task.rb +26 -5
  11. data/app/models/work.rb +18 -13
  12. data/app/models/work_account.rb +12 -0
  13. data/app/views/backlogs/_form.rhtml +5 -4
  14. data/app/views/layouts/_left_top.rhtml +1 -8
  15. data/app/views/layouts/_notice.rhtml +15 -0
  16. data/app/views/layouts/wide.rhtml +4 -10
  17. data/app/views/tasks/_fields_header.rhtml +1 -1
  18. data/app/views/work_accounts/_form.rhtml +10 -0
  19. data/app/views/work_accounts/_name_list.rhtml +5 -0
  20. data/app/views/work_accounts/edit.rhtml +9 -0
  21. data/app/views/work_accounts/list.rhtml +27 -0
  22. data/app/views/work_accounts/new.rhtml +8 -0
  23. data/app/views/work_accounts/show.rhtml +8 -0
  24. data/app/views/works/_description_list.rhtml +5 -0
  25. data/app/views/works/_form.rhtml +8 -2
  26. data/app/views/works/_row.rhtml +32 -0
  27. data/app/views/works/_row_field.rhtml +3 -0
  28. data/app/views/works/daily_work_sheet.rhtml +35 -59
  29. data/app/views/works/edit.rhtml +1 -1
  30. data/app/views/works/list.rhtml +1 -1
  31. data/app/views/works/timeliste.rhtml +3 -3
  32. data/app/views/works/update_row.rjs +6 -0
  33. data/app/views/works/weekly_work_sheet.rhtml +5 -5
  34. data/bin/backlog +4 -1
  35. data/bin/backlog_init.d +13 -0
  36. data/config/database.yml +0 -4
  37. data/config/environment.rb +1 -1
  38. data/db/backup/backlogs.yml +118 -0
  39. data/db/backup/estimates.yml +7371 -0
  40. data/db/backup/groups.yml +37 -0
  41. data/db/backup/parties.yml +2 -0
  42. data/db/backup/periods.yml +386 -0
  43. data/db/backup/task_files.yml +2 -0
  44. data/db/backup/tasks.yml +15770 -0
  45. data/db/backup/users.yml +209 -0
  46. data/db/backup/works.yml +6203 -0
  47. data/db/migrate/018_create_groups.rb +0 -1
  48. data/db/migrate/021_create_work_accounts.rb +113 -0
  49. data/db/schema.rb +35 -10
  50. data/lang/en.yaml +3 -0
  51. data/lang/no.yaml +3 -0
  52. data/lib/change_column_null_migration_fix.rb +13 -0
  53. data/nbproject/private/config.properties +0 -0
  54. data/nbproject/private/private.properties +1 -0
  55. data/nbproject/private/private.xml +4 -0
  56. data/nbproject/private/rake-t.txt +95 -0
  57. data/nbproject/project.properties +4 -0
  58. data/nbproject/project.xml +9 -0
  59. data/public/Frav/303/246rsskjema.xls +0 -0
  60. data/public/stylesheets/scaffold.css +74 -0
  61. data/test/fixtures/backlogs.yml +2 -0
  62. data/test/fixtures/configurations.yml +5 -0
  63. data/test/fixtures/customers.yml +7 -0
  64. data/test/fixtures/tasks.yml +1 -0
  65. data/test/fixtures/users.yml +3 -5
  66. data/test/fixtures/work_accounts.yml +7 -0
  67. data/test/fixtures/works.yml +11 -0
  68. data/test/functional/backlogs_controller_test.rb +1 -1
  69. data/test/functional/work_accounts_controller_test.rb +93 -0
  70. data/test/functional/works_controller_test.rb +6 -2
  71. data/test/integration/user_system_test.rb +1 -1
  72. data/test/performance/test.rb +4 -1
  73. data/test/unit/configuration_test.rb +10 -0
  74. data/test/unit/customer_test.rb +10 -0
  75. data/test/unit/estimate_test.rb +1 -1
  76. data/test/unit/group_test.rb +1 -1
  77. data/test/unit/period_test.rb +1 -1
  78. data/test/unit/task_file_test.rb +1 -1
  79. data/test/unit/task_test.rb +1 -1
  80. data/test/unit/work_account_test.rb +10 -0
  81. data/test/unit/work_test.rb +1 -1
  82. data/vendor/plugins/goldspike/lib/java_library.rb +5 -11
  83. data/vendor/plugins/goldspike/lib/run.rb +1 -2
  84. data/vendor/plugins/goldspike/lib/war_config.rb +7 -10
  85. metadata +50 -3
  86. 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="backlog_track_doneo"><%=l :track_done%></label>
15
+ <label for="backlog_track_done"><%=l :track_done%></label>
15
16
  </p>
16
17
 
17
18
  <p>
18
- <%= check_box 'backlog', 'track_times' %>
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="backlog_enable_invoice_code"><%=l :invoice_code%></label><br/>
39
- <%= text_field 'backlog', 'invoice_code', :size => 12 %>
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
- <% if flash[:notice] || flash['notice'] || flash[:message] || flash['message'] %>
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
- <table style="width: 100%; margin: 0; border: 0; padding: 0; background: transparent">
14
- <tr>
15
- <td valign="top" width="*"><div align="right" style="color: green"><%= flash[:notice] %></div></td>
16
- <td valign="top" width="793" align="center">
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,5 @@
1
+ <ul class="backlogs">
2
+ <% for account in @accounts do -%>
3
+ <li class="task"><div class="name"><%=h account.name %></div></li>
4
+ <% end -%>
5
+ </ul>
@@ -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,8 @@
1
+ <h1>New work_account</h1>
2
+
3
+ <% form_tag :action => 'create' do %>
4
+ <%= render :partial => 'form' %>
5
+ <%= submit_tag "Create" %>
6
+ <% end %>
7
+
8
+ <%= link_to 'Back', :action => 'list' %>
@@ -0,0 +1,8 @@
1
+ <% for column in WorkAccount.content_columns %>
2
+ <p>
3
+ <b><%= column.human_name %>:</b> <%=h @work_account.send(column.name) %>
4
+ </p>
5
+ <% end %>
6
+
7
+ <%= link_to 'Edit', :action => 'edit', :id => @work_account %> |
8
+ <%= link_to 'Back', :action => 'list' %>
@@ -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>
@@ -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>
@@ -0,0 +1,3 @@
1
+ <% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :field => field} do |f|%>
2
+ <%=text_field :work, field, :class => ('task_time' if field=~/_at_time$/) %>
3
+ <% end %>
@@ -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 :task %></th>
19
- <% if track_times %>
20
- <th><%=l :started_at if track_times %></th>
21
- <th><%=l :completed_at if track_times %></th>
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
- <tr>
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), :sstyle => 'display: none')%>
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
- <table sstyle="width: 100%" border="0">
34
+
70
35
  <tr>
71
36
  <td width="22"/>
72
37
  <td>
73
- <%=text_field_with_auto_complete :work, :backlog_name, {:value => '', :size => 16}, {} %>
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, :task_description, {:value => '', :size => 16, :class => :task_description, :onfocus => "work_task_description_auto_completer.url = '#{url_for(:action => :auto_complete_for_work_task_description)}?backlog_name=' + $('work_backlog_name').value"}, :url => url_for({:action => :auto_complete_for_work_task_description, :backlog_name => "' + $('work_backlog_name').value + '", :escape => false}) %>
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
- <% if track_times %>
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
- <%=image_button_to('arrow_right.png', l(:calculate), :controller => 'backlogs', :action => :show) %>
58
+ </td>
59
+ <td align="right" valign="bottom">
60
+ <%=text_field :work, :hours_time, :value => '', :class => 'task_hours' %>
85
61
  </td>
86
- <% end %>
87
- <td align="right">
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
- <% end %>
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
- $('work_backlog_name').focus();
118
- $('work_backlog_name').select();
92
+ start_field = $('work_description')
93
+ start_field.focus();
94
+ start_field.select();
119
95
  //-->
120
96
  </script>
@@ -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
- <%= link_to l(:back), :controller => 'periods', :action => 'list_work', :id => @work.task.period %>
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>
@@ -16,7 +16,7 @@
16
16
 
17
17
  <% for work in @works %>
18
18
  <tr>
19
- <td><%=work.task.description %></td>
19
+ <td><%=work.task.description if work.task %></td>
20
20
  <td><%=work.user && work.user.login %></td>
21
21
  <td><%=work.hours %></td>
22
22
  <% if @period && @period.track_times? %>
@@ -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).id %></Data></Cell>
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="Number"><%=Backlog.find(backlog_id).invoice_code %></Data></Cell>
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"/>
@@ -0,0 +1,6 @@
1
+ page.replace "work_#{@work.id}", :partial => 'row', :object => @work
2
+ page.replace "notice", :partial => '/layouts/notice'
3
+ page.select("tr#work_#{@work.id} td input#work_#{@field}").each do |elem|
4
+ elem.select
5
+ # elem.focus
6
+ end
@@ -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.task.track_times?}} %>
5
- <% invoicing = @rows.find {|r| r.find {|w| w && w.task.enable_invoicing?}} %>
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 %>