backlog 0.5.5 → 0.5.6
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
@@ -7,7 +7,7 @@ class TasksController < ApplicationController
|
|
7
7
|
def list_started
|
8
8
|
@tasks = Task.find_started(user)
|
9
9
|
@selected_task = Task.find_by_id(params[:id])
|
10
|
-
back_or_redirect_to
|
10
|
+
back_or_redirect_to(:controller => '', :action => '') if @tasks.empty?
|
11
11
|
end
|
12
12
|
|
13
13
|
def new
|
data/app/models/task.rb
CHANGED
@@ -47,7 +47,15 @@ class Task < ActiveRecord::Base
|
|
47
47
|
user_clause = " OR user_id = #{user.id}"
|
48
48
|
end
|
49
49
|
conditions = "completed_at IS NULL AND (user_id IS NULL#{user_clause})"
|
50
|
-
Work.find(:all, :conditions => conditions).map {|work| work.task}
|
50
|
+
Work.find(:all, :conditions => conditions).map {|work| work.task}.sort do |t1, t2|
|
51
|
+
if (backlog_sort = t1.backlog.name <=> t2.backlog.name) != 0
|
52
|
+
backlog_sort
|
53
|
+
elsif (period_sort = t1.period.end_on <=> t2.period.end_on) != 0
|
54
|
+
period_sort
|
55
|
+
else
|
56
|
+
t1.position <=> t2.position
|
57
|
+
end
|
58
|
+
end
|
51
59
|
end
|
52
60
|
|
53
61
|
def self.recent_conditions
|
@@ -1,10 +1,8 @@
|
|
1
|
-
<% @backlog = backlog %>
|
2
|
-
|
3
1
|
<tr>
|
4
2
|
<th/>
|
5
3
|
<th align="center">#</th>
|
6
4
|
<th><%=l :task %></th>
|
7
|
-
<th><%=l :start if
|
8
|
-
<th><%=l :done if
|
9
|
-
<th width="*"><% l :todo if
|
5
|
+
<th><%=l :start if backlog.track_times? && track_times %></th>
|
6
|
+
<th><%=l :done if backlog.track_done? %></th>
|
7
|
+
<th width="*"><% l :todo if backlog.track_todo? %></th>
|
10
8
|
</tr>
|
data/app/views/tasks/_task.rhtml
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= "-" if @task.children.size > 0 %>
|
15
15
|
</td>
|
16
16
|
<td>
|
17
|
-
<div id="task_<%=@task.id%>"<%=' class="tasks" onmouseover="this.style.border=\'1px solid black\'" onmouseout="this.style.border=\'1px solid transparent\'"' if active && (@task.period.nil? || @task.period.active_or_future?)%>>
|
17
|
+
<div id="task_<%=@task.id%>"<%=' class="tasks" onmouseover="this.style.border=\'1px solid black\'" onmouseout="this.style.border=\'1px solid transparent\'"' if active && (@task.period.nil? || @task.period.active_or_future?) && (not @task.work_started?) %>>
|
18
18
|
<% if @task.active? -%>
|
19
19
|
<%= in_place_editor_field(:task, :description, {:id => "#{@task.id}_description", :tabindex => i}, :url => url_for(:controller => 'tasks', :action => "set_task_description", :id => @task)) %>
|
20
20
|
<% else -%>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
<% if @task.work_started? -%>
|
30
30
|
<%= text_field 'work', 'started_at_time', :tabindex => i+1, :value => @task.started_work.started_at.strftime('%H:%M'),
|
31
31
|
:class => :task_time, :maxlength => 5, :onkeypress => "handleEvent(this, event, #{@task.id})" %>
|
32
|
-
<%=
|
32
|
+
<%= image_detour_to('ernes_stop.png', l(:end_work), {:controller => 'tasks', :action => :end_work, :id => @task.id}, nil, true) %>
|
33
33
|
<% elsif @task.track_times? && @task.period && @task.period.active? %>
|
34
34
|
<%= image_button_to 'hammer.png', l(:start_work), :controller => 'tasks', :action => :start_work, :id => @task.id %>
|
35
35
|
<% end -%>
|
@@ -85,7 +85,7 @@
|
|
85
85
|
</td>
|
86
86
|
</tr>
|
87
87
|
|
88
|
-
<% if active && (@task.period.nil? || @task.period.active_or_future?) %>
|
88
|
+
<% if active && (@task.period.nil? || @task.period.active_or_future?) && (not @task.work_started?) %>
|
89
89
|
<%= draggable_element "task_#{@task.id}", :revert => true, :constraint => "'vertical'" %>
|
90
90
|
<%= drop_receiving_element "task_#{@task.id}",
|
91
91
|
:update => update, :url => options_for_detour({:controller => 'tasks', :action => "move_to", :position => @task.position, :layout => false}),
|
@@ -37,19 +37,23 @@ function handleEvent(field, event, id) {
|
|
37
37
|
|
38
38
|
<% if @tasks %>
|
39
39
|
<table class="input">
|
40
|
-
<tr>
|
41
|
-
<th/>
|
42
|
-
<th align="center">#</th>
|
43
|
-
<th><%=l :task %></th>
|
44
|
-
<th><%=l :start %></th>
|
45
|
-
<th><%=l :done %></th>
|
46
|
-
<th><%=l :todo %></th>
|
47
|
-
</tr>
|
48
40
|
<% i = 0 %>
|
41
|
+
<% current_backlog = nil %>
|
42
|
+
<% current_period = nil %>
|
49
43
|
<% for task in @tasks %>
|
50
|
-
|
44
|
+
<% if task.backlog != current_backlog %>
|
45
|
+
<%= render :partial => '/tasks/backlog_header', :locals => {:backlog => task.backlog, :track_times => @tasks.find {|t|t.period && t.period.active?}} %>
|
46
|
+
<% current_backlog = task.backlog %>
|
47
|
+
<% end %>
|
48
|
+
<% if task.period != current_period %>
|
49
|
+
<tr><th colspan="6"><%=task.period ? h(task.period.name) : l(:unplanned_tasks)%></th></tr>
|
50
|
+
<%= render :partial => '/tasks/fields_header', :locals => {:backlog => task.backlog, :track_times => @tasks.find {|t|t.period && t.period.active?}} %>
|
51
|
+
<% current_period = task.period %>
|
52
|
+
<% end %>
|
53
|
+
<%=render :partial => 'task', :locals => { :task => task, :i => i, :active => true, :highlight_task => (task == @selected_task), :update => :spotlight } %>
|
51
54
|
<% i += 1 %>
|
52
55
|
<% end %>
|
56
|
+
|
53
57
|
</table>
|
54
58
|
<% else %>
|
55
59
|
<%=l :no_pending_tasks%>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
.task_description { width: 300px; }
|
2
2
|
.task_hours { width: 32px; }
|
3
|
-
.task_time { width: 40px
|
3
|
+
.task_time { width: 40px }
|
4
4
|
.image-submit {height: 22px; border: 0; margin-bottom: 1px; padding: 0; vertical-align: bottom; float: none;}
|
5
5
|
table.input {border-collapse: collapse}
|
6
6
|
table.input td {vertical-align: top; margin: 0; border: 0; padding: 0 1px;}
|
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.
|
6
|
+
version: 0.5.6
|
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:
|