backlog 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,13 @@
1
+ == 0.7.6 2007-08-22
2
+
3
+ * Changed Task edit view to use Ajax to update the Period link to make it more sponsive when moving a task between periods.
4
+ * Changed the LARGE chart size from 1440x900 to 1368x768 for display on our large screen TV
5
+ * Fixed bug for displaying burn down chart for groups that have no active period.
6
+ * Made 404 error page a bit bit nicer.
7
+ * Added .png extension to burn down chart for period.
8
+ * Added link to burn down charts to README.txt
9
+ * Localized header for active period
10
+
1
11
  == 0.7.5 2007-08-19
2
12
 
3
13
  * Changed gem to work on MacOSX
data/README.txt CHANGED
@@ -36,3 +36,12 @@ Currently only port number is settable.
36
36
  Example:
37
37
 
38
38
  port: 3000
39
+
40
+ === Charts
41
+
42
+ You can get a large version of the burn down charts by appending "_large" to the URL.
43
+
44
+ Examples:
45
+
46
+ http://backlog.kubosch.no/periods/burn_down_chart_large/55.png
47
+ http://backlog.kubosch.no/parties/burn_down_chart_large/14.png
@@ -3,27 +3,30 @@ class PartiesController < ApplicationController
3
3
  skip_before_filter :authenticate_user, :only => [:burn_down_chart, :burn_down_chart_thumbnail, :burn_down_chart_large]
4
4
 
5
5
  def burn_down_chart
6
- send_burn_down_chart 640
6
+ send_burn_down_chart Chart::NORMAL
7
7
  end
8
8
 
9
9
  def burn_down_chart_thumbnail
10
- send_burn_down_chart 270
10
+ send_burn_down_chart Chart::THUMBNAIL
11
11
  end
12
12
 
13
13
  def burn_down_chart_large
14
- send_burn_down_chart '1440x900'
14
+ send_burn_down_chart Chart::LARGE
15
15
  end
16
16
 
17
17
  private
18
18
 
19
19
  def send_burn_down_chart(size)
20
20
  party = Party.find(params[:id])
21
- if period = party.periods.select{|p| p.active?}.first
21
+ if period = party.periods.select{|p| p.active?}.first || party.periods.last
22
22
  g = period.burn_down_graph(size)
23
23
  send_data(g.to_blob,
24
24
  :disposition => 'inline',
25
25
  :type => 'image/png',
26
26
  :filename => "burn_down_chart.png")
27
+ else
28
+ populate_layout
29
+ render :file => "public/404.html", :layout => true, :status => 404
27
30
  end
28
31
  end
29
32
 
@@ -87,15 +87,15 @@ class PeriodsController < ApplicationController
87
87
  end
88
88
 
89
89
  def burn_down_chart_thumbnail
90
- send_burn_down_chart 270
90
+ send_burn_down_chart Chart::THUMBNAIL
91
91
  end
92
92
 
93
93
  def burn_down_chart
94
- send_burn_down_chart 640
94
+ send_burn_down_chart Chart::NORMAL
95
95
  end
96
96
 
97
97
  def burn_down_chart_large
98
- send_burn_down_chart '1440x900'
98
+ send_burn_down_chart Chart::LARGE
99
99
  end
100
100
 
101
101
  def list_work
@@ -104,6 +104,14 @@ class PeriodsController < ApplicationController
104
104
  render :template => '/works/list'
105
105
  end
106
106
 
107
+ def make_link
108
+ if params[:id].to_i > 0
109
+ render :partial => 'link', :layout => false, :locals => {:period => Period.find(params[:id])}
110
+ else
111
+ render :text => ''
112
+ end
113
+ end
114
+
107
115
  private
108
116
 
109
117
  def send_burn_down_chart(size)
@@ -0,0 +1,5 @@
1
+ module Chart
2
+ THUMBNAIL = 270
3
+ NORMAL = 640
4
+ LARGE = '1368x768'
5
+ end
@@ -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, :format => :png), {: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, :format => :png %>
7
7
 
8
8
  </div>
@@ -0,0 +1,3 @@
1
+ <% if period %>
2
+ <%=image_detour_to('period.png', "#{l :period} #{period.name}", :controller => 'periods', :action => :edit, :id => period) %>
3
+ <% end %>
@@ -15,10 +15,12 @@
15
15
 
16
16
 
17
17
  <p><label for="task_period_id"><%=l :period%></label><br/>
18
- <%= select 'task', 'period_id', [['', '']] + @periods.map{|p| [p.name, p.id]}, {}, :onchange => "form.action = '#{url_for}'; form.submit();" %>
19
- <% if @task.period %>
20
- <%=image_detour_to('period.png', "#{l :period} #{@task.period.name}", :controller => 'periods', :action => :edit, :id => @task.period) %>
21
- <% end %>
18
+ <%= select 'task', 'period_id', [['', '']] + @periods.map{|p| [p.name, p.id]}, {},
19
+ :onchange => remote_function(:update => 'period_link',
20
+ :url => { :controller => 'periods', :action => 'make_link', :id => "'+value+'" }) %>
21
+ <span id="period_link">
22
+ <%=render :partial => '/periods/link', :locals => {:period => @task.period}%>
23
+ </span>
22
24
  <%=detour_to l(:new_period), :controller => 'periods', :action => :new %>
23
25
  </p>
24
26
 
@@ -2,6 +2,7 @@ file_charset: utf-8
2
2
 
3
3
  abort: Abort
4
4
  aborted: Aborted
5
+ active: Active
5
6
  administration: Administration
6
7
  assigned_to: Assigned to
7
8
  back: Back
@@ -2,6 +2,7 @@ file_charset: utf-8
2
2
 
3
3
  abort: Avbryt
4
4
  aborted: Avbrutt
5
+ active: Aktiv
5
6
  administration: Administrasjon
6
7
  assigned_to: Tilordnet
7
8
  back: Tilbake
@@ -3,6 +3,8 @@
3
3
  <html>
4
4
  <body>
5
5
  <h1>File not found</h1>
6
- <p>Change this error message for pages not found in public/404.html</p>
6
+ <p>The page you tried to reach does not exist. Please go to the main page and try again.</p>
7
+
8
+ <p><a href="/">Main Page</a>.</p>
7
9
  </body>
8
10
  </html>
@@ -1,3 +1,11 @@
1
+ first_group:
2
+ id: 1
3
+ type: Group
4
+
5
+ second_group:
6
+ id: 2
7
+ type: Group
8
+
1
9
  tesla:
2
10
  id: 1000001
3
11
  type: User
@@ -22,10 +30,3 @@ no_password_user:
22
30
  id: 1000007
23
31
  type: User
24
32
 
25
- first_group:
26
- id: 1
27
- type: Group
28
-
29
- second_group:
30
- id: 2
31
- type: Group
@@ -9,10 +9,10 @@ active:
9
9
  party_id: 1
10
10
  position: 2
11
11
  start_on: 2007-06-25
12
- end_on: 2907-07-08
12
+ end_on: <%=Date.today.strftime '%Y-%m-%d'%>
13
13
  future:
14
14
  id: 3
15
15
  party_id: 1
16
16
  position: 3
17
- start_on: 2907-07-09
17
+ start_on: <%=(Date.today + 1).strftime '%Y-%m-%d'%>
18
18
  end_on: 2907-07-22
@@ -12,7 +12,23 @@ class PartiesControllerTest < Test::Unit::TestCase
12
12
  end
13
13
 
14
14
  # Replace this with your real tests.
15
- def test_truth
16
- assert true
15
+ def test_burn_down_chart
16
+ get :burn_down_chart, :id => 1
17
17
  end
18
+
19
+ def test_burn_down_chart_no_period
20
+ get :burn_down_chart, :id => 2
21
+
22
+ assert_response 404
23
+ end
24
+
25
+ def test_burn_down_chart_unknown_party
26
+ begin
27
+ get :burn_down_chart, :id => 3
28
+ fail "Should raise exception"
29
+ rescue ActiveRecord::RecordNotFound
30
+ assert true
31
+ end
32
+ end
33
+
18
34
  end
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: backlog
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.5
7
- date: 2007-08-19 00:00:00 +02:00
6
+ version: 0.7.6
7
+ date: 2007-08-22 00:00:00 +02:00
8
8
  summary: Application to aid collecting, processing, organizing, reviewing and doing tasks.
9
9
  require_paths:
10
10
  - lib
11
11
  email: uwe@kubosch.no
12
12
  homepage: http://rubyforge.org/projects/backlog/
13
13
  rubyforge_project: backlog
14
- description: "== Backlog Welcome to Backlog! Backlog is a tool to help you collect and organize all your tasks, wether you are a single persion or a small or large group. A timekeeping module is also included to track time spent on the different tasks. === Backlog is not meant to be * an issue tracker with customer communication. === Installation * Install ruby * Install RubyGems * Install PostgreSQL * Install ImageMagick * run <tt>sudo gem install backlog -y</tt> * run <tt>sudo backlog setup_unix</tt> * run <tt>sudo backlog start</tt> === Updates * run <tt>sudo gem update -y</tt> * run <tt>sudo backlog setup_unix</tt> * run <tt>sudo backlog restart</tt> === Configuration You can set configuration parameters for backlog using the /etc/backlog.conf file. The format is YAML. Currently only port number is settable. Example: port: 3000"
14
+ description: "== Backlog Welcome to Backlog! Backlog is a tool to help you collect and organize all your tasks, wether you are a single persion or a small or large group. A timekeeping module is also included to track time spent on the different tasks. === Backlog is not meant to be * an issue tracker with customer communication. === Installation * Install ruby * Install RubyGems * Install PostgreSQL * Install ImageMagick * run <tt>sudo gem install backlog -y</tt> * run <tt>sudo backlog setup_unix</tt> * run <tt>sudo backlog start</tt> === Updates * run <tt>sudo gem update -y</tt> * run <tt>sudo backlog setup_unix</tt> * run <tt>sudo backlog restart</tt> === Configuration You can set configuration parameters for backlog using the /etc/backlog.conf file. The format is YAML. Currently only port number is settable. Example: port: 3000 === Charts You can get a large version of the burn down charts by appending \"_large\" to the URL. Examples: http://backlog.kubosch.no/periods/burn_down_chart_large/55.png http://backlog.kubosch.no/parties/burn_down_chart_large/14.png"
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
@@ -1688,6 +1688,7 @@ files:
1688
1688
  - app/helpers/parties_helper.rb
1689
1689
  - app/models
1690
1690
  - app/models/work.rb
1691
+ - app/models/chart.rb
1691
1692
  - app/models/group.rb
1692
1693
  - app/models/user_notify.rb
1693
1694
  - app/models/estimate.rb
@@ -1763,6 +1764,7 @@ files:
1763
1764
  - app/views/periods/new.rhtml
1764
1765
  - app/views/periods/edit.rhtml
1765
1766
  - app/views/periods/_title.rhtml
1767
+ - app/views/periods/_link.rhtml
1766
1768
  - app/views/periods/_burn_down_chart.rhtml
1767
1769
  test_files:
1768
1770
  - test/test_helper.rb