backlog 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Rakefile +2 -1
- data/app/controllers/application.rb +55 -8
- data/app/controllers/groups_controller.rb +62 -0
- data/app/controllers/periods_controller.rb +13 -55
- data/app/controllers/tasks_controller.rb +9 -5
- data/app/controllers/works_controller.rb +43 -6
- data/app/helpers/application_helper.rb +20 -2
- data/app/helpers/groups_helper.rb +2 -0
- data/app/models/backlog.rb +19 -10
- data/app/models/estimate.rb +2 -1
- data/app/models/group.rb +11 -0
- data/app/models/party.rb +3 -0
- data/app/models/period.rb +43 -6
- data/app/models/task.rb +27 -14
- data/app/models/user.rb +37 -8
- data/app/models/work.rb +4 -6
- data/app/views/backlogs/_name_list.rhtml +5 -0
- data/app/views/backlogs/show.rhtml +4 -4
- data/app/views/groups/_form.rhtml +7 -0
- data/app/views/groups/edit.rhtml +31 -0
- data/app/views/groups/list.rhtml +27 -0
- data/app/views/groups/new.rhtml +8 -0
- data/app/views/layouts/wide.rhtml +2 -2
- data/app/views/periods/_burn_down_chart.rhtml +1 -1
- data/app/views/periods/_form.rhtml +13 -9
- data/app/views/periods/_show_active.rhtml +6 -12
- data/app/views/periods/_title.rhtml +4 -5
- data/app/views/periods/edit.rhtml +1 -1
- data/app/views/periods/new.rhtml +1 -1
- data/app/views/periods/show.rhtml +10 -6
- data/app/views/tasks/_backlog_header.rhtml +22 -0
- data/app/views/tasks/_description_list.rhtml +5 -0
- data/app/views/tasks/_form.rhtml +26 -7
- data/app/views/tasks/_task.rhtml +4 -4
- data/app/views/tasks/edit.rhtml +2 -3
- data/app/views/tasks/list_started.rhtml +1 -0
- data/app/views/tasks/new.rhtml +2 -2
- data/app/views/works/_buttons.rhtml +3 -0
- data/app/views/works/_form.rhtml +15 -10
- data/app/views/works/daily_work_sheet.rhtml +30 -18
- data/app/views/works/edit.rhtml +4 -4
- data/app/views/works/list.rhtml +2 -2
- data/app/views/works/new.rhtml +3 -2
- data/app/views/works/weekly_work_sheet.rhtml +2 -2
- data/bin/backlog +2 -0
- data/bin/backlog_init.d_kubosch_production +27 -0
- data/bin/copy_production2development.rb +33 -0
- data/config/database.yml +13 -7
- data/config/deploy_kubosch.rb +1 -0
- data/config/environment.rb +2 -0
- data/config/environments/development_mysql.rb +27 -0
- data/config/environments/kubosch_production_mysql.rb +21 -0
- data/config/routes.rb +1 -1
- data/db/migrate/{001_tasks.rb → 001_create_tasks.rb} +1 -1
- data/db/migrate/{002_backlogs.rb → 002_create_backlogs.rb} +2 -2
- data/db/migrate/003_add_estimation_points.rb +1 -1
- data/db/migrate/004_add_period.rb +2 -2
- data/db/migrate/013_create_estimates.rb +1 -1
- data/db/migrate/015_add_user_option.rb +9 -5
- data/db/migrate/017_insert_datek_projects.rb +13 -10
- data/db/migrate/018_create_groups.rb +115 -0
- data/db/schema.rb +72 -12
- data/lang/en.yaml +7 -0
- data/lang/no.yaml +7 -0
- data/lib/big_decimal_yaml_fix.rb +27 -0
- data/lib/class_table_inheritance.rb +163 -0
- data/lib/tasks/backup.rake +92 -0
- data/public/images/person.org.png +0 -0
- data/public/images/person.png +0 -0
- data/public/stylesheets/backlog.css +3 -1
- data/public/stylesheets/mwrt002.css +1 -1
- data/test/fixtures/groups.yml +6 -0
- data/test/fixtures/parties.yml +31 -0
- data/test/fixtures/periods.yml +2 -2
- data/test/fixtures/tasks.yml +2 -0
- data/test/fixtures/users.yml +6 -6
- data/test/functional/backlogs_controller_test.rb +1 -1
- data/test/functional/groups_controller_test.rb +120 -0
- data/test/functional/periods_controller_test.rb +1 -1
- data/test/functional/tasks_controller_test.rb +16 -1
- data/test/functional/user_controller_test.rb +8 -2
- data/test/test_helper.rb +5 -0
- data/test/unit/big_decimal_yaml_fix_test.rb +14 -0
- data/test/unit/estimate_test.rb +1 -1
- data/test/unit/group_test.rb +10 -0
- data/test/unit/user_test.rb +56 -44
- data/tmp/sessions/ruby_sess.22dec3e9df47fb4e +0 -0
- data/tmp/sessions/ruby_sess.8037e0ab58cbcf1a +0 -0
- data/vendor/plugins/activerecord_foreign_key_extensions/lib/active_record_extensions.rb +35 -0
- data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak +1 -0
- data/vendor/rails/{actionwebservice/lib/action_web_service/templates/scaffolds/layout.rhtml → railties/configs/empty.log} +0 -0
- metadata +36 -105
- data/backlog.gemspec +0 -21
- data/vendor/rails/actionwebservice/CHANGELOG +0 -265
- data/vendor/rails/actionwebservice/MIT-LICENSE +0 -21
- data/vendor/rails/actionwebservice/README +0 -364
- data/vendor/rails/actionwebservice/Rakefile +0 -171
- data/vendor/rails/actionwebservice/TODO +0 -32
- data/vendor/rails/actionwebservice/examples/googlesearch/README +0 -143
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb +0 -50
- data/vendor/rails/actionwebservice/examples/googlesearch/autoloading/google_search_controller.rb +0 -57
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/google_search_service.rb +0 -108
- data/vendor/rails/actionwebservice/examples/googlesearch/delegated/search_controller.rb +0 -7
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/google_search_api.rb +0 -50
- data/vendor/rails/actionwebservice/examples/googlesearch/direct/search_controller.rb +0 -58
- data/vendor/rails/actionwebservice/examples/metaWeblog/README +0 -17
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_api.rb +0 -60
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/blogger_service.rb +0 -34
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_api.rb +0 -67
- data/vendor/rails/actionwebservice/examples/metaWeblog/apis/meta_weblog_service.rb +0 -48
- data/vendor/rails/actionwebservice/examples/metaWeblog/controllers/xmlrpc_controller.rb +0 -16
- data/vendor/rails/actionwebservice/install.rb +0 -30
- data/vendor/rails/actionwebservice/lib/action_web_service.rb +0 -66
- data/vendor/rails/actionwebservice/lib/action_web_service/api.rb +0 -301
- data/vendor/rails/actionwebservice/lib/action_web_service/base.rb +0 -42
- data/vendor/rails/actionwebservice/lib/action_web_service/casting.rb +0 -138
- data/vendor/rails/actionwebservice/lib/action_web_service/client.rb +0 -3
- data/vendor/rails/actionwebservice/lib/action_web_service/client/base.rb +0 -28
- data/vendor/rails/actionwebservice/lib/action_web_service/client/soap_client.rb +0 -113
- data/vendor/rails/actionwebservice/lib/action_web_service/client/xmlrpc_client.rb +0 -58
- data/vendor/rails/actionwebservice/lib/action_web_service/container.rb +0 -3
- data/vendor/rails/actionwebservice/lib/action_web_service/container/action_controller_container.rb +0 -93
- data/vendor/rails/actionwebservice/lib/action_web_service/container/delegated_container.rb +0 -86
- data/vendor/rails/actionwebservice/lib/action_web_service/container/direct_container.rb +0 -69
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher.rb +0 -2
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +0 -207
- data/vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +0 -379
- data/vendor/rails/actionwebservice/lib/action_web_service/invocation.rb +0 -202
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol.rb +0 -4
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/abstract.rb +0 -112
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/discovery.rb +0 -37
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb +0 -176
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +0 -235
- data/vendor/rails/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +0 -122
- data/vendor/rails/actionwebservice/lib/action_web_service/scaffolding.rb +0 -283
- data/vendor/rails/actionwebservice/lib/action_web_service/struct.rb +0 -68
- data/vendor/rails/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb +0 -26
- data/vendor/rails/actionwebservice/lib/action_web_service/support/signature_types.rb +0 -226
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/layout.erb +0 -65
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.erb +0 -6
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/methods.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.erb +0 -29
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.erb +0 -30
- data/vendor/rails/actionwebservice/lib/action_web_service/templates/scaffolds/result.rhtml +0 -0
- data/vendor/rails/actionwebservice/lib/action_web_service/test_invoke.rb +0 -110
- data/vendor/rails/actionwebservice/lib/action_web_service/version.rb +0 -9
- data/vendor/rails/actionwebservice/setup.rb +0 -1379
- data/vendor/rails/actionwebservice/test/abstract_client.rb +0 -183
- data/vendor/rails/actionwebservice/test/abstract_dispatcher.rb +0 -551
- data/vendor/rails/actionwebservice/test/abstract_unit.rb +0 -45
- data/vendor/rails/actionwebservice/test/api_test.rb +0 -102
- data/vendor/rails/actionwebservice/test/apis/auto_load_api.rb +0 -3
- data/vendor/rails/actionwebservice/test/apis/broken_auto_load_api.rb +0 -2
- data/vendor/rails/actionwebservice/test/base_test.rb +0 -42
- data/vendor/rails/actionwebservice/test/casting_test.rb +0 -86
- data/vendor/rails/actionwebservice/test/client_soap_test.rb +0 -153
- data/vendor/rails/actionwebservice/test/client_xmlrpc_test.rb +0 -152
- data/vendor/rails/actionwebservice/test/container_test.rb +0 -73
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_soap_test.rb +0 -137
- data/vendor/rails/actionwebservice/test/dispatcher_action_controller_xmlrpc_test.rb +0 -59
- data/vendor/rails/actionwebservice/test/fixtures/db_definitions/mysql.sql +0 -8
- data/vendor/rails/actionwebservice/test/fixtures/users.yml +0 -12
- data/vendor/rails/actionwebservice/test/gencov +0 -3
- data/vendor/rails/actionwebservice/test/invocation_test.rb +0 -185
- data/vendor/rails/actionwebservice/test/run +0 -6
- data/vendor/rails/actionwebservice/test/scaffolded_controller_test.rb +0 -146
- data/vendor/rails/actionwebservice/test/struct_test.rb +0 -52
- data/vendor/rails/actionwebservice/test/test_invoke_test.rb +0 -112
@@ -0,0 +1,27 @@
|
|
1
|
+
<h1>Listing groups</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<% for column in Group.content_columns %>
|
6
|
+
<th><%= column.human_name %></th>
|
7
|
+
<% end %>
|
8
|
+
</tr>
|
9
|
+
|
10
|
+
<% for group in @groups %>
|
11
|
+
<tr>
|
12
|
+
<% for column in Group.content_columns %>
|
13
|
+
<td><%=h group.send(column.name) %></td>
|
14
|
+
<% end %>
|
15
|
+
<td><%= link_to 'Show', :action => 'show', :id => group %></td>
|
16
|
+
<td><%= link_to 'Edit', :action => 'edit', :id => group %></td>
|
17
|
+
<td><%= link_to 'Destroy', { :action => 'destroy', :id => group }, :confirm => 'Are you sure?', :method => :post %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<%= link_to 'Previous page', { :page => @group_pages.current.previous } if @group_pages.current.previous %>
|
23
|
+
<%= link_to 'Next page', { :page => @group_pages.current.next } if @group_pages.current.next %>
|
24
|
+
|
25
|
+
<br />
|
26
|
+
|
27
|
+
<%= link_to 'New group', :action => 'new' %>
|
@@ -12,9 +12,9 @@
|
|
12
12
|
|
13
13
|
<table style="width: 100%; margin: 0; border: 0; padding: 0; background: transparent">
|
14
14
|
<tr>
|
15
|
-
<td valign="top" width="*"></td>
|
16
|
-
<td valign="top" width="793" align="center"><%= yield %></td>
|
17
15
|
<td valign="top" width="*"><div align="right" style="color: green"><%= flash[:notice] %></div></td>
|
16
|
+
<td valign="top" width="793" align="center"><%= yield %></td>
|
17
|
+
<td valign="top" width="*"></td>
|
18
18
|
</tr>
|
19
19
|
</table>
|
20
20
|
|
@@ -3,6 +3,6 @@
|
|
3
3
|
<h4><%=l :burn_down_chart %></h4>
|
4
4
|
</div>
|
5
5
|
|
6
|
-
<%= link_to image_tag(url_for(:controller => 'periods', :action => :burn_down_chart_thumbnail, :id => @period), {:alt => 'Burn down chart'}), :action => :burn_down_chart, :id => @period %>
|
6
|
+
<%= link_to image_tag(url_for(:controller => 'periods', :action => :burn_down_chart_thumbnail, :id => @period, :format => :png), {:alt => 'Burn down chart'}), :action => :burn_down_chart, :id => @period %>
|
7
7
|
|
8
8
|
</div>
|
@@ -1,21 +1,23 @@
|
|
1
1
|
<%= error_messages_for 'period' %>
|
2
2
|
|
3
3
|
<!--[form:period]-->
|
4
|
-
<% if @period.
|
5
|
-
<p><label for="
|
6
|
-
<%= hidden_field 'period', '
|
4
|
+
<% if @period.party %>
|
5
|
+
<p><label for="period_party_id"><%=l @period.party.class.name.downcase.to_s%></label>:
|
6
|
+
<%= hidden_field 'period', 'party_id' %><%=detour_to h(@period.party.name), :controller => @period.party.type.name.downcase.pluralize, :action => :edit, :id => @period.party%></p>
|
7
7
|
<% else %>
|
8
|
-
<p><label for="
|
9
|
-
<%= select 'period', '
|
8
|
+
<p><label for="period_party_id"><%=l :group%>/<%=l :user%></label><br/>
|
9
|
+
<%= select 'period', 'party_id', @parties.map{|party| [party.name, party.id]} %></p>
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
<%= hidden_field 'period', 'position' %>
|
13
|
-
<% if @period.
|
13
|
+
<% if @period.party %>
|
14
14
|
<p><label for="period_position"><%=l :position%></label>:
|
15
|
-
<%= @period.
|
15
|
+
<%= @period.party.periods.last ? @period.party.periods.last.position + 1 : 1 %></p>
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<p><label for="period_start_on"><%=l :start_on%></label><br/>
|
19
|
+
<% minimum_date = @period.higher_item ? @period.higher_item.end_on + 1 : Date.today %>
|
20
|
+
<% maximum_date = @period.lower_item ? @period.lower_item.start_on - 1 : Date.today + 5*365 %>
|
19
21
|
<%= text_field 'period', 'start_on', :size => 10, :value => @period.start_on ? @period.start_on.strftime('%Y-%m-%d') : nil %>
|
20
22
|
<button id="trigger1">...</button>
|
21
23
|
<script type="text/javascript">//<![CDATA[
|
@@ -24,12 +26,13 @@
|
|
24
26
|
showOthers : true,
|
25
27
|
showsTime : false,
|
26
28
|
step : 1,
|
29
|
+
range : [<%=minimum_date.strftime('%Y.%m')%>, <%=maximum_date.strftime('%Y.%m')%>],
|
27
30
|
electric : false,
|
28
31
|
inputField : "period_start_on",
|
29
32
|
button : "trigger1",
|
30
33
|
ifFormat : "%Y-%m-%d",
|
31
34
|
daFormat : "%Y/%m/%d",
|
32
|
-
timeInterval
|
35
|
+
timeInterval : 15
|
33
36
|
});
|
34
37
|
//]]></script>
|
35
38
|
</p>
|
@@ -43,12 +46,13 @@
|
|
43
46
|
showOthers : true,
|
44
47
|
showsTime : false,
|
45
48
|
step : 1,
|
49
|
+
range : [<%=minimum_date.strftime('%Y.%m')%>, <%=maximum_date.strftime('%Y.%m')%>],
|
46
50
|
electric : false,
|
47
51
|
inputField : "period_end_on",
|
48
52
|
button : "trigger2",
|
49
53
|
ifFormat : "%Y-%m-%d",
|
50
54
|
daFormat : "%Y/%m/%d",
|
51
|
-
timeInterval
|
55
|
+
timeInterval : 15
|
52
56
|
});
|
53
57
|
//]]></script>
|
54
58
|
</p>
|
@@ -33,19 +33,13 @@ function handleEvent(field, event, id) {
|
|
33
33
|
|
34
34
|
<% if @tasks and not @tasks.empty? %>
|
35
35
|
<table class="input">
|
36
|
-
|
37
|
-
<% if @period.enable_subtasks? && @period.active? %>
|
38
|
-
<th/>
|
39
|
-
<% end %>
|
40
|
-
<th align="center">#</th>
|
41
|
-
<th><%=l :task %></th>
|
42
|
-
<th><%=l :start if @period.backlog.track_times? && @period.active? %></th>
|
43
|
-
<% if @period.backlog.track_done -%>
|
44
|
-
<th><%=l :done %></th>
|
45
|
-
<% end %>
|
46
|
-
<th><% if @period.backlog.track_todo %><%=l :todo %><% end %></th>
|
47
|
-
</tr>
|
36
|
+
<% current_backlog = nil %>
|
48
37
|
<% for task in @tasks %>
|
38
|
+
<% if task.backlog != current_backlog %>
|
39
|
+
<%= '<tr><td> </td></tr>' if current_backlog %>
|
40
|
+
<%=render :partial => '/tasks/backlog_header', :locals => { :backlog => task.backlog } %>
|
41
|
+
<% current_backlog = task.backlog %>
|
42
|
+
<% end %>
|
49
43
|
<%=render :partial => '/tasks/task', :locals => { :task => task, :i => i, :active => true } %>
|
50
44
|
<% i += 1 %>
|
51
45
|
<% end %>
|
@@ -1,10 +1,9 @@
|
|
1
1
|
<div class="btitle">
|
2
|
-
<%=
|
3
|
-
<%=link_to(image_tag(url_for("hammer.png"), :alt => l(:edit_works), :title => l(:edit_works), :class => 'image-submit'), :controller => 'periods', :action => 'list_work', :id => (@period ? @period.id : (@backlog && @backlog.periods.first ? @backlog.periods.first.id : nil)))%>
|
2
|
+
<%= render :partial => '/works/buttons'%>
|
4
3
|
<%=if @period.lower_item then link_to(image_tag(url_for("arrow_right.png"), :alt => "#{l :next} #{l :period}", :title => "#{l :next} #{l :period}", :class => 'image-submit'), :controller => 'periods', :action => :show, :id => @period.lower_item) end%>
|
5
4
|
<%=link_to(image_tag(url_for("period.png"), :alt => l(:period), :title => l(:period), :class => 'image-submit'), :controller => 'periods', :action => :edit, :id => @period) %>
|
6
|
-
<%=detour_to(image_tag(url_for("
|
5
|
+
<%=detour_to(image_tag(url_for("person.png"), :alt => l(:group), :title => l(:group), :class => 'image-submit'), :controller => 'groups', :action => :edit, :id => @period.party) %>
|
7
6
|
<%=if @period.higher_item then link_to(image_tag(url_for("arrow_left.png"), :alt => "#{l :previous} #{l :period}", :title => "#{l :previous} #{l :period}", :class => 'image-submit'), :controller => 'periods', :action => :show, :id => @period.higher_item) end%>
|
8
|
-
<%=unless @period.passed? then link_to(image_tag(url_for("add.png"), :alt => l(:add_task), :title => l(:add_task), :class => 'image-submit'), :controller => 'tasks', :action => 'new', :period_id => (@period ? @period.id : (@backlog && @backlog.periods.first ? @backlog.periods.first.id : nil))) end %>
|
9
|
-
<h4><%=h @period.
|
7
|
+
<%=unless @period.passed? then link_to(image_tag(url_for("add.png"), :alt => l(:add_task), :title => l(:add_task), :class => 'image-submit'), :controller => 'tasks', :action => 'new', :task => {:period_id => (@period ? @period.id : (@backlog && @backlog.periods.first ? @backlog.periods.first.id : nil))} ) end %>
|
8
|
+
<h4><%=h @period.name %> (<%=@period.start_on%> - <%=@period.end_on%>)</h4>
|
10
9
|
</div>
|
data/app/views/periods/new.rhtml
CHANGED
@@ -3,17 +3,20 @@
|
|
3
3
|
<div id="spotlight">
|
4
4
|
<%=render :partial => 'show_active', :locals => { :i => i } %>
|
5
5
|
</div>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
|
7
|
+
<%=render :partial => 'burn_down_chart' %>
|
8
|
+
|
9
|
+
<div id="rfeature">
|
10
|
+
<div class="btitle">
|
11
|
+
<h4><%=l(:completed_tasks) %></h4>
|
12
|
+
</div>
|
11
13
|
|
12
14
|
<table class="input">
|
13
15
|
<tr>
|
16
|
+
<th/>
|
14
17
|
<th align="left"><%=l :resolution %></th>
|
15
18
|
<th><%=l :task %></th>
|
16
|
-
<% if @period.
|
19
|
+
<% if @period.track_work? -%>
|
17
20
|
<th></th>
|
18
21
|
<th><%=l :done %></th>
|
19
22
|
<% end %>
|
@@ -23,4 +26,5 @@
|
|
23
26
|
<% i += 1 %>
|
24
27
|
<% end %>
|
25
28
|
</table>
|
29
|
+
|
26
30
|
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<% @backlog = backlog %>
|
2
|
+
<tr valign="top">
|
3
|
+
<td>
|
4
|
+
<%= image_detour_to('add.png', l(:new_task), nil, :controller => 'tasks', :action => :new, :task => {:backlog_id => @backlog.id, :period_id => @period.id})%>
|
5
|
+
</td>
|
6
|
+
<td colspan="7" valign="top">
|
7
|
+
<h5>
|
8
|
+
<%=h backlog.name %>
|
9
|
+
<%=image_detour_to("clipboard.png", l(:backlog), nil, :controller => 'backlogs', :action => :edit, :id => @backlog) %>
|
10
|
+
</h5>
|
11
|
+
</td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<th/>
|
15
|
+
<th align="center">#</th>
|
16
|
+
<th><%=l :task %></th>
|
17
|
+
<th><%=l :start if @period.track_times? && @period.active? %></th>
|
18
|
+
<% if @period.track_work? -%>
|
19
|
+
<th><%=l :done %></th>
|
20
|
+
<% end %>
|
21
|
+
<th><% if @backlog.track_todo? %><%=l :todo %><% end %></th>
|
22
|
+
</tr>
|
data/app/views/tasks/_form.rhtml
CHANGED
@@ -1,26 +1,45 @@
|
|
1
1
|
<%= error_messages_for 'task' %>
|
2
2
|
|
3
3
|
<!--[form:task]-->
|
4
|
-
<% if @task.
|
5
|
-
|
6
|
-
|
4
|
+
<% if @task.backlog.nil? || @task.new_record? %>
|
5
|
+
|
6
|
+
<p><label for="task_backlog_id"><%=l :backlog%></label><br/>
|
7
|
+
<%= select 'task', 'backlog_id', [['', '']] + @backlogs.map{|backlog| [backlog.name, backlog.id]}, {}, :onchange => "form.action = '#{url_for}'; form.submit();" %></p>
|
8
|
+
|
7
9
|
<% else %>
|
8
|
-
|
9
|
-
|
10
|
+
|
11
|
+
<p><label for="task_backlog_id"><%=l :backlog%></label>:
|
12
|
+
<%= hidden_field 'task', 'backlog_id' %><%=h @task.backlog.name%></p>
|
13
|
+
|
10
14
|
<% end %>
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
<p><label for="task_period_id"><%=l :period%></label><br/>
|
19
|
+
<%= select 'task', 'period_id', [['', '']] + @periods.map{|p| [p.name, p.id]} %>
|
20
|
+
<% if @task.period %>
|
21
|
+
<%=image_detour_to('person.png', 'Group', nil, :controller => 'groups', :action => :edit, :id => @task.period.party) %>
|
22
|
+
<% end %>
|
23
|
+
</p>
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
<% if @task.backlog %>
|
28
|
+
|
11
29
|
<p><label for="task_description"><%=l :task%></label><br/>
|
12
30
|
<%= text_field 'task', 'description', :size => 64, :maxlength => 80 %></p>
|
13
31
|
|
14
|
-
<% if @task.period.nil? || @task.
|
32
|
+
<% if @task.period.nil? || @task.enable_customer? %>
|
15
33
|
<p><label for="task_customer"><%=l :customer%></label><br/>
|
16
34
|
<%= text_field 'task', 'customer', :size => 64 %></p>
|
17
35
|
<% end %>
|
18
36
|
|
19
|
-
<% if @task.period.nil? || @task.
|
37
|
+
<% if @task.period.nil? || @task.track_todo? %>
|
20
38
|
<p><label for="task_initial_estimate"><%=l :estimate%></label><br/>
|
21
39
|
<%= text_field 'task', 'initial_estimate', :size => 4 %></p>
|
22
40
|
<% end %>
|
23
41
|
|
42
|
+
<% end %>
|
24
43
|
<!--[eoform:task]-->
|
25
44
|
|
26
45
|
|
data/app/views/tasks/_task.rhtml
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
<% @task = task %>
|
2
2
|
<tr valign="top">
|
3
|
-
<% if @task.enable_subtasks? && @task.period.active? && active %>
|
4
3
|
<td>
|
4
|
+
<% if @task.enable_subtasks? && @task.period.active_or_future? && active %>
|
5
5
|
<% form_tag({:controller => 'tasks', :action => :specify, :id => @task}) do %>
|
6
6
|
<%= image_button_to('add.png', l(:specify), :controller => 'tasks', :action => :specify, :id => @task.id)%>
|
7
7
|
<% end %>
|
8
|
-
</td>
|
9
8
|
<% end %>
|
9
|
+
</td>
|
10
10
|
<td align="left" valign="top">
|
11
11
|
<% form_tag({:controller => 'tasks', :action => 'update', :id => @task}) do %>
|
12
12
|
<%= submit_tag('checkmark', :value => l(:save), :style => 'display: none')%>
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<% end -%>
|
38
38
|
</td>
|
39
39
|
<% if @task.track_done? %>
|
40
|
-
<td align="left" nowrap="true">
|
40
|
+
<td align="<%=@task.loggable? ? 'center' : 'left'%>" nowrap="true">
|
41
41
|
<% if @task.loggable? || @task.finished_at -%>
|
42
42
|
<% form_tag({:controller => 'works', :action => (@task.work_started?(user) ? :edit : :create), :id => @task.started_work(user)}) do %>
|
43
43
|
<%= hidden_field('work', 'task_id', :value => @task.id)%>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
:class => :task_hours, :maxlength => 4, :onkeypress => "handleEvent(this, event, #{@task.id})",
|
48
48
|
:ondblclick => "form.elements[1].style.display = 'inline';this.style.display = 'none'" -%>
|
49
49
|
<% end -%>
|
50
|
-
|
50
|
+
<%=t @task.total_done if @task.total_done != 0%>
|
51
51
|
<% end -%>
|
52
52
|
<% end -%>
|
53
53
|
</td>
|
data/app/views/tasks/edit.rhtml
CHANGED
@@ -3,9 +3,8 @@
|
|
3
3
|
|
4
4
|
<% form_tag :action => 'update', :id => @task do %>
|
5
5
|
<%= render :partial => 'form' %>
|
6
|
-
<%= submit_tag
|
6
|
+
<%= submit_tag l(:save) %>
|
7
|
+
<%= link_to l(:back), :action => 'list' %>
|
7
8
|
<% end %>
|
8
9
|
|
9
|
-
<%= link_to 'Show', :action => 'show', :id => @task %> |
|
10
|
-
<%= link_to 'Back', :action => 'list' %>
|
11
10
|
</div>
|
data/app/views/tasks/new.rhtml
CHANGED
@@ -0,0 +1,3 @@
|
|
1
|
+
<%=image_detour_to('hammer.png', l(:weekly_work_sheet), nil, :controller => 'works', :action => :weekly_work_sheet)%>
|
2
|
+
<%=link_to(image_tag(url_for("hammer.png"), :alt => l(:daily_work_sheet), :title => l(:daily_work_sheet), :class => 'image-submit'), :controller => 'works', :action => :daily_work_sheet)%>
|
3
|
+
<%=link_to(image_tag(url_for("hammer.png"), :alt => l(:edit_works), :title => l(:edit_works), :class => 'image-submit'), :controller => 'periods', :action => 'list_work', :id => (@period ? @period.id : (@backlog && @backlog.periods.first ? @backlog.periods.first.id : nil)))%>
|
data/app/views/works/_form.rhtml
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<%= select 'work', 'task_id', @tasks.map{|task| [task.description, task.id]} %></p>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
<% if @work.task.nil? || @work.task.
|
13
|
+
<% if @work.task.nil? || @work.task.backlog.track_times?%>
|
14
14
|
<p><label for="work_started_at"><%=l :started_at%></label><br/>
|
15
15
|
<%= text_field 'work', 'started_at', :size => 16, :value => @work.started_at ? @work.started_at.strftime('%Y-%m-%d %H:%M') : nil %>
|
16
16
|
<button id="trigger1">...</button>
|
@@ -50,23 +50,24 @@
|
|
50
50
|
</p>
|
51
51
|
<% end %>
|
52
52
|
|
53
|
-
<% if @work.task.nil? || @work.task.
|
53
|
+
<% if @work.task.nil? || @work.task.backlog.enable_users %>
|
54
54
|
<p><label for="work_user_id"><%=l :user%></label><br/>
|
55
55
|
<%= select 'work', 'user_id', @users.map{|user| [user.login, user.id]} %></p>
|
56
56
|
<% end %>
|
57
57
|
|
58
|
-
<% if @work.task.nil? || @work.task.
|
59
|
-
<p><label for="
|
60
|
-
<%=
|
58
|
+
<% if @work.task.nil? || @work.task.backlog.track_done?%>
|
59
|
+
<p style="float: left;"><label for="work_hours"><%=l :hours%></label><br/>
|
60
|
+
<%= text_field 'work', 'hours_time', :class => :task_hours, :value => t(@work.hours) %></p>
|
61
61
|
<% end %>
|
62
62
|
|
63
|
-
<% if @work.task.nil? || @work.task.
|
64
|
-
<p><label for="
|
65
|
-
<%= text_field 'work', 'hours', :class => :task_hours %></p>
|
63
|
+
<% if @work.task.nil? || @work.task.backlog.enable_invoicing? %>
|
64
|
+
<p style="float: left;"><br/><%= check_box 'work', 'invoice' %><label for="work_invoice"><%=l :invoice%>?</label></p>
|
66
65
|
<% end %>
|
67
66
|
|
68
|
-
|
69
|
-
|
67
|
+
<br clear="all"/>
|
68
|
+
|
69
|
+
<% if @work.task.nil? || @work.task.backlog.track_todo?%>
|
70
|
+
<p><label for="estimate_todo"><%=l :todo%></label><br/>
|
70
71
|
<%= text_field 'estimate', 'todo', :class => :task_hours %>
|
71
72
|
<%= image_tag('checkmark.png', :onclick => "document.forms[0].elements['estimate_todo'].value='0'", :style => 'vertical-align: bottom; height: 24px; float: none')%>
|
72
73
|
<br clear="all" />
|
@@ -83,3 +84,7 @@
|
|
83
84
|
<% end %>
|
84
85
|
|
85
86
|
<!--[eoform:work]-->
|
87
|
+
|
88
|
+
<script type="text/JavaScript">
|
89
|
+
document.getElementById('work_started_at').select();
|
90
|
+
</script>
|
@@ -6,7 +6,8 @@
|
|
6
6
|
|
7
7
|
<table sstyle="width: 100%" border="0">
|
8
8
|
<tr>
|
9
|
-
<
|
9
|
+
<td/>
|
10
|
+
<th><%=l :task %></th>
|
10
11
|
<% if track_times %>
|
11
12
|
<th><%=l :started_at if track_times %></th>
|
12
13
|
<th><%=l :completed_at if track_times %></th>
|
@@ -18,10 +19,17 @@
|
|
18
19
|
<% for @work in @works %>
|
19
20
|
<% day_total += @work.hours if @work %>
|
20
21
|
<tr>
|
22
|
+
<td>
|
23
|
+
<%=image_detour_to('period.png', l(:period), nil, :controller => 'periods', :action => :show, :id => @work.task.period) %>
|
24
|
+
</td>
|
25
|
+
<td>
|
26
|
+
<form>
|
27
|
+
<%=text_field :work, :backlog_name, :id => "work_#{@work.id}_backlog_name", :value => @work.task.backlog.name, :size => 16 %>
|
28
|
+
</form>
|
29
|
+
</td>
|
21
30
|
<td>
|
22
31
|
<form>
|
23
|
-
<%=
|
24
|
-
<%=text_field :work, :backlog, :value => @work.task.period.backlog.name, :size => 16 %>
|
32
|
+
<%=text_field :work, :task_description, :id => "work_#{@work.id}_task_description", :value => @work.task.description, :size => 16, :class => :task_description %>
|
25
33
|
</form>
|
26
34
|
</td>
|
27
35
|
<% if track_times %>
|
@@ -33,7 +41,7 @@
|
|
33
41
|
<td align="right">
|
34
42
|
<form>
|
35
43
|
<%=text_field :work, :completed_at, :value => (@work.completed_at.strftime('%H:%M')), :class => 'task_time' %>
|
36
|
-
<%=image_button_to('arrow_right', l(:calculate), :controller => 'periods', :action => :show, :id => @work.task.period) %>
|
44
|
+
<%=image_button_to('arrow_right.png', l(:calculate), :controller => 'periods', :action => :show, :id => @work.task.period) %>
|
37
45
|
</form>
|
38
46
|
</td>
|
39
47
|
<% end %>
|
@@ -44,32 +52,35 @@
|
|
44
52
|
</td>
|
45
53
|
</tr>
|
46
54
|
<% end %>
|
55
|
+
</table>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
<form>
|
60
|
+
<table sstyle="width: 100%" border="0">
|
47
61
|
<tr>
|
62
|
+
<td width="22"/>
|
48
63
|
<td>
|
49
|
-
|
50
|
-
|
51
|
-
|
64
|
+
<%=text_field_with_auto_complete :work, :backlog_name, {:value => '', :size => 16} %>
|
65
|
+
</td>
|
66
|
+
<td>
|
67
|
+
<%=text_field_with_auto_complete :work, :task_description, {:value => '', :size => 16, :class => :task_description} %>
|
52
68
|
</td>
|
53
69
|
<% if track_times %>
|
54
70
|
<td align="right">
|
55
|
-
|
56
|
-
<%=text_field :work, :started_at, :class => 'task_time' %>
|
57
|
-
</form>
|
71
|
+
<%=text_field :work, :started_at, :value => @work.started_at.strftime('%H:%M'), :class => 'task_time' %>
|
58
72
|
</td>
|
59
73
|
<td align="right">
|
60
|
-
|
61
|
-
<%=
|
62
|
-
<%=image_button_to('arrow_right', l(:calculate), :controller => 'periods', :action => :show) %>
|
63
|
-
</form>
|
74
|
+
<%=text_field :work, :completed_at, :class => 'task_time', :value => @work.completed_at.strftime('%H:%M') %>
|
75
|
+
<%=image_button_to('arrow_right.png', l(:calculate), :controller => 'periods', :action => :show) %>
|
64
76
|
</td>
|
65
77
|
<% end %>
|
66
78
|
<td align="right">
|
67
|
-
|
68
|
-
<%=text_field :work, :hours, :value => '%.2f' % @work.hours, :class => 'task_hours' %>
|
69
|
-
</form>
|
79
|
+
<%=text_field :work, :hours, :class => 'task_hours' %>
|
70
80
|
</td>
|
71
81
|
</tr>
|
72
82
|
<tr>
|
83
|
+
<td/>
|
73
84
|
<th><%=l :totals %></th>
|
74
85
|
<% if track_times %>
|
75
86
|
<th/>
|
@@ -78,6 +89,7 @@
|
|
78
89
|
<th class="hours"><%='%.2f' % day_total %></th>
|
79
90
|
</tr>
|
80
91
|
</table>
|
92
|
+
</form>
|
81
93
|
|
82
94
|
|
83
95
|
<% if @period %>
|
@@ -92,7 +104,7 @@
|
|
92
104
|
<script type="text/JavaScript">
|
93
105
|
//<!--
|
94
106
|
form = document.forms[document.forms.length - 1];
|
95
|
-
element = form.elements[form.elements.length -
|
107
|
+
element = form.elements[form.elements.length - 5]
|
96
108
|
element.focus();
|
97
109
|
element.select();
|
98
110
|
//-->
|