backlog 0.5.0 → 0.5.1

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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.5.1 2007-08-06
2
+
3
+ * Improved backlog edit task list
4
+
1
5
  == 0.5.0 2007-08-06
2
6
 
3
7
  * Changed first time workflow to add new backlog
@@ -30,7 +30,7 @@ class TasksController < ApplicationController
30
30
  if @task.period
31
31
  back_or_redirect_to :controller => 'periods', :action => 'show', :id => @task.period, :task => @task.id
32
32
  else
33
- back_or_redirect_to :controller => 'backlogs', :action => 'show', :id => @task.backlog, :task => @task.id
33
+ back_or_redirect_to :controller => 'backlogs', :action => :edit, :id => @task.backlog, :task => @task.id
34
34
  end
35
35
  else
36
36
  populate_layout
@@ -6,8 +6,14 @@
6
6
  <table>
7
7
  <%= render :partial => '/tasks/backlog_header', :locals => {:backlog => @backlog, :track_times => tasks.find {|t|t.period && t.period.active?}} %>
8
8
  <% i = 0 %>
9
+ <% current_period = nil %>
9
10
  <% for @task in tasks %>
10
- <%= render :partial => '/tasks/task/', :locals => {:task => @task, :i => i += 1, :active => true, :highlight => false, :update => :maincontent} %>
11
+ <% if @task.period != current_period %>
12
+ <tr><th colspan="6"><%=@task.period ? h(@task.period.name) : l(:unplanned_tasks)%></th></tr>
13
+ <%= render :partial => '/tasks/fields_header', :locals => {:backlog => @backlog, :track_times => tasks.find {|t|t.period && t.period.active?}} %>
14
+ <% current_period = @task.period %>
15
+ <% end %>
16
+ <%= render :partial => '/tasks/task/', :locals => {:task => @task, :i => i += 1, :active => true, :highlight_task => false, :update => :maincontent} %>
11
17
  <% end %>
12
18
  </table>
13
19
  </div>
@@ -38,9 +38,10 @@ function handleEvent(field, event, id) {
38
38
  <% if task.backlog != current_backlog %>
39
39
  <%= '<tr><td>&nbsp;</td></tr>' if current_backlog %>
40
40
  <%=render :partial => '/tasks/backlog_header', :locals => { :backlog => task.backlog, :track_times => @tasks.find {|t|t.period && t.period.active?} } %>
41
+ <%= render :partial => '/tasks/fields_header', :locals => { :backlog => task.backlog, :track_times => @tasks.find {|t|t.period && t.period.active?} } %>
41
42
  <% current_backlog = task.backlog %>
42
43
  <% end %>
43
- <%=render :partial => '/tasks/task', :locals => { :task => task, :i => i, :active => true, :highlight => task == @selected_task, :update => :spotlight } %>
44
+ <%=render :partial => '/tasks/task', :locals => { :task => task, :i => i, :active => true, :highlight_task => task == @selected_task, :update => :spotlight } %>
44
45
  <% i += 1 %>
45
46
  <% end %>
46
47
  </table>
@@ -22,7 +22,7 @@
22
22
  <% end %>
23
23
  </tr>
24
24
  <% for task in @completed_tasks %>
25
- <%=render :partial => '/tasks/task', :locals => { :task => task, :i => i, :active => false } %>
25
+ <%=render :partial => '/tasks/task', :locals => { :task => task, :i => i, :active => false, :highlight_task => task == @selected_task } %>
26
26
  <% i += 1 %>
27
27
  <% end %>
28
28
  </table>
@@ -11,11 +11,3 @@
11
11
  </td>
12
12
  <td width="*"/>
13
13
  </tr>
14
- <tr>
15
- <th/>
16
- <th align="center">#</th>
17
- <th><%=l :task %></th>
18
- <th><%=l :start if @backlog.track_times? && track_times %></th>
19
- <th><%=l :done if @backlog.track_done? %></th>
20
- <th width="*"><% l :todo if @backlog.track_todo? %></th>
21
- </tr>
@@ -0,0 +1,10 @@
1
+ <% @backlog = backlog %>
2
+
3
+ <tr>
4
+ <th/>
5
+ <th align="center">#</th>
6
+ <th><%=l :task %></th>
7
+ <th><%=l :start if @backlog.track_times? && track_times %></th>
8
+ <th><%=l :done if @backlog.track_done? %></th>
9
+ <th width="*"><% l :todo if @backlog.track_todo? %></th>
10
+ </tr>
@@ -1,5 +1,5 @@
1
1
  <% @task = task %>
2
- <tr valign="top" <%='class="highlight"' if highlight %>>
2
+ <tr valign="top" <%='class="highlight"' if highlight_task %>>
3
3
  <td width="1">
4
4
  <% if @task.enable_subtasks? && active && (@task.period.nil? || @task.period.active_or_future?) %>
5
5
  <% form_tag({:controller => 'tasks', :action => :specify, :id => @task}) do %>
@@ -63,7 +63,7 @@
63
63
  <%= @task.todo %>
64
64
  <% end %>
65
65
  <% end -%>
66
- <% if (not @task.track_times?) && !@task.work_started? && @task.period.active? %>
66
+ <% if (not @task.track_times?) && !@task.work_started? && @task.period && @task.period.active? %>
67
67
  <%= image_button_to('checkmark.png', l(:complete), :controller => 'tasks', :action => :finish, :id => @task)%>
68
68
  <% end -%>
69
69
  <% end -%>
@@ -78,7 +78,7 @@
78
78
  <%= image_detour_to('ernes_stop.png', l(:abort), {:controller => 'tasks', :action => :abort, :id => @task}, nil, true)%>
79
79
  <% end %>
80
80
  <% end %>
81
- <% elsif not @task.period.passed? && @task.leaf? %>
81
+ <% elsif (not @task.period.passed?) && @task.leaf? %>
82
82
  <%=image_detour_to('/images/eraser.png', l(:reopen), {:controller => 'tasks', :action => :reopen, :id => @task}, nil, true) %>
83
83
  <% end -%>
84
84
  <% end -%>
@@ -47,7 +47,7 @@ function handleEvent(field, event, id) {
47
47
  </tr>
48
48
  <% i = 0 %>
49
49
  <% for task in @tasks %>
50
- <%=render :partial => 'task', :locals => { :task => task, :i => i, :active => true, :highlight => task == @selected_task } %>
50
+ <%=render :partial => 'task', :locals => { :task => task, :i => i, :active => true, :highlight_task => task == @selected_task } %>
51
51
  <% i += 1 %>
52
52
  <% end %>
53
53
  </table>
data/lang/en.yaml CHANGED
@@ -81,6 +81,7 @@ track_todo: Estimates
81
81
  track_done: Track work done
82
82
  track_times: Track start and stop times
83
83
  tuesday: Tuesday
84
+ unplanned_tasks: Unplanned tasks
84
85
  up: Up
85
86
  user: User
86
87
  wednesday: Wednesday
data/lang/no.yaml CHANGED
@@ -80,6 +80,7 @@ track_todo: Estimater
80
80
  track_done: Spor utført arbeid
81
81
  track_times: Spor start- og stopptider
82
82
  tuesday: Tirsdag
83
+ unplanned_tasks: Ikke planlagte oppgaver
83
84
  up: Opp
84
85
  user: Bruker
85
86
  wednesday: Onsdag
@@ -74,7 +74,7 @@ class TasksControllerTest < Test::Unit::TestCase
74
74
  assert_equal [], task.errors.full_messages
75
75
 
76
76
  assert_response :redirect
77
- assert_redirected_to :controller => 'backlogs', :action => 'show', :id => 2
77
+ assert_redirected_to :controller => 'backlogs', :action => :edit, :id => 2
78
78
 
79
79
  assert_equal num_tasks + 1, Task.count
80
80
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: backlog
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.0
6
+ version: 0.5.1
7
7
  date: 2007-08-06 00:00:00 +02:00
8
8
  summary: Application to aid collecting, processing, organizing, reviewing and doing tasks.
9
9
  require_paths:
@@ -1724,6 +1724,7 @@ files:
1724
1724
  - app/views/tasks/list.rhtml
1725
1725
  - app/views/tasks/_form.rhtml
1726
1726
  - app/views/tasks/new.rhtml
1727
+ - app/views/tasks/_fields_header.rhtml
1727
1728
  - app/views/tasks/edit.rhtml
1728
1729
  - app/views/tasks/list_started.rhtml
1729
1730
  - app/views/tasks/_task.rhtml