[PROJXP [PATCH] Add burndown chart to the sprint view page. #52
by Darryl L. Pierce
Added three report graphic sizes (800x600, 1024x768 and 1280x1024)
and a dropdown to the sprint view page to select the size.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/controllers/report_controller.rb | 28 ++++++++++++++++++++++++++--
app/views/report/burndown.html.erb | 5 +++--
app/views/sprints/show.html.erb | 5 +++++
test/functional/report_controller_test.rb | 2 +-
4 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/app/controllers/report_controller.rb b/app/controllers/report_controller.rb
index 6993fd6..e8c9bad 100644
--- a/app/controllers/report_controller.rb
+++ b/app/controllers/report_controller.rb
@@ -20,6 +20,17 @@
class ReportController < ApplicationController
before_filter :load_sprint, :except => [:index, :effort]
before_filter :load_user, :only => [:effort]
+ before_filter :load_size, :only => [:burndown, :burndown_graphic]
+
+ SIZE_SMALL = "800x600"
+ SIZE_MEDIUM = "1024x768"
+ SIZE_LARGE = "1280x1024"
+
+ REPORT_SIZES = {
+ SIZE_SMALL => 0,
+ SIZE_MEDIUM => 1,
+ SIZE_LARGE => 2
+ }.sort_by { |k,v| v }
def index
@title = "Reports"
@@ -28,6 +39,7 @@ class ReportController < ApplicationController
def burndown
@title = "Burndown Chart For Sprint #{(a)sprint.id}"
+ @size = params[:size]
end
def effort
@@ -47,8 +59,8 @@ class ReportController < ApplicationController
if @sprint.can_view_burndown?
@data = @sprint.burndown_data
- g = Gruff::Line.new('800x600')
- g.title = "Burndown Chart For '#{(a)sprint.title}'"
+ g = Gruff::Line.new(@size)
+ g.title = "#{(a)sprint.title}"
g.font = File.expand_path('Courier.ttf', RAILS_ROOT)
g.data("Remaining hours", @data)
@@ -83,4 +95,16 @@ class ReportController < ApplicationController
redirect_to error_url
end
end
+
+ def load_size
+ size = params[:size]
+ if size
+ size = size.to_i
+ if (0...REPORT_SIZES.size).include? params[:size].to_i
+ @size = REPORT_SIZES[size.to_i][0]
+ end
+ end
+
+ @size = REPORT_SIZES[0][0] unless @size
+ end
end
diff --git a/app/views/report/burndown.html.erb b/app/views/report/burndown.html.erb
index b5fa23f..8b1b8c0 100644
--- a/app/views/report/burndown.html.erb
+++ b/app/views/report/burndown.html.erb
@@ -1,3 +1,4 @@
-<img src="<%= url_for :action => :burndown_graphic, :id => @sprint.id %>"
+<img src="<%= url_for :action => :burndown_graphic, :id => @sprint.id,
+ :size => @size %>"
alt="Burndown"
- align="center" />
\ No newline at end of file
+ align="center" />
diff --git a/app/views/sprints/show.html.erb b/app/views/sprints/show.html.erb
index df475c5..46482c8 100644
--- a/app/views/sprints/show.html.erb
+++ b/app/views/sprints/show.html.erb
@@ -21,6 +21,11 @@
image_tag("icons/sprint_plan.png", :alt => "Plan this sprint"),
plan_product_sprint_path(@product, @sprint)) %>
<% end %>
+ <% if @sprint.can_view_burndown? %>
+ <%= form_tag(:controller => :report, :action => :burndown, :id => @sprint.id) %>
+ <%= select_tag :size, options_for_select(ReportController::REPORT_SIZES) %>
+ <%= submit_tag "Burndown" %>
+ <% end %>
</td>
</tr>
diff --git a/test/functional/report_controller_test.rb b/test/functional/report_controller_test.rb
index 4a0a64a..3948d8f 100644
--- a/test/functional/report_controller_test.rb
+++ b/test/functional/report_controller_test.rb
@@ -46,7 +46,7 @@ class ReportControllerTest < ActionController::TestCase
# Ensures that a burndown chart works as expected.
#
def test_burndown_graphic
- get :burndown_graphic, {:id => @sprint.id}
+ get :burndown_graphic, {:id => @sprint.id, :size => 0}
assert_response :success
assert assigns['data'], "Didn't generate the data needed for a report."
--
1.5.6.5
15 years, 5 months
[PROJXP [PATCH] Make dates show up in a more standard way. #49
by Darryl L. Pierce
Added an application helper method, show_date. All views now
call this method to show a date field.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/helpers/application_helper.rb | 9 +++++++++
app/views/projects/index.html.erb | 2 +-
app/views/sprints/_list.html.erb | 4 ++--
app/views/sprints/show.html.erb | 4 ++--
app/views/tasks/_list.html.erb | 2 +-
app/views/users/_list.html.erb | 2 +-
6 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c944b8b..9e81b48 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -35,6 +35,15 @@ module ApplicationHelper
:alt => sprint.healthy? ? "Sprint is healthy" : "Sprint is not healthy")
end
+ # Displays a date or date and time.
+ def show_date(datetime, include_time = false)
+ if include_time
+ datetime.strftime("%m/%d/%Y %I:%M:%S %P")
+ else
+ datetime.strftime("%m/%d/%Y")
+ end
+ end
+
# Creates a link to a backlog item.
#
def link_to_backlog_item(backlog_item, options = {})
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 8bb062b..d091f66 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -41,7 +41,7 @@
<td><%= project.name %></td>
<td><%= get_first_sentence project.description %></td>
<td><%= link_to project.owner.display_name, user_path(project.owner) %></td>
- <td><%= project.created_at.to_s(:date) %></td>
+ <td><%= show_date(project.created_at) %></td>
<td>
<%= link_to(
image_tag("icons/view.png", :alt => "View"),
diff --git a/app/views/sprints/_list.html.erb b/app/views/sprints/_list.html.erb
index 1c8cbff..bf34f56 100644
--- a/app/views/sprints/_list.html.erb
+++ b/app/views/sprints/_list.html.erb
@@ -35,8 +35,8 @@
<td><%= link_to "#{sprint.id}", product_sprint_path(@product, sprint) %></td>
<td><%= sprint.title %></td>
<td><%= sprint.status_text %></td>
- <td><%= sprint.start %></td>
- <td><%= "#{sprint.end_date} (#{sprint.duration} days)" %></td>
+ <td><%= show_date(sprint.start) %></td>
+ <td><%= "#{show_date(sprint.end_date)} (#{sprint.duration} days)" %></td>
<td><%= show_hours_as_ear(sprint) %></td>
<td>
<%= link_to(image_tag("icons/view.png"), product_sprint_path(@product, sprint)) %>
diff --git a/app/views/sprints/show.html.erb b/app/views/sprints/show.html.erb
index 823c718..df475c5 100644
--- a/app/views/sprints/show.html.erb
+++ b/app/views/sprints/show.html.erb
@@ -42,12 +42,12 @@
<tr>
<td class="label">Starts:</td>
- <td class="value"><%= @sprint.start.to_s(:date) %></td>
+ <td class="value"><%= show_date((a)sprint.start) %></td>
</tr>
<tr>
<td class="label">Ends:</td>
- <td class="value"><%= @sprint.end_date.to_s(:date) %>
+ <td class="value"><%= "#{show_date((a)sprint.end_date)} (#{(a)sprint.duration} days)" %>
</tr>
<tr>
diff --git a/app/views/tasks/_list.html.erb b/app/views/tasks/_list.html.erb
index 7f591ae..31f5a8c 100644
--- a/app/views/tasks/_list.html.erb
+++ b/app/views/tasks/_list.html.erb
@@ -29,7 +29,7 @@
<% row_class = index%2 == 0 ? 'even' : 'odd' %>
<tr class="<%= row_class %>">
<td><%= link_to "#{task.id}", user_task_path(task.primary, task) %></td>
- <td><%= task.when_entered %></td>
+ <td><%= show_date(task.when_entered) %></td>
<td><%= simple_format task.description %></td>
<td><%= link_to(task.primary.display_name, user_path(task.primary)) if task.primary %></td>
<td><%= link_to(task.backup, user_path(task.backup)) if task.backup %></td>
diff --git a/app/views/users/_list.html.erb b/app/views/users/_list.html.erb
index 5210f50..9fc055e 100644
--- a/app/views/users/_list.html.erb
+++ b/app/views/users/_list.html.erb
@@ -34,7 +34,7 @@
<td><%= link_to user.email, "mailto:#{user.email}" %></td>
<td><%= link_to "#{user.backlog.size} items", backlog_user_path(user) %>
<td><%= "#{user.product_roles.size} roles" %></td>
- <td><%= user.created_at.to_s(:date) %></td>
+ <td><%= show_date(user.created_at) %></td>
<td>
<%= link_to(image_tag("icons/view.png", :alt => "View user..."), user_path(user)) %>
<%= link_to(image_tag("icons/edit.png", :alt => "Edit"),
--
1.5.6.5
15 years, 5 months
[PROJXP [PATCH] Added an email notice to the user when their email address is changed. #40
by Darryl L. Pierce
An email is dispatched to the user's *old* address when their address is
changed.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/controllers/users_controller.rb | 3 +++
app/models/user_mailer.rb | 8 ++++++++
.../user_mailer/email_change_notification.html.erb | 19 +++++++++++++++++++
test/functional/users_controller_test.rb | 18 ++++++++++++++++--
4 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 app/views/user_mailer/email_change_notification.html.erb
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index ddda50d..76c5525 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -84,9 +84,12 @@ class UsersController < ApplicationController
def update
respond_to do |format|
if @this_user.can_edit?(@user)
+ old_email = @this_user.email
@this_user.update_attributes(params[:user])
if @this_user.save
+ UserMailer.deliver_email_change_notification(@this_user,old_email) unless old_email == @this_user.email
+
flash[:message] = "User has been updated."
format.html { redirect_to user_path }
else
diff --git a/app/models/user_mailer.rb b/app/models/user_mailer.rb
index 808c6e5..993d0f8 100644
--- a/app/models/user_mailer.rb
+++ b/app/models/user_mailer.rb
@@ -24,6 +24,14 @@ class UserMailer < ActionMailer::Base
body :user => user, :token => token
end
+ # Sendsd an email to the old address when the user changes his email address.
+ def email_change_notification(user, old_email)
+ recipients old_email
+ from MAIL_CONFIG[:from]
+ subject "Email change notification"
+ body :user => user, :old_email => old_email
+ end
+
# Send an e-mail to an user and notify him his new password.
def new_generated_password(user, new_password)
recipients user.email
diff --git a/app/views/user_mailer/email_change_notification.html.erb b/app/views/user_mailer/email_change_notification.html.erb
new file mode 100644
index 0000000..e039372
--- /dev/null
+++ b/app/views/user_mailer/email_change_notification.html.erb
@@ -0,0 +1,19 @@
+Dear <%= @user.display_name %>,
+
+This email is to inform you that your old email address:
+
+<%= @old_email %>
+
+has been replaced with the following address:
+
+<%= @user.email %>
+
+You will need to use this new email address in future to log in.
+
+To review your account, please go to: <%= user_url @user %>
+
+Thank you.
+
+--
+Sent to you by ProjXP.
+<%= root_url %>
\ No newline at end of file
diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb
index 6551501..65ecb70 100644
--- a/test/functional/users_controller_test.rb
+++ b/test/functional/users_controller_test.rb
@@ -189,23 +189,37 @@ class UsersControllerTest < ActionController::TestCase
# Ensures admins can update a user's account.
def test_update_as_admin
put :update,
- {:id => @user.id, :user => {:email => "test(a)fodder.com"}},
+ {:id => @user.id, :user => {:display_name => "Don Farkle"}},
{:user_id => @admin.id}
assert_redirected_to user_path(@user)
- assert_equal "test(a)fodder.com", User.find_by_id((a)user.id).email,
+ assert_equal "Don Farkle", User.find_by_id((a)user.id).display_name,
"User should have been updated."
end
# Ensures users can update their accounts.
def test_update
put :update,
+ {:id => @user.id, :user => {:display_name => "Joe Farkles"}},
+ {:user_id => @user.id}
+
+ assert_redirected_to user_path(@user)
+ assert_equal "Joe Farkles", User.find_by_id((a)user.id).display_name,
+ "User should have been updated."
+ end
+
+ # Ensures an email is sent to the user if they change their email.
+ def test_update_with_email_change
+ put :update,
{:id => @user.id, :user => {:email => "test(a)fodder.com"}},
{:user_id => @user.id}
assert_redirected_to user_path(@user)
assert_equal "test(a)fodder.com", User.find_by_id((a)user.id).email,
"User should have been updated."
+ email = @emails.first
+ assert email, "No email was generated."
+ assert_equal "test(a)fodder.com", email.to[0], "Email sent to wrong user."
end
# Ensures that a valid user must be supplied for a backlog.
--
1.5.6.5
15 years, 5 months
[PROJXP [PATCH] Make dates show up in a more standard way. #49
by Darryl L. Pierce
Added an application helper method, show_date. All views now
call this method to show a date field.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/helpers/application_helper.rb | 9 +++++++++
app/views/projects/index.html.erb | 2 +-
app/views/sprints/_list.html.erb | 4 ++--
app/views/sprints/show.html.erb | 4 ++--
app/views/tasks/_list.html.erb | 2 +-
app/views/users/_list.html.erb | 2 +-
6 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c944b8b..9e81b48 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -35,6 +35,15 @@ module ApplicationHelper
:alt => sprint.healthy? ? "Sprint is healthy" : "Sprint is not healthy")
end
+ # Displays a date or date and time.
+ def show_date(datetime, include_time = false)
+ if include_time
+ datetime.strftime("%m/%d/%Y %I:%M:%S %P")
+ else
+ datetime.strftime("%m/%d/%Y")
+ end
+ end
+
# Creates a link to a backlog item.
#
def link_to_backlog_item(backlog_item, options = {})
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 8bb062b..d091f66 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -41,7 +41,7 @@
<td><%= project.name %></td>
<td><%= get_first_sentence project.description %></td>
<td><%= link_to project.owner.display_name, user_path(project.owner) %></td>
- <td><%= project.created_at.to_s(:date) %></td>
+ <td><%= show_date(project.created_at) %></td>
<td>
<%= link_to(
image_tag("icons/view.png", :alt => "View"),
diff --git a/app/views/sprints/_list.html.erb b/app/views/sprints/_list.html.erb
index 1c8cbff..bf34f56 100644
--- a/app/views/sprints/_list.html.erb
+++ b/app/views/sprints/_list.html.erb
@@ -35,8 +35,8 @@
<td><%= link_to "#{sprint.id}", product_sprint_path(@product, sprint) %></td>
<td><%= sprint.title %></td>
<td><%= sprint.status_text %></td>
- <td><%= sprint.start %></td>
- <td><%= "#{sprint.end_date} (#{sprint.duration} days)" %></td>
+ <td><%= show_date(sprint.start) %></td>
+ <td><%= "#{show_date(sprint.end_date)} (#{sprint.duration} days)" %></td>
<td><%= show_hours_as_ear(sprint) %></td>
<td>
<%= link_to(image_tag("icons/view.png"), product_sprint_path(@product, sprint)) %>
diff --git a/app/views/sprints/show.html.erb b/app/views/sprints/show.html.erb
index 823c718..df475c5 100644
--- a/app/views/sprints/show.html.erb
+++ b/app/views/sprints/show.html.erb
@@ -42,12 +42,12 @@
<tr>
<td class="label">Starts:</td>
- <td class="value"><%= @sprint.start.to_s(:date) %></td>
+ <td class="value"><%= show_date((a)sprint.start) %></td>
</tr>
<tr>
<td class="label">Ends:</td>
- <td class="value"><%= @sprint.end_date.to_s(:date) %>
+ <td class="value"><%= "#{show_date((a)sprint.end_date)} (#{(a)sprint.duration} days)" %>
</tr>
<tr>
diff --git a/app/views/tasks/_list.html.erb b/app/views/tasks/_list.html.erb
index 7f591ae..31f5a8c 100644
--- a/app/views/tasks/_list.html.erb
+++ b/app/views/tasks/_list.html.erb
@@ -29,7 +29,7 @@
<% row_class = index%2 == 0 ? 'even' : 'odd' %>
<tr class="<%= row_class %>">
<td><%= link_to "#{task.id}", user_task_path(task.primary, task) %></td>
- <td><%= task.when_entered %></td>
+ <td><%= show_date(task.when_entered) %></td>
<td><%= simple_format task.description %></td>
<td><%= link_to(task.primary.display_name, user_path(task.primary)) if task.primary %></td>
<td><%= link_to(task.backup, user_path(task.backup)) if task.backup %></td>
diff --git a/app/views/users/_list.html.erb b/app/views/users/_list.html.erb
index 5210f50..9fc055e 100644
--- a/app/views/users/_list.html.erb
+++ b/app/views/users/_list.html.erb
@@ -34,7 +34,7 @@
<td><%= link_to user.email, "mailto:#{user.email}" %></td>
<td><%= link_to "#{user.backlog.size} items", backlog_user_path(user) %>
<td><%= "#{user.product_roles.size} roles" %></td>
- <td><%= user.created_at.to_s(:date) %></td>
+ <td><%= show_date(user.created_at) %></td>
<td>
<%= link_to(image_tag("icons/view.png", :alt => "View user..."), user_path(user)) %>
<%= link_to(image_tag("icons/edit.png", :alt => "Edit"),
--
1.5.6.5
15 years, 5 months
[PROJXP [PATCH] New users are deleted after three verification attempts. #19
by Darryl L. Pierce
You will need to run a migration for this change.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/models/user.rb | 2 +-
app/models/user_verification.rb | 6 +++-
config/initializers/schedules.rb | 32 +++++++++++++++++++++++
config/schedules.yml.example | 3 ++
db/migrate/018_add_attempts_to_verifications.rb | 11 ++++++++
db/schema.rb | 29 +++++++++++++++++---
6 files changed, 76 insertions(+), 7 deletions(-)
create mode 100644 db/migrate/018_add_attempts_to_verifications.rb
diff --git a/app/models/user.rb b/app/models/user.rb
index e2b3989..ca0c185 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -27,7 +27,7 @@ class User < ActiveRecord::Base
:message => 'No display name was provided.'
has_one :privileges, :class_name => "UserPrivilege", :dependent => :destroy
- has_many :product_roles
+ has_many :product_roles, :dependent => :destroy
has_one :verification, :class_name => "UserVerification", :dependent => :destroy
attr_accessor :password_confirmation
diff --git a/app/models/user_verification.rb b/app/models/user_verification.rb
index 0431fe0..9d6ccd0 100644
--- a/app/models/user_verification.rb
+++ b/app/models/user_verification.rb
@@ -38,8 +38,12 @@ class UserVerification < ActiveRecord::Base
belongs_to :user
# Generates a verification token.
- #
def self.create_token
(0...TOKEN_SIZE).collect { TOKEN_CHARACTERS[Kernel.rand(TOKEN_CHARACTERS.length)] }.join
end
+
+ # Returns whether the verification attempt has expired.
+ def expired?
+ attempts >= 3
+ end
end
diff --git a/config/initializers/schedules.rb b/config/initializers/schedules.rb
index c102cdc..9239cd9 100644
--- a/config/initializers/schedules.rb
+++ b/config/initializers/schedules.rb
@@ -81,5 +81,37 @@ threads << Thread.new do
scheduler.join
end
+threads << Thread.new do
+ scheduler = Scheduler.new
+ scheduler.start
+
+ hours = SCHEDULES_CONFIG[:user_verification_expiration][:hours]
+ minutes = SCHEDULES_CONFIG[:user_verification_expiration][:minutes]
+
+ scheduler.schedule("#{minutes} #{hours} * * *") do
+ UserVerification.find(:all).each do |verification|
+ # if the account has been validated too often, then delete it, otherwise
+ # generate a new email and send it.
+ if verification.expired?
+ UserVerification.transaction do
+ verification.user.destroy
+ end
+ else
+ begin
+ UserVerification.transaction do
+ UserMailer.deliver_email_verification(verification.user, verification.token)
+ verification.attempts = verification.attempts + 1
+ verification.sent = Date.today
+ verification.save
+ end
+ rescue Exception => error
+ puts "Unable to send verification email: #{error.message}"
+ end
+ end
+ end
+ scheduler.join
+ end
+end
+
# Run all threads
threads.each { |thread| thread.run }
diff --git a/config/schedules.yml.example b/config/schedules.yml.example
index 4be4975..75741b4 100644
--- a/config/schedules.yml.example
+++ b/config/schedules.yml.example
@@ -5,3 +5,6 @@
:sprints_products_status_time:
:hours: 5
:minutes: 0
+ :user_verification_expiration:
+ :hours: 3
+ :minutes: 0
diff --git a/db/migrate/018_add_attempts_to_verifications.rb b/db/migrate/018_add_attempts_to_verifications.rb
new file mode 100644
index 0000000..f58552c
--- /dev/null
+++ b/db/migrate/018_add_attempts_to_verifications.rb
@@ -0,0 +1,11 @@
+# The attempts column indicates how often the system has emailed the user
+# in an attempt to verify their email address.
+class AddAttemptsToVerifications < ActiveRecord::Migration
+ def self.up
+ add_column :user_verifications, :attempts, :integer, :default => 0, :null => false
+ end
+
+ def self.down
+ remove_column :user_verifications, :attempts
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 1d72930..6eb13ee 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 17) do
+ActiveRecord::Schema.define(:version => 18) do
create_table "backlog_items", :force => true do |t|
t.integer "sprint_id", :null => false
@@ -23,6 +23,7 @@ ActiveRecord::Schema.define(:version => 17) do
end
add_index "backlog_items", ["sprint_id", "user_story_id"], :name => "index_backlog_items_on_sprint_id_and_user_story_id", :unique => true
+ add_index "backlog_items", ["user_story_id"], :name => "fk_backlog_items_user_story"
create_table "product_roles", :force => true do |t|
t.integer "user_id", :null => false
@@ -34,7 +35,9 @@ ActiveRecord::Schema.define(:version => 17) do
t.boolean "is_approved", :default => false
end
- add_index "product_roles", ["product_id", "user_id"], :name => "index_product_roles_on_user_id_and_product_id", :unique => true
+ add_index "product_roles", ["user_id", "product_id"], :name => "index_product_roles_on_user_id_and_product_id", :unique => true
+ add_index "product_roles", ["product_id"], :name => "fk_user_role_product"
+ add_index "product_roles", ["role_id"], :name => "fk_user_role_role"
create_table "products", :force => true do |t|
t.integer "project_id"
@@ -46,6 +49,7 @@ ActiveRecord::Schema.define(:version => 17) do
end
add_index "products", ["name"], :name => "index_products_on_name", :unique => true
+ add_index "products", ["project_id"], :name => "fk_products_project"
create_table "projects", :force => true do |t|
t.integer "owner_id", :null => false
@@ -57,6 +61,7 @@ ActiveRecord::Schema.define(:version => 17) do
end
add_index "projects", ["name"], :name => "index_projects_on_name", :unique => true
+ add_index "projects", ["owner_id"], :name => "fk_product_owner"
create_table "remaining_hours_estimates", :force => true do |t|
t.integer "backlog_item_id", :null => false
@@ -67,6 +72,9 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "estimated_on", :null => false
end
+ add_index "remaining_hours_estimates", ["backlog_item_id"], :name => "fk_remaining_hours_item"
+ add_index "remaining_hours_estimates", ["user_id"], :name => "fk_remaining_hours_user"
+
create_table "roles", :force => true do |t|
t.string "name", :null => false
t.boolean "can_manage_backlog_items", :default => false, :null => false
@@ -98,6 +106,8 @@ ActiveRecord::Schema.define(:version => 17) do
t.integer "status", :default => 0, :null => false
end
+ add_index "sprints", ["product_id"], :name => "fk_sprint_product"
+
create_table "tasks", :force => true do |t|
t.integer "backlog_item_id", :null => false
t.integer "primary_id", :null => false
@@ -109,6 +119,10 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "updated_at"
end
+ add_index "tasks", ["backlog_item_id"], :name => "fk_task_backlog_item"
+ add_index "tasks", ["primary_id"], :name => "fk_task_primary"
+ add_index "tasks", ["backup_id"], :name => "fk_task_backup"
+
create_table "user_privileges", :force => true do |t|
t.integer "user_id", :null => false
t.boolean "admin_projects", :default => false, :null => false
@@ -117,6 +131,8 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "updated_at"
end
+ add_index "user_privileges", ["user_id"], :name => "fk_privilege_user"
+
create_table "user_stories", :force => true do |t|
t.integer "product_id"
t.integer "priority"
@@ -127,12 +143,15 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "updated_at"
end
+ add_index "user_stories", ["product_id"], :name => "fk_user_story_product"
+
create_table "user_verifications", :force => true do |t|
- t.integer "user_id", :null => false
- t.string "token", :limit => 16, :null => false
- t.datetime "sent", :null => false
+ t.integer "user_id", :null => false
+ t.string "token", :limit => 16, :null => false
+ t.datetime "sent", :null => false
t.datetime "created_at"
t.datetime "updated_at"
+ t.integer "attempts", :default => 0, :null => false
end
add_index "user_verifications", ["user_id"], :name => "index_user_verifications_on_user_id", :unique => true
--
1.6.0.2
15 years, 5 months
[PROJXP [PATCH] Changing the way the sprints pages look.
by Darryl L. Pierce
Adding the first pass at icons for actions.
Moved the toolbar to be near the title and together.
Added icons for actions on backlog items.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/items/_list.html.erb | 12 ++++++++----
app/views/sprints/index.html.erb | 19 ++++++++++++-------
app/views/sprints/show.html.erb | 26 ++++++++++++++++++--------
public/images/icons/back.png | Bin 0 -> 680 bytes
public/images/icons/completed.png | Bin 781 -> 0 bytes
public/images/icons/create.png | Bin 1239 -> 0 bytes
public/images/icons/delete.png | Bin 0 -> 610 bytes
public/images/icons/edit.png | Bin 591 -> 703 bytes
public/images/icons/item_accept.png | Bin 0 -> 592 bytes
public/images/icons/item_complete.png | Bin 0 -> 781 bytes
public/images/icons/item_drop.png | Bin 0 -> 605 bytes
public/images/icons/item_reopen.png | Bin 0 -> 625 bytes
public/images/icons/new.png | Bin 0 -> 1239 bytes
public/images/icons/sprint_plan.png | Bin 0 -> 631 bytes
public/images/icons/view.png | Bin 0 -> 464 bytes
public/stylesheets/projxp.css | 23 +++--------------------
16 files changed, 41 insertions(+), 39 deletions(-)
create mode 100755 public/images/icons/back.png
delete mode 100644 public/images/icons/completed.png
delete mode 100644 public/images/icons/create.png
create mode 100755 public/images/icons/delete.png
mode change 100644 => 100755 public/images/icons/edit.png
create mode 100755 public/images/icons/item_accept.png
create mode 100644 public/images/icons/item_complete.png
create mode 100755 public/images/icons/item_drop.png
create mode 100755 public/images/icons/item_reopen.png
create mode 100644 public/images/icons/new.png
create mode 100755 public/images/icons/sprint_plan.png
create mode 100755 public/images/icons/view.png
diff --git a/app/views/items/_list.html.erb b/app/views/items/_list.html.erb
index 3058786..414225c 100644
--- a/app/views/items/_list.html.erb
+++ b/app/views/items/_list.html.erb
@@ -24,10 +24,14 @@
<td><%= item.owner.display_name if item.owner %></td>
<td><%= item.state_text %></td>
<td>
- <%= link_to("Accept", accept_product_sprint_item_path(product, sprint, item)) if item.can_accept?(@user) %>
- <%= link_to("Drop", drop_product_sprint_item_path(product, sprint,item)) if item.can_drop?(@user) %>
- <%= link_to("Complete", complete_product_sprint_item_path(product, sprint, item)) if item.can_complete?(@user) %>
- <%= link_to("Reopen", reopen_product_sprint_item_path(product, sprint, item)) if item.can_reopen?(@user) %>
+ <%= link_to(image_tag("icons/item_accept.png"),
+ accept_product_sprint_item_path(product, sprint, item)) if item.can_accept?(@user) %>
+ <%= link_to(image_tag("icons/item_drop.png"),
+ drop_product_sprint_item_path(product, sprint,item)) if item.can_drop?(@user) %>
+ <%= link_to(image_tag("icons/item_complete.png"),
+ complete_product_sprint_item_path(product, sprint, item)) if item.can_complete?(@user) %>
+ <%= link_to(image_tag("icons/item_reopen.png"),
+ reopen_product_sprint_item_path(product, sprint, item)) if item.can_reopen?(@user) %>
</td>
</tr>
diff --git a/app/views/sprints/index.html.erb b/app/views/sprints/index.html.erb
index 4fc1641..19be3e4 100644
--- a/app/views/sprints/index.html.erb
+++ b/app/views/sprints/index.html.erb
@@ -1,4 +1,6 @@
-<%= link_to "New Sprint", new_product_sprint_path(@product) %>
+<% if @product.can_create_sprints?(@user) %>
+ <%= link_to(image_tag("icons/new.png"), new_product_sprint_path(@product)) %>
+<% end %>
<table class="list">
<colgroup>
@@ -6,7 +8,7 @@
<thead>
<tr>
- <th>##</th>
+ <th>#</th>
<th>Status</th>
<th>Title</th>
<th>Starts</th>
@@ -20,20 +22,23 @@
<% @sprints.each_with_index do |sprint, index| %>
<% row_class = index%2 == 0 ? 'even' : 'odd' %>
<tr class="<%= row_class %>">
- <td><%= index + 1 %></td>
+ <td><%= link_to "#{sprint.id}", product_sprint_path(@product, sprint) %></td>
<td><%= sprint.status_text %></td>
<td><%= sprint.title %></td>
<td><%= sprint.start %></td>
<td><%= "#{sprint.end_date} (#{sprint.duration} days)" %></td>
<td><%= printf("%0.2f", sprint.estimated_hours) %></td>
<td>
- <%= link_to "View", product_sprint_path(@product, sprint) %>
+ <%= link_to(image_tag("icons/view.png"), product_sprint_path(@product, sprint)) %>
<% if sprint.can_edit?(@user) %>
- <%= link_to "Edit", edit_product_sprint_path(@product, sprint) %>
+ <%= link_to(
+ image_tag("icons/edit.png"), edit_product_sprint_path(@product, sprint)) %>
<% end %>
<% if sprint.can_delete?(@user) %>
- <%= link_to "Delete", product_sprint_path(@product, sprint),
- :html => {:method => :delete}, :confirm => "Delete? Are you sure?" %>
+ <%= link_to(
+ image_tag("icons/delete.png"),
+ product_sprint_path(@product, sprint),
+ :html => {:method => :delete}, :confirm => "Delete? Are you sure?") %>
<% end %>
</td>
</tr>
diff --git a/app/views/sprints/show.html.erb b/app/views/sprints/show.html.erb
index 0bfb308..7e66581 100644
--- a/app/views/sprints/show.html.erb
+++ b/app/views/sprints/show.html.erb
@@ -1,11 +1,3 @@
-<%= link_to "Back", product_sprints_path(@product) %>
-<% if @sprint.can_edit?(@user) %>
- <%= link_to "Edit", edit_product_sprint_path(@product, @sprint) %>
-<% end %>
-<% if @sprint.can_populate?(@user) %>
-<%= link_to "Plan", plan_product_sprint_path(@product, @sprint) %>
-<% end %>
-
<table class="details">
<thead>
<tr>
@@ -15,6 +7,24 @@
<tbody>
<tr>
+ <td colspan="2" class="toolbar">
+ <%= link_to(
+ image_tag("icons/back.png", :alt => "Return to sprint list..."),
+ product_sprints_path(@product)) %>
+ <% if @sprint.can_edit?(@user) %>
+ <%= link_to(
+ image_tag("icons/edit.png", :alt => "Edit this sprint"),
+ edit_product_sprint_path(@product, @sprint)) %>
+ <% end %>
+ <% if @sprint.can_populate?(@user) %>
+ <%= link_to(
+ image_tag("icons/sprint_plan.png", :alt => "Plan this sprint"),
+ plan_product_sprint_path(@product, @sprint)) %>
+ <% end %>
+ </td>
+ </tr>
+
+ <tr>
<td class="label">Status:</td>
<td class="value">
<% if @sprint.can_edit?(@user) %>
diff --git a/public/images/icons/back.png b/public/images/icons/back.png
new file mode 100755
index 0000000000000000000000000000000000000000..2e53c6980f00026b22e0d3710edf048e021b4da5
GIT binary patch
literal 680
zcmV;Z0$2TsP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!I!Q!9R5;6}
zQ%z`7K@k34@)BZ7HC0S1Cb8BOF|<`u6qSHhu!5*4=utsv!5(@PJXiz;kDkQ}9tu`0
zLJ<|>r3gZ6sTvbKG`S=Qf*6}Nf4;Z7Z{zN!O--ANbYb~sXZM@=W_MPrR;$>|(APVL
z9?v<)29FSdeXBlhS+G{-_{fQm(s$|pt3F04wDk%Eai0K>nDfCMZg4J%Tm>-+#q|66
z8(eUXMZynJwbm5eoE>%wcnw@1t#WGynhm$k?XL&soFn!ri`4f$cVy<%2mLsExU->z
zZx*xss|zVtj$|^aY{nS+ySuS>yS}Tnbt?kCHpJucS_vZi7oW4eS02jdvmho#X{ij;
zASmWb3g!Cg&?GXM48q|syk4&gstfW5ufx~d(b5UV8T>6lg%x6ea*97xpv5pT@eDFq
zp-_Nnno3<Nm4Ys0Q>HNxizp%!hp9l*G6j*sWM<7rm?Hgq>7h^v`h)1B=y2@X=W?ZT
z$YtMx?9VKI<#P?vWl4;(2C}r%>Gaw&UVVOfffyvn3OyrEa&l~WX&F<uFTgMiRVyI`
zxm*s3L;{gW1c5+6`RcDA$UP$COMCJ7S7xgb<Z!uM^^9(}8y=5GO<mXFa5y$L()qhn
zN9{IkX7TqTC?%qHx`H+PV)TFtHvVQ-`02)0)_@;!qht5ZroI2--JH6QGXwq2|ALe*
zGiD0KrV849Ue#E!x6?|2_CLR|>&m?+<#OqiY~^j9wuSWM=zzA_@B9}<+jo_mWWEvr
O0000<MNUMnLSTZ{95urL
literal 0
HcmV?d00001
diff --git a/public/images/icons/completed.png b/public/images/icons/completed.png
deleted file mode 100644
index 89c8129a490b329f3165f32fa0781701aab417ea..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 781
zcmV+o1M>WdP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!pGibPR5;6}
zlj}=UVI0T(J9f@?Yy$~oL?MENP<s_55<8j=#k?#_)7`z&He=XKi!yRv#z-kGv(##H
zPHpPc=GK%laoJHq%)RMCwPAFzZ|CgAOcEn{;0q5A&*$@du5ke3{wIG76!;E_a;FdK
zvpp$H#^e2A>4-QibtN)VXQDpczE`xXAkUjh%RI>;okxb7K@0kpyQ1k_Y(|Oe7$m(^
zNYX>mI||sUbmn+c<m#Le&eeX{US5M~t}+^~?^x|a<4hF}*!YoT8=u}L$nm5IGu=t+
z9L!Cu36!D2Ujog{8R*!Qv#Iu-h5hwCT%4+a*g~$0uam-<K;}*|sK&CQl{uILRo+uj
zOcz2iRRHx=A>3<&FnE=4u#()KBS^SH8e)Qs5i!#lY=$-1gbH6VluzU=m=EP78&5vQ
z-?+fFP-G2l&l_QzYealK$;1Rl?FkzXR&Jv<pn=v~#I9rjiy!8pnkdBB+E5h!vH2Zs
z&o03*QH;J|Cj>@fBPNjCr#AYRyJ7UJQ0v#?)7Ott=>3<sG1xL&549^BdiQDc2Rk6B
z`CZUMF*oL$(7tdPx=A_AzG_6ieU8GLKR01{dI4q5ENECkOP~(zUNfjFVrvVjw*&_H
zKpN~TcTqhdhuVD-b<^codbfbK*#?vj9*4ql0y<|7?610!ZaoaDlGr-LWGi2|kG&eR
zM}vpV9aN6yK|7oS)sPHI2Nw>`#-pV!7>9}>Q1jL)H6h&gkP@3nI=+F3nA~M>u#(n*
z8T!#8oEw&-mED4!h4s!N@Jo3S7N&Q6%6l3}nlcd~X@>;uelvPsSkXIgg~e+^T1zSf
z3SNj(5%jK~i8@b;C<CFVY6wQ4<%I<*UYM=Ou+dYcgy^ro@n7=`XV9$WdAihN00000
LNkvXXu0mjf{u*Ke
diff --git a/public/images/icons/create.png b/public/images/icons/create.png
deleted file mode 100644
index 3341491f6c27cc5f58d790fbc354ec4b5c399f81..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1239
zcmV;|1StE7P)<h;3K|Lk000e1NJLTq000;O000;W1^@s6;CDUv0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU$c}YY;RCwC7R$Yi3MG*eFXJ>b3H)iiQ
zJ}3!618T%SR6IpAB4^;h7xBReicurc2gL{Rk0|1!fdo-s6jY)jK@y_AoCoHTXyR``
z5IHc)1@9-`&)(kc?9R?icU#pnH+z@!PJOVUW_!A;>Z|&?x@Ltj22V^n5CRYmAaj6<
zfS?My28lfV-bS;{Bv+7lBtMW$8jTZgZ_%?@Ww39-kH-i=vU3**eIS~*U=?!w0&VYt
zL4}+_N=bSS;y6kIk_gGqhqU+7yO-&+s{%ZFE@z#q7DYa54Y!li56G~qv(gPoXhs{d
zAS;oGkb=ZuraDb8CZxS*4s2EX{}y29RL&YTCwUc5($e07>p5j_9gLzS&B|><k%Dm6
zOlzz|)aGlv_0Gpvt4EdsNS<(T4GJU*aW~06uTXIc?mC14uNlM<NxVe(oz}y^SRJT5
zIw~7z4-en-y|ZU&7B+(&V>$TaxCj~}#bT*kDwfm8)3E91sZH<W+V%bR_4NE8_KiM}
zP_;-GWui=sxmuO=Z#{C8I+112r~|DgUTwuFyM;2sm=0SRL`01h0$6m;gXg@)d!bHr
z$(EQPs%0KQ3$HKgT7bY8U9l1OS1P@TB7umMV<m{&wwyn*J<^L<mxGE0yix}g#5H%G
z%=NKejvvh$2IwGNR^-#P2Wqh9;OLhPriv+*9H4;m&AqgGG687dcDLx*RFOL0bLo4y
zv7>)gfJ4_!Wb<$52Jy<72a^{9aq=F5M&p(&147)GGp?n_);R&J<^24?x=dF)^E{nR
z^WqGEm?=c0u$Z<}6!@=07bW6);(&`pNjTXdQ$@@Np(2VBZcSO@R5<jnou3MZ5a-g0
zBIm7GgO0(^GH5k05|yHXl1d>7@!5%;HWSU4YEI+$m47UAddK)C$O1)9-AMV`wi&KI
z9(AfyGW#t9XpG{RcY}PIX#&^%H1&{a)h>|SO3M5{Dax8&(s%fg=r!F4@tF8Jqv+go
z(NUu3_c>~%_F~0oUow)|SxHN{M8{H_(%V!qR8chNK2--ZfD4BUHUBI9Mxz+e;qV1Y
zK~f{-NenmJXEN*)=Q0IQd?{gVn4zkyq4A6U$Um$`vR>44)WgiSpr`X-;fUxIecetE
zOv_{!$mw?Al&Rko6ACqRzF?pi^fDT&Vir2kqYE#G1JQT-=d4{<zVs4acZWBZ_T~==
z51V_vUZ{Efk2l)3?UKZ7JOdr;TJUDHD?F?|;p)$tU6gXDM)WuSi{b9DYJM8`rx12&
zn2JN)SlIL}4J-tzT&l1OB+Lc}6Rjz<d_CUSA3aXaKV#?1+I3;b%OVZ?16TBj>vPY$
z4~fg=4!SO7ujIk=N^o6UbWlWkGYH_<>ueXBv*z>owdgG~qK|V?uK1!kivTHzzANC&
zHe##1O5B&*CN2?uSTD9vQFkQ>bcyQb493il=8zgR$JA+B{T0bMul!_+FTCu-vW)ZX
zfy+fk(o3@5Hkq_rlPr+TkZ{)v*8ErTe~!Nd7yw71nXM=$ev<$I002ovPDHLkV1hjN
BPdESo
diff --git a/public/images/icons/delete.png b/public/images/icons/delete.png
new file mode 100755
index 0000000000000000000000000000000000000000..0a335acf67423fd5a17caf2d18a67e66e870611f
GIT binary patch
literal 610
zcmV-o0-gPdP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUz^hrcPR2Uhh
z!B1$<aU93-=lk>hj32+Ia2PFSwHp_;8^u8>r6{e*krHy43#H^jT&z}Wa&xpokqZtA
z<tUdO<j+sGk=nuRH}?I$-!J>FR&Fehhe_gp*x{i&XLj%HzdqAeQvxDT1Rjn;gaWw}
z5^~2QShuR2o0yn9fA7Y?Xzt(DKhn`?rmhAn(VT1h2r!!4rBZw52P-vSDzPZb#g$`y
ztkj8XEoxZ`Y73PkKp{LJ5D~&7@Je_kT)~2i-c6l&IJJyK&5~gfN`_2W7%3TM2{XqE
zQA8qFq861?%N|ZG0Wt%FLJ$TKq7Wo2$Odl0Q&0;JYFQzcn1MtBWCjLiAQxdE1Cmih
zK`p|m<p^h)nXyD70Wu@9kt3LTc$4XeW3)fLrK78x9jo^M2gy}gvcwDnBw=QVMG^^^
zesqi3SL5tFa-7w@+nIm!m^IIz@?>Af*(48Y1z>=gVSoY2jATaZ?l66O4$*k`47+`l
zweRoK+p__ghH^x(%m8DN8Gl-sYSGx#3kS}zEMMMC5w<N)erS!K8ZHOIo$$cji3q$b
zi3mbsps}9z>qj&noaWd37uvw=_X01NGD-Z+i^1;8t2&z(w`{C(PM?|mR`Ky`;pI<V
wGD-Z4mxEg`%*{-lEZlm$(4=5&|KsZFZ(v3gV*E=9oB#j-07*qoM6N<$f@e4h(EtDd
literal 0
HcmV?d00001
diff --git a/public/images/icons/edit.png b/public/images/icons/edit.png
old mode 100644
new mode 100755
index 596159d65464e84443608e4e1e693a4a8c36d636..fb2efb8775442af862ef0ef111f371e5857928d3
GIT binary patch
delta 677
zcmV;W0$Tmg1iu9_iBL{Q4GJ0x0000DNk~Le0000G0000G2nGNE03Y-JVE_OC1ZP1_
zK>z@+$TtOw>5(BPe*#fSL_t&-8KuG9Yt3;S!14FzcYfzs&gL-L7MbTH)}m1&xtc;s
zF^LpOEm2DR1Ez67k%yQ&YId=dTzDvXnv$ncc5Ja$j@b?e!`aUHo$u#kzm?hr7t8A<
zX2$=JjR&soUAemESSD+6Ge8wn#i_&8P*cn~)C_YDr^<v_fAFiLBXzj-MBN#`W<|}Z
zXi?lNFJdg>zq0NWaK_ID=4CTK8LPp-Jcjw^jD~G<8LQomJ%oHSC6q5X3@|mEf?}u|
zP8C-$T)_xF-zEF}GLhmc_Lbe^)!F?!e9Q=mCx{v52_}Z9;CX_GhloQn*NOH%rJ`y(
ziCK&J);*u(f32qDzEelY155-2A_gj;YD5eQ>D$C|Z-~!ZLFQctG09Uhp@QPcl?mU}
z7$E{?cz}t3fC%LK?;}5+keI!OTyHb6@j}nbBm-HHT&CJnb^IYBAVSCka_RdNzT74;
zXDve?FCx*eM2ky^TZSvC<t*LT+UXU7fDs~y2q6)ne=m8R?1!5q=5Ampbq+5YkRO;y
z`e8d$Y8&`CIFXQNP6<T-0YrrU<PCnL+9+GNj{K)4A~7R3FoX1?7gTIIPf_^-OqGzY
zs{A29S6efM@2@GyRC-^ZW>Q&<q0Dr?Jxfx#<pR;fG(u`d$WL|mwA7yr>eM;ZDYeqX
z=K4##Yi&MA=YuxJRaW!8FU5_at@JfK##B)y)WR?^Ge$eIXHjrySG|wtczNd<J>6YD
z6H`i8)*fwd=P$&}7_Dwq>EM#t<^Hk-v#@BcZLmMRbA98h_x!_erbQ^umQ&%700000
LNkvXXu0mjfM0GfI
delta 565
zcmV-50?Pfr1<wQ_iBL{Q4GJ0x0000DNk~Le0000O0000O2nGNE0N{5$_>nOue*y7H
zL_t(|+O*ZpOB+EL2JmN+H2Bq^IfxBg5H+X?)LN6P;-x)#(PP1Xz=M#hhn#x!;>W?0
z2X7Y7rAUgF9y}C5L8_oZf*<v>ChlgNT{q*qQ5To2*6i39CL1Q3-!qw+&46<b(c(Yi
zNuG)&%lgS?r5DEB<KJT(1sY_je*tW0mE8~U2#x$(4~JX?A~7Hu2NVN*=8bJiTnF$J
z;R@lM?|_^EWObmu2aqY`Q-lizl<+*^Q3A~nnefXiYIN=Bz6lwBn{*Xm!_BKoqgVOO
z`@0sbLgsg&!MwksMSc)hi?9}YcLUJK99wTCJM9r3xikKrzLI|O6uH0`f1kX_BKSW8
zMDa%ho&z__=hV43G0JnAgg|sl2zUGiCjK%kp{^|?jF$zR&3;_I!<p9ugY^mFwg)Xc
zKj>$5UHRH@o7cpPss=r$K)a9;(AQkywtrJ!bui(CYky=M?l)D8mrapB)H33P>sbW`
z_3e3kE5@yW?a#v<`$~=Ue-Lig>%?TmxV25UGKC4_B!j{$8BJAw8_vKXC8k{AR=}5^
z2mST6GE}J%;a~tEpMI4;Kib(jJX`rNy);L+q}(1%rCk(l4e^0^b3Pn=vGyx{yfFTC
zbA>)Trgm=bUe~AIy+gnM7CXHK|Kb_S3izLOEx-UdP|717$Q2U+3jhEBNkvXXu0mjf
DV`T(6
diff --git a/public/images/icons/item_accept.png b/public/images/icons/item_accept.png
new file mode 100755
index 0000000000000000000000000000000000000000..28c2175e691b5bd77d51e0ff19df587d3cd0b8c2
GIT binary patch
literal 592
zcmV-W0<ZmvP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUz;z>k7R5;6}
zlg(=rK^VsO-|*I>7Z08a{s)Rsf(J|SV_Rz!8yef7kVJ&ghD4GkA*3yaw3HgOrMaY5
zCEF^>3bs|O#wgl0$9$0`oBc>UmB*RcC2f(EL>GQM^S=AeGc)h*Z~(affwPP)k4&ZW
zy8GEaTu%wfT{sti;{L*S+?&tAF_*=7d<S<Qe};YLBW$rPxZ>}1I*%E6Q~85vri^Z}
zN8TMU1G@6RU=6$lGjJvM&}=rl=7#UJVc>l73ynqtIzxx9>ufBFVp|%dhW84l0cn`3
zs_37{w$MmS3)?-Krs10Bm0>`;T~`z+b%IhiRXNdszQ6MDg<(KHRjnpNmSv_4xkj``
za)urv8+pROgH^-8k@yNpl2A3FW2q|rb?$g7jPaSPu!j1;KROSKbIdTX&wfIsQaRQG
z8XrBv^AAh#tPEl;H;pev0payKxEwx%-jP#5ZZx)yQmI5Jn`&^>U?^|_>2DFFe?(av
z+_;JG#w}{_o3lkXQ79A%1r!N|7R8ocbf3k`T;f<GSF_X90Q4>_-wuiF&l>i>!Ju~?
z*C#Th%WJGr{q8i**?JHVhTs!;Hrbcq4|mYXjU$DVmx8A;B@DBbsnVGBpwnwhiv0wY
eZrfBp&Hn+e<03_si;HOh0000<MNUMnLSTYC4GRna
literal 0
HcmV?d00001
diff --git a/public/images/icons/item_complete.png b/public/images/icons/item_complete.png
new file mode 100644
index 0000000000000000000000000000000000000000..89c8129a490b329f3165f32fa0781701aab417ea
GIT binary patch
literal 781
zcmV+o1M>WdP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!pGibPR5;6}
zlj}=UVI0T(J9f@?Yy$~oL?MENP<s_55<8j=#k?#_)7`z&He=XKi!yRv#z-kGv(##H
zPHpPc=GK%laoJHq%)RMCwPAFzZ|CgAOcEn{;0q5A&*$@du5ke3{wIG76!;E_a;FdK
zvpp$H#^e2A>4-QibtN)VXQDpczE`xXAkUjh%RI>;okxb7K@0kpyQ1k_Y(|Oe7$m(^
zNYX>mI||sUbmn+c<m#Le&eeX{US5M~t}+^~?^x|a<4hF}*!YoT8=u}L$nm5IGu=t+
z9L!Cu36!D2Ujog{8R*!Qv#Iu-h5hwCT%4+a*g~$0uam-<K;}*|sK&CQl{uILRo+uj
zOcz2iRRHx=A>3<&FnE=4u#()KBS^SH8e)Qs5i!#lY=$-1gbH6VluzU=m=EP78&5vQ
z-?+fFP-G2l&l_QzYealK$;1Rl?FkzXR&Jv<pn=v~#I9rjiy!8pnkdBB+E5h!vH2Zs
z&o03*QH;J|Cj>@fBPNjCr#AYRyJ7UJQ0v#?)7Ott=>3<sG1xL&549^BdiQDc2Rk6B
z`CZUMF*oL$(7tdPx=A_AzG_6ieU8GLKR01{dI4q5ENECkOP~(zUNfjFVrvVjw*&_H
zKpN~TcTqhdhuVD-b<^codbfbK*#?vj9*4ql0y<|7?610!ZaoaDlGr-LWGi2|kG&eR
zM}vpV9aN6yK|7oS)sPHI2Nw>`#-pV!7>9}>Q1jL)H6h&gkP@3nI=+F3nA~M>u#(n*
z8T!#8oEw&-mED4!h4s!N@Jo3S7N&Q6%6l3}nlcd~X@>;uelvPsSkXIgg~e+^T1zSf
z3SNj(5%jK~i8@b;C<CFVY6wQ4<%I<*UYM=Ou+dYcgy^ro@n7=`XV9$WdAihN00000
LNkvXXu0mjf{u*Ke
literal 0
HcmV?d00001
diff --git a/public/images/icons/item_drop.png b/public/images/icons/item_drop.png
new file mode 100755
index 0000000000000000000000000000000000000000..cd305ec83b6a7560de21a287fa7a780bad893efe
GIT binary patch
literal 605
zcmV-j0;2tiP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUz?@2^KR2Uhh
z!M{t?aU93-=jZOLT^;=*N<-?@Xu1}|ts5eOAZVyTq&X}M5nBq15Q?BBQ4p#A0wWxR
z7Hf!pKr~piSVO4c9ZH~*dRE_izhC)91cQD_k4KQi{|KkM1}_$lHs78tD=Pu+$Q^S-
zE?kbxa0!`V?rf`$m&V45mxu1O^heD{n)|9U*;Gx2jmR#Qtq<sr%CS=A*+n*LIaZ1l
zkxX1WQ^!Vi^iGn9Bu5e=ArKG(Z$?M?ox@E{m>Y=*2{WUucY-zdJL^dl3I%>;ad8o^
z7>UT-aEZGeIS2v;T;fmM9XBTt$%UH}0?1h*2qK@)Ge19v#5w^G0dO}Gk-On;h*g0V
zg0c5w{A6?(dp$&D`V;BhwH(@f3^+wpiDS%+&U-Vg>20eaQ79BhObrh(SA506v+ZnZ
z$g})zgzWPtJU(945y>2Pr{~-rKqTCq^~N9e(A;`~%*Utj>?T{b@1P-<WAuZ%B6r7K
zfD-_*s<H6^rBVq9d@oIqscnFhmsk^Z?<MV_J}Qn+KDaR$x40Q@j+x=^SRCW-xI{~4
zC*`+~$PTyjZF!n9u<#{~r6~nT{LPEjy6)<&*{l0@RiY?0#lq(b6EkUxzv_CB#J_mi
ry8p`3Z0UU3LeA1E3I<M$RBrtMF3c7U8sGJe00000NkvXXu0mjf%W((U
literal 0
HcmV?d00001
diff --git a/public/images/icons/item_reopen.png b/public/images/icons/item_reopen.png
new file mode 100755
index 0000000000000000000000000000000000000000..fdc394c7c59b83cc2b876abc41064c75eb365877
GIT binary patch
literal 625
zcmV-%0*?KOP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!14%?dR5;6}
zl21sKQ540`H;#r{q+@0|4upc#+Evt|+}NrKW)TGuWV=voQ3}~o$dv_d+C|VJ!=QvV
zg=H;rBZXmqaGb$ppf*{NV|@3V`?b()L>FZj9*=u@@4&g|7erBn|Ebu&JU%m$={t4j
zMA?=F80s{QH%n(hsfF%mohhehBz1^t6ID+NGJzBtYm#sZbA{ZEu?vrT)(Lb!?K~){
zH(Aw`uB}X<y1W|kSR9H3xx-yxB$$Xd*=b}y&J8@d^rAlw0A1tfQZDb^pE!_isNRER
z77+`|Ko_)nJknZkM$lLR0C4~il}T=IO4nEI2Av2=WIw+{{!<=n7K~`zm4qbB&F6+E
zuDrZlD$ucWTMde~1j#Y}c6>q9=*Zczi=_)|A3QuQ<J3g|WY@YBNVQd#S0O+Qg)arr
zxZ(3k3cPE^^QE&m0MH1E2!a46f+07J@%h!sflWbTsHw#ti&(ZI5<BW(#>}znM~D7~
zjUb95oV<O!r?ECU)Uvk)iX2PJOPHOXMSdX<+8+)?t@ILRhCc*r7R)%BE98z;lvSkb
z6AcIvqP4jd&HGy5k>Kv23l4|e@$lZ*dJFeEA1zqO!B_8JKbXnR;M>>lDE=(2>_dXN
zph(~<P@*<Rx&7Lq6ipeD9Wu3%s*@=u3X<dZ?Q-O9%?BF<wo<<UiN|Q`jamP@00000
LNkvXXu0mjf7Wxxg
literal 0
HcmV?d00001
diff --git a/public/images/icons/new.png b/public/images/icons/new.png
new file mode 100644
index 0000000000000000000000000000000000000000..3341491f6c27cc5f58d790fbc354ec4b5c399f81
GIT binary patch
literal 1239
zcmV;|1StE7P)<h;3K|Lk000e1NJLTq000;O000;W1^@s6;CDUv0000PbVXQnQ*UN;
zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU$c}YY;RCwC7R$Yi3MG*eFXJ>b3H)iiQ
zJ}3!618T%SR6IpAB4^;h7xBReicurc2gL{Rk0|1!fdo-s6jY)jK@y_AoCoHTXyR``
z5IHc)1@9-`&)(kc?9R?icU#pnH+z@!PJOVUW_!A;>Z|&?x@Ltj22V^n5CRYmAaj6<
zfS?My28lfV-bS;{Bv+7lBtMW$8jTZgZ_%?@Ww39-kH-i=vU3**eIS~*U=?!w0&VYt
zL4}+_N=bSS;y6kIk_gGqhqU+7yO-&+s{%ZFE@z#q7DYa54Y!li56G~qv(gPoXhs{d
zAS;oGkb=ZuraDb8CZxS*4s2EX{}y29RL&YTCwUc5($e07>p5j_9gLzS&B|><k%Dm6
zOlzz|)aGlv_0Gpvt4EdsNS<(T4GJU*aW~06uTXIc?mC14uNlM<NxVe(oz}y^SRJT5
zIw~7z4-en-y|ZU&7B+(&V>$TaxCj~}#bT*kDwfm8)3E91sZH<W+V%bR_4NE8_KiM}
zP_;-GWui=sxmuO=Z#{C8I+112r~|DgUTwuFyM;2sm=0SRL`01h0$6m;gXg@)d!bHr
z$(EQPs%0KQ3$HKgT7bY8U9l1OS1P@TB7umMV<m{&wwyn*J<^L<mxGE0yix}g#5H%G
z%=NKejvvh$2IwGNR^-#P2Wqh9;OLhPriv+*9H4;m&AqgGG687dcDLx*RFOL0bLo4y
zv7>)gfJ4_!Wb<$52Jy<72a^{9aq=F5M&p(&147)GGp?n_);R&J<^24?x=dF)^E{nR
z^WqGEm?=c0u$Z<}6!@=07bW6);(&`pNjTXdQ$@@Np(2VBZcSO@R5<jnou3MZ5a-g0
zBIm7GgO0(^GH5k05|yHXl1d>7@!5%;HWSU4YEI+$m47UAddK)C$O1)9-AMV`wi&KI
z9(AfyGW#t9XpG{RcY}PIX#&^%H1&{a)h>|SO3M5{Dax8&(s%fg=r!F4@tF8Jqv+go
z(NUu3_c>~%_F~0oUow)|SxHN{M8{H_(%V!qR8chNK2--ZfD4BUHUBI9Mxz+e;qV1Y
zK~f{-NenmJXEN*)=Q0IQd?{gVn4zkyq4A6U$Um$`vR>44)WgiSpr`X-;fUxIecetE
zOv_{!$mw?Al&Rko6ACqRzF?pi^fDT&Vir2kqYE#G1JQT-=d4{<zVs4acZWBZ_T~==
z51V_vUZ{Efk2l)3?UKZ7JOdr;TJUDHD?F?|;p)$tU6gXDM)WuSi{b9DYJM8`rx12&
zn2JN)SlIL}4J-tzT&l1OB+Lc}6Rjz<d_CUSA3aXaKV#?1+I3;b%OVZ?16TBj>vPY$
z4~fg=4!SO7ujIk=N^o6UbWlWkGYH_<>ueXBv*z>owdgG~qK|V?uK1!kivTHzzANC&
zHe##1O5B&*CN2?uSTD9vQFkQ>bcyQb493il=8zgR$JA+B{T0bMul!_+FTCu-vW)ZX
zfy+fk(o3@5Hkq_rlPr+TkZ{)v*8ErTe~!Nd7yw71nXM=$ev<$I002ovPDHLkV1hjN
BPdESo
literal 0
HcmV?d00001
diff --git a/public/images/icons/sprint_plan.png b/public/images/icons/sprint_plan.png
new file mode 100755
index 0000000000000000000000000000000000000000..d88e2b9ab7ab168e884a7e1eb12891f426cdbfb6
GIT binary patch
literal 631
zcmV--0*L*IP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!2}wjjR5;6x
zlTS#~VHn3h@9+0p4ojI9p`$<@LItU96)GNTAykJ!r=Xjsu-2sryjLVax9HHN({3Gt
zz*s>dIT>^aD;pwFhvkBWZF9u_yzl#T7>be(A9#6qA9z0R_kI2#BJAblMn+_(xWgXp
z)x^Y(aU~*~mrN!j#u&8LY<R6T`Fx&KDn&3DBoqn}i^bGNj<=Oouh;48>jPjbSVV|M
zqlgH}WOAE=Z2+w`0JF=DpBVvT!HUHgxOhTStyXsj)M_<EgmBlN9SaG8y#dnM4y;(T
zZ79$NtQD>dX)2XUa{$1Z?%%t#v!l6!YPE`pF!!SqBZ9VIO`{fKg{!CQ%@q_)0TE&B
zX#T&~KYW{G`o%n@)&kcaoG%s1Yma6gF5ce++)YpR><jq0B$u()l1L<Q90#Qo>n%B2
zd;W56>?}t*`<Y#O*_QtD{@!pr7}%UdYi+ONbIBAxBO-X7M>rfN5{Z!0D-0bQ#5jh*
z?s1H&GkkIs;HCp`J9WJsquw3#9pY{FHP%`@&%^UP9LHg;oX4jQ5IcSgfIAnS5js2o
z;P(KGHj_qMSt&28{k3+I*%_?Q;<_$MDGH@EmR1*7T%BiX{5jKaCh)s002L)7#N%;k
zwn#tuirbrGbYP7Bu2Zc1`pCkkd9vS&kGCyTGaHTvr-2(l8?X*MO+Q(k`Ug*NS(ok0
R0GI#(002ovPDHLkV1m!b5pn<k
literal 0
HcmV?d00001
diff --git a/public/images/icons/view.png b/public/images/icons/view.png
new file mode 100755
index 0000000000000000000000000000000000000000..1dee9e366094e87db68c606d0522d72d4b939818
GIT binary patch
literal 464
zcmV;>0WbcEP)<h;3K|Lk000e1NJLTq000mG000mO1^@s6AM^iV00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUzVo5|nR2Uhh
z!69yxQ5c2c_uP9SO&YLZNmxQ12)2N!!D0vs#R^Ek(4<KhK?U2XBo(z)bV&OD-#N^k
zFa|g2^C$@qp|_uYe0=@p<lF5g#|dB)n{p8c$D|4;q>8e6`gpm!y1M!N^ZV(=IC*t)
z{^;nqJv-tM$9J1L2QJ2DN!#51=1_l@G`2=6e0lehL%sic%`_4--LFM}IF!KzJCseW
zq1I3__Z40|e?qyK1__gzP(qrBf-G7SQbQ`#Lw94WVe(o`qg+f4hy;Qju)q#I(9{`%
zQmAGomzhQ!b|gq>KqL@IkO~$=Koi}a$u6d07kiS}NoYVMJjAeZpaB*;wwcDdEbK@K
zNP;B7RzhQ|H9AlUO<`J>m1(5R)Pb-iLBb@7Jp)}LHdAb-VVgYxVoTzGoqu{~a>6uj
zeqCRFI9pC#h09bGwy9;oHcp6(RB%jeY^F=Ll!S+9JkVe4nDG7tJMQiP0000<MNUMn
GLSTZz`@eVq
literal 0
HcmV?d00001
diff --git a/public/stylesheets/projxp.css b/public/stylesheets/projxp.css
index 3dca6b8..8e451f3 100644
--- a/public/stylesheets/projxp.css
+++ b/public/stylesheets/projxp.css
@@ -30,26 +30,9 @@ td {
overflow: auto;
}
-.toolbar {
- float: right;
-}
-
-.toolbar a {
- font-weight: bold;
- font-size: 80%;
-}
-
-.toolbar a:hover {
- background-color: #ffff00;
- color: #000000;
-}
-
-.toolbar a:before {
- content: "[ ";
-}
-
-.toolbar a:after {
- content: " ]";
+table .toolbar {
+ text-align: right;
+ padding-right: 15px;
}
#footer {
--
1.6.0.2
15 years, 5 months
[PROJXP [PATCH] Added titles to all existing pages. #41
by Darryl L. Pierce
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/controllers/application.rb | 31 +++++++++++-----------
app/controllers/items_controller.rb | 2 +
app/controllers/products_controller.rb | 7 +++++
app/controllers/projects_controller.rb | 6 ++++
app/controllers/report_controller.rb | 4 ++-
app/controllers/roles_controller.rb | 3 ++
app/controllers/sprints_controller.rb | 9 ++++++-
app/controllers/stories_controller.rb | 44 ++++++++++++++++++-------------
app/controllers/tasks_controller.rb | 5 +++
app/controllers/users_controller.rb | 10 ++++++-
app/views/layouts/default.html.erb | 2 +-
db/schema.rb | 20 +++++++++++++-
12 files changed, 103 insertions(+), 40 deletions(-)
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index 4762bfa..dc59da1 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -1,18 +1,18 @@
# application.rb
# Copyright (C) 2008, Darryl L. Pierce <mcpierce(a)gmail.com>
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation, either version 3 of the License, or (at your option) any later
+# version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>.
#
class ApplicationController < ActionController::Base
@@ -24,14 +24,14 @@ class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
- # See ActionController::RequestForgeryProtection for details
- # Uncomment the :secret if you're not using the cookie session store
+ # See ActionController::RequestForgeryProtection for details Uncomment the
+ # :secret if you're not using the cookie session store
protect_from_forgery # :secret => '9c89a76e3c2615afe424b5811fe319f7'
# Returns whether the current user has authenticated.
#
- # An authenticated user has their user id stored in the session with
- # the key :user_id.
+ # An authenticated user has their user id stored in the session with the key
+ # :user_id.
def authenticated
if @user == nil
session[:original_uri] = request.request_uri
@@ -53,7 +53,8 @@ class ApplicationController < ActionController::Base
rescue Exception => error
puts error.backtrace
erase_results
- flash[:error] = "ERROR: #{error.message}"
+ @title = "An Error Has Occurred."
+ flash[:error] = "The following error has occurred: #{error.message}"
redirect_to error_path
end
end
diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb
index 6efd27d..957b043 100644
--- a/app/controllers/items_controller.rb
+++ b/app/controllers/items_controller.rb
@@ -25,6 +25,7 @@ class ItemsController < ApplicationController
# GET /products/1/sprints/1/items
def index
+ @title = "Sprint Backlog For #{(a)sprint.title}"
@backlog_items = BacklogItem.paginate(
:conditions => ['sprint_id = ?', @sprint.id],
:page => params[:page],
@@ -37,6 +38,7 @@ class ItemsController < ApplicationController
# GET /products/1/sprints/1/items/1
def show
+ @title = "Backlog Item (#{(a)backlog_item.user_story.title})"
respond_to do |format|
format.html
end
diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb
index 1073ee1..07bccb3 100644
--- a/app/controllers/products_controller.rb
+++ b/app/controllers/products_controller.rb
@@ -28,12 +28,14 @@ class ProductsController < ApplicationController
@project = Project.find_by_id(params[:project])
if @project
+ @title = "Products For #{(a)project.name}"
@products = Product.paginate(
:page => params[:page],
:per_page => 10,
:conditions => ['project_id = ?', @project.id],
:order => 'name ASC')
else
+ @title = "All Products"
@products = Product.paginate(
:page => params[:page],
:per_page => 10,
@@ -47,6 +49,7 @@ class ProductsController < ApplicationController
# GET /products/1
def show
+ @title = "#{(a)product.name} (Product)"
@project = @product.project
@sprints = Sprint.find_all_by_product_id(@product)
@backlog = UserStory.find_all_by_product_id(@product)
@@ -59,6 +62,7 @@ class ProductsController < ApplicationController
# GET /products/new
def new
if @project.can_create_products?(@user)
+ @title = "New Product"
@product = Product.new(:project_id => @project.id, :owner_id => @user.id)
@users = User.find(:all, :order => 'display_name ASC')
else
@@ -70,6 +74,7 @@ class ProductsController < ApplicationController
# GET /products/1/edit
def edit
if @product.can_edit?(@user)
+ @title = "#{(a)product.name} (Edit)"
@users = User.find(:all, :order => 'display_name ASC')
else
flash[:error] = "You are not authorized to modify #{(a)product.name}."
@@ -89,6 +94,7 @@ class ProductsController < ApplicationController
flash[:message] = "Product created successfully."
format.html { redirect_to product_path(@product) }
else
+ @title = "New Product"
@users = User.find(:all, :order => 'display_name ASC')
@product.valid?
format.html { render :action => :new }
@@ -118,6 +124,7 @@ class ProductsController < ApplicationController
flash[:message] = "#{(a)product.name} successfully updated."
format.html { redirect_to product_path(@product) }
else
+ @title = "#{(a)product.name} (Edit)"
@users = User.find(:all, :order => 'display_name ASC')
@product.valid?
format.html { render :action => :edit }
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index bfb5963..56b8e1f 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -25,6 +25,7 @@ class ProjectsController < ApplicationController
# GET /projects
def index
+ @title = "All Projects"
@projects = Project.paginate :page => params[:page], :per_page => 10
respond_to do |format|
@@ -34,6 +35,7 @@ class ProjectsController < ApplicationController
# GET /projects/1
def show
+ @title = "#{(a)project.name} (Project)"
@products = Product.paginate_by_project_id @project.id, :page => params[:page], :per_page => 10
respond_to do |format|
@@ -44,6 +46,7 @@ class ProjectsController < ApplicationController
# GET /projects/new
def new
if @user.can_create_projects?
+ @title = "New Project"
@project = Project.new(:owner_id => @user.id)
else
flash[:error] = "You are not authorized to create projects."
@@ -54,6 +57,7 @@ class ProjectsController < ApplicationController
# GET /projects/1/edit
def edit
+ @title = "#{(a)project.name} (Edit)"
unless @project.can_edit?(@user)
flash[:message] = "You are not authorized to modify that project."
redirect_to project_path(@project)
@@ -72,6 +76,7 @@ class ProjectsController < ApplicationController
flash[:message] = "Project '#{(a)project.name}' created!"
format.html { redirect_to project_url(@project) }
else
+ @title = "New Project"
@project.valid?
format.html { render :action => "new" }
end
@@ -98,6 +103,7 @@ class ProjectsController < ApplicationController
flash[:message] = "Project was successfully updated."
format.html { redirect_to project_path(@project) }
else
+ @title = "#{(a)project.name} (Edit)"
@project.valid?
format.html { render :action => 'edit'}
end
diff --git a/app/controllers/report_controller.rb b/app/controllers/report_controller.rb
index ff87d55..6993fd6 100644
--- a/app/controllers/report_controller.rb
+++ b/app/controllers/report_controller.rb
@@ -22,14 +22,16 @@ class ReportController < ApplicationController
before_filter :load_user, :only => [:effort]
def index
+ @title = "Reports"
@users = User.find(:all, :order => 'display_name ASC')
end
def burndown
-
+ @title = "Burndown Chart For Sprint #{(a)sprint.id}"
end
def effort
+ @title = "Effort Report For #{(a)this_user.display_name}"
@tasks = Task.find(
:all,
:conditions => ['(primary_id = ? or backup_id = ?) and
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb
index 748a2d4..a768094 100644
--- a/app/controllers/roles_controller.rb
+++ b/app/controllers/roles_controller.rb
@@ -25,6 +25,7 @@ class RolesController < ApplicationController
# GET /products/1/roles
def index
+ @title = "#{(a)product.name} Members"
if @product.can_approve_roles?(@user)
@product_roles = ProductRole.find_all_by_product_id(@product, :order => 'role_id ASC')
else
@@ -47,6 +48,7 @@ class RolesController < ApplicationController
# GET /products/1/roles/new
def new
+ @title = "Request A Role For #{(a)product.name}"
@role = ProductRole.find_by_product_id_and_user_id((a)product.id, @user.id)
if @role
@@ -78,6 +80,7 @@ class RolesController < ApplicationController
flash[:message] = "Your request has been sent to #{(a)product.owner.display_name}."
format.html { redirect_to product_path(@product) }
else
+ @title = "Request A Role For #{(a)product.name}"
@roles = Role.find(:all)
@role.valid?
format.html { render :action => :new }
diff --git a/app/controllers/sprints_controller.rb b/app/controllers/sprints_controller.rb
index 06fc83e..80b893d 100644
--- a/app/controllers/sprints_controller.rb
+++ b/app/controllers/sprints_controller.rb
@@ -23,6 +23,7 @@ class SprintsController < ApplicationController
# GET /products/1/sprints
def index
+ @title = "All Sprints For #{(a)product.name}"
@sprints = Sprint.paginate(
:page => params[:page],
:per_page => 10,
@@ -36,12 +37,14 @@ class SprintsController < ApplicationController
# GET /products/1/sprints/1
def show
+ @title = "Sprint #{(a)sprint.id}"
@backlog_items = @sprint.backlog_items
end
# GET /products/1/sprints/new
def new
if @product.can_create_sprints?(@user)
+ @title = "New Sprint For #{(a)product.name}"
@sprint = Sprint.new(:product_id => @product.id)
else
flash[:error] = "You are not authorized to create sprints for #{(a)product.name}."
@@ -52,7 +55,7 @@ class SprintsController < ApplicationController
# GET /products/1/sprints/1/edit
def edit
-
+ @title = "Sprint #{(a)sprint.id} (Edit)"
end
# POST /products/1/sprints
@@ -66,6 +69,7 @@ class SprintsController < ApplicationController
flash[:message] = "Sprint successfully created!"
format.html { redirect_to product_sprint_path(@product,@sprint) }
else
+ @title = "New Sprint For #{(a)product.name}"
@sprint.valid?
format.html { render :action => :edit }
end
@@ -86,6 +90,7 @@ class SprintsController < ApplicationController
flash[:message] = "Sprint updated successfully."
format.html { redirect_to product_sprints_path(@product) }
else
+ @title = "Sprint #{(a)sprint.id} (Edit)"
@sprint.valid?
format.html { render :action => :edit }
end
@@ -119,6 +124,7 @@ class SprintsController < ApplicationController
respond_to do |format|
if @sprint.pending?
if @sprint.can_populate?(@user)
+ @title = "Sprint #{(a)sprint.id} (Planning)"
@user_stories = UserStory.find_all_by_product_id((a)product.id)
@estimates = Hash.new
@@ -166,6 +172,7 @@ class SprintsController < ApplicationController
flash[:message] = "Sprint backlog has been updated with #{(a)sprint.backlog_items.size} items."
format.html { redirect_to product_sprint_path(@product, @sprint) }
else
+ @title = "Sprint #{(a)sprint.id} (Planning)"
flash[:error] = "There was an error updating the sprint backlog."
@user_stories = UserStory.find_all_by_product_id((a)product.id)
format.html { render :action => :plan }
diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb
index 6036079..877d0bd 100644
--- a/app/controllers/stories_controller.rb
+++ b/app/controllers/stories_controller.rb
@@ -21,6 +21,7 @@ class StoriesController < ApplicationController
before_filter :load_user_story, :except => [:index, :new, :create]
def index
+ @title = "All User Stories for #{(a)product.name}"
@user_stories = UserStory.paginate(
:page => params[:page],
:per_page => 10,
@@ -34,6 +35,7 @@ class StoriesController < ApplicationController
# GET /products/1/stories/1
def show
+ @title = "User Story - #{(a)user_story.title}"
respond_to do |format|
format.html
end
@@ -42,6 +44,7 @@ class StoriesController < ApplicationController
# GET /products/1/stories/new
def new
if @product.can_create_user_stories?(@user)
+ @title = "User Story (New)"
@user_story = UserStory.new(:product_id => @product.id)
else
flash[:error] = "You are not allowed to write user stories for #{(a)product.name}."
@@ -52,6 +55,7 @@ class StoriesController < ApplicationController
# GET /products/1/stories/1/edit
def edit
if @user_story.can_edit?(@user)
+ @title = "User Story - #{(a)user_story.title} (Edit)"
unless @product.id == @user_story.product_id
flash[:error] = "This user story does not belong to that product."
redirect_to product_stories_path(@product)
@@ -66,18 +70,19 @@ class StoriesController < ApplicationController
def create
respond_to do |format|
if @product.can_create_user_stories?(@user)
- UserStory.transaction do
- @user_story = UserStory.new(params[:user_story])
- @user_story.product = @product
-
- if @user_story.save
- flash[:message] = "The user story was successfully created."
- format.html { redirect_to product_stories_path(@product) }
- else
- @user_story.valid?
- format.html { render :action => :edit }
- end
+ UserStory.transaction do
+ @user_story = UserStory.new(params[:user_story])
+ @user_story.product = @product
+
+ if @user_story.save
+ flash[:message] = "The user story was successfully created."
+ format.html { redirect_to product_stories_path(@product) }
+ else
+ @title = "User Story (New)"
+ @user_story.valid?
+ format.html { render :action => :edit }
end
+ end
else
flash[:error] = "You are not allowed to write user stories for #{(a)product.name}."
format.html { redirect_to product_stories_path(@product) }
@@ -88,17 +93,18 @@ class StoriesController < ApplicationController
def update
respond_to do |format|
if @user_story.can_edit?(@user)
- UserStory.transaction do
- @user_story.update_attributes(params[:user_story])
-
- if @user_story.save
- flash[:message] = "The user story was successfully updated."
- format.html { redirect_to product_stories_path(@product) }
- else
- @user_story.valid?
- format.html { render :action => :edit }
- end
+ UserStory.transaction do
+ @user_story.update_attributes(params[:user_story])
+
+ if @user_story.save
+ flash[:message] = "The user story was successfully updated."
+ format.html { redirect_to product_stories_path(@product) }
+ else
+ @title = "User Story - #{(a)user_story.title} (Edit)"
+ @user_story.valid?
+ format.html { render :action => :edit }
end
+ end
else
flash[:error] = "You are not authorized to edit user stories for #{(a)product.name}."
format.html { redirect_to product_story_path(@product, @user_story) }
diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb
index b98d4c3..3c88a6e 100644
--- a/app/controllers/tasks_controller.rb
+++ b/app/controllers/tasks_controller.rb
@@ -39,6 +39,7 @@ class TasksController < ApplicationController
# GET /tasks/1
def show
+ @title = "Task For Backlog Item #{(a)task.backlog_item.id}"
respond_to do |format|
format.html
end
@@ -48,6 +49,7 @@ class TasksController < ApplicationController
def new
if @user.id == @this_user.id
if @backlog_item.can_add_tasks?(@user)
+ @title = "New Task For \"#{(a)backlog_item.user_story.title}\""
@task = Task.new(:primary_id => @this_user.id, :backlog_item_id => @backlog_item.id)
@users = load_product_members
else
@@ -63,6 +65,7 @@ class TasksController < ApplicationController
# GET /tasks/1/edit
def edit
+ @title = "Task For Backlog Item #{(a)task.backlog_item.id} (Edit)"
@users = load_product_members
unless @task.can_edit?(@user)
flash[:error] = "You are not allowed to edit this task."
@@ -84,6 +87,7 @@ class TasksController < ApplicationController
flash[:message] = "Recorded #{(a)task.hours} against this backlog item."
format.html { redirect_to product_sprint_item_path(@product, @sprint, @backlog_item) }
else
+ @title = "New Task For \"#{(a)backlog_item.user_story.title}\""
@task.valid?
@users = load_product_members
format.html { render :action => :new }
@@ -109,6 +113,7 @@ class TasksController < ApplicationController
if @task.save
else
+ @title = "Task For Backlog Item #{(a)task.backlog_item.id} (Edit)"
@users = load_product_members
@task.valid?
format.html { render :action => :edit }
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index d1ff88a..f91a6c6 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -21,6 +21,7 @@ class UsersController < ApplicationController
# GET /users
def index
+ @title = "All Users"
@users = User.paginate(
:order => 'display_name ASC',
:page => params[:page],
@@ -29,14 +30,14 @@ class UsersController < ApplicationController
# GET /users/1
def show
+ @title = "#{(a)this_user.display_name}"
end
# GET /users/new
def new
if (@user == nil) || (@user.create_users?)
@this_user = User.new
-
-
+ @title = "User Account (New)"
else
flash[:error] = "You cannot create a new user account."
redirect_to users_path
@@ -45,6 +46,7 @@ class UsersController < ApplicationController
# GET /users/1/edit
def edit
+ @title = "#{(a)this_user.display_name} (Edit)"
unless @this_user.can_edit?(@user)
flash[:error] = "You are not authorized to edit that account."
redirect_to users_path
@@ -67,6 +69,7 @@ class UsersController < ApplicationController
flash[:message] = "An email verification has been sent to #{(a)this_user.email}."
format.html { redirect_to user_path(@this_user) }
else
+ @title = "User Account (New)"
@this_user.valid?
format.html { render :action => :edit }
end
@@ -87,6 +90,7 @@ class UsersController < ApplicationController
flash[:message] = "User has been updated."
format.html { redirect_to user_path }
else
+ @title = "#{(a)this_user.display_name} (Edit)"
@this_user.valid?
format.html { render :action => :edit }
end
@@ -99,6 +103,7 @@ class UsersController < ApplicationController
# GET /users/1/backlog
def backlog
+ @title = "Backlog For #{(a)this_user.display_name}"
@backlog_items = BacklogItem.paginate(
:conditions => ['owner_id = ?', @this_user.id],
:page => params[:page],
@@ -120,6 +125,7 @@ class UsersController < ApplicationController
format.html { redirect_to user_path(@user) }
end
else
+ @title = "Email Verification For #{(a)user.email}"
flash[:error] = "Missing or invalid verification token."
format.html
end
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb
index 0babca4..94d0d0a 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -1,7 +1,7 @@
<html>
<head>
- <title>ProjXP</title>
+ <title>ProjXP<%= @title ? " - #{@title}" : "" %></title>
<%= javascript_include_tag :defaults %>
diff --git a/db/schema.rb b/db/schema.rb
index 1d72930..c231a75 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -23,6 +23,7 @@ ActiveRecord::Schema.define(:version => 17) do
end
add_index "backlog_items", ["sprint_id", "user_story_id"], :name => "index_backlog_items_on_sprint_id_and_user_story_id", :unique => true
+ add_index "backlog_items", ["user_story_id"], :name => "fk_backlog_items_user_story"
create_table "product_roles", :force => true do |t|
t.integer "user_id", :null => false
@@ -34,7 +35,9 @@ ActiveRecord::Schema.define(:version => 17) do
t.boolean "is_approved", :default => false
end
- add_index "product_roles", ["product_id", "user_id"], :name => "index_product_roles_on_user_id_and_product_id", :unique => true
+ add_index "product_roles", ["user_id", "product_id"], :name => "index_product_roles_on_user_id_and_product_id", :unique => true
+ add_index "product_roles", ["product_id"], :name => "fk_user_role_product"
+ add_index "product_roles", ["role_id"], :name => "fk_user_role_role"
create_table "products", :force => true do |t|
t.integer "project_id"
@@ -46,6 +49,7 @@ ActiveRecord::Schema.define(:version => 17) do
end
add_index "products", ["name"], :name => "index_products_on_name", :unique => true
+ add_index "products", ["project_id"], :name => "fk_products_project"
create_table "projects", :force => true do |t|
t.integer "owner_id", :null => false
@@ -57,6 +61,7 @@ ActiveRecord::Schema.define(:version => 17) do
end
add_index "projects", ["name"], :name => "index_projects_on_name", :unique => true
+ add_index "projects", ["owner_id"], :name => "fk_product_owner"
create_table "remaining_hours_estimates", :force => true do |t|
t.integer "backlog_item_id", :null => false
@@ -67,6 +72,9 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "estimated_on", :null => false
end
+ add_index "remaining_hours_estimates", ["backlog_item_id"], :name => "fk_remaining_hours_item"
+ add_index "remaining_hours_estimates", ["user_id"], :name => "fk_remaining_hours_user"
+
create_table "roles", :force => true do |t|
t.string "name", :null => false
t.boolean "can_manage_backlog_items", :default => false, :null => false
@@ -98,6 +106,8 @@ ActiveRecord::Schema.define(:version => 17) do
t.integer "status", :default => 0, :null => false
end
+ add_index "sprints", ["product_id"], :name => "fk_sprint_product"
+
create_table "tasks", :force => true do |t|
t.integer "backlog_item_id", :null => false
t.integer "primary_id", :null => false
@@ -109,6 +119,10 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "updated_at"
end
+ add_index "tasks", ["backlog_item_id"], :name => "fk_task_backlog_item"
+ add_index "tasks", ["primary_id"], :name => "fk_task_primary"
+ add_index "tasks", ["backup_id"], :name => "fk_task_backup"
+
create_table "user_privileges", :force => true do |t|
t.integer "user_id", :null => false
t.boolean "admin_projects", :default => false, :null => false
@@ -117,6 +131,8 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "updated_at"
end
+ add_index "user_privileges", ["user_id"], :name => "fk_privilege_user"
+
create_table "user_stories", :force => true do |t|
t.integer "product_id"
t.integer "priority"
@@ -127,6 +143,8 @@ ActiveRecord::Schema.define(:version => 17) do
t.datetime "updated_at"
end
+ add_index "user_stories", ["product_id"], :name => "fk_user_story_product"
+
create_table "user_verifications", :force => true do |t|
t.integer "user_id", :null => false
t.string "token", :limit => 16, :null => false
--
1.6.0.2
15 years, 5 months
[PROJXP [PATCH] Changes to the edit and list views.
by Darryl L. Pierce
Dropped the border around the list table. Changed the background of
the thead section to black and dropped the faux 3D effects.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
public/stylesheets/forms.css | 22 ++++++++++++++++------
public/stylesheets/lists.css | 8 ++++++--
public/stylesheets/projxp.css | 8 +++-----
3 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/public/stylesheets/forms.css b/public/stylesheets/forms.css
index 1809889..7c99f26 100644
--- a/public/stylesheets/forms.css
+++ b/public/stylesheets/forms.css
@@ -3,21 +3,27 @@
font-weight: bold;
}
-table.edit:before {
- color: #ff0000;
- content: "<p>* indicates a required field.</p>"
+table.edit {
+ width: 600px;
+ padding: 5px 15px 5px 15px;
+ margin: 15px 0px 0px 15px;
+ border: 1px outset #ff0000;
}
table.edit td.label, table.edit td.label-required {
text-align: right;
font-weight: bold;
- background-color: #00ffff;
- border: 1px solid #00ffff;
+ background-color: #ffffff;
+ color: #ff0000;
padding: 1px 5px 1px 15px;
}
+table.edit td.value {
+ width: 100%;
+}
+
table.edit td.label-required:before {
color: #ff0000;
content: "* ";
@@ -25,4 +31,8 @@ table.edit td.label-required:before {
table.edit td.label:after, table.edit td.label-required:after {
content: ":";
-}
\ No newline at end of file
+}
+
+table.edit input {
+ border: 1px groove #000000;
+}
diff --git a/public/stylesheets/lists.css b/public/stylesheets/lists.css
index 2d99244..2316051 100644
--- a/public/stylesheets/lists.css
+++ b/public/stylesheets/lists.css
@@ -2,7 +2,6 @@ table.list {
width: 100%;
padding: 5px 5px 5px 5px;
- border: 1px solid #000000;
padding: 2px 2px 2px 2px;
}
@@ -48,6 +47,10 @@ col.date {
min-width: 10%;
}
+table.list thead {
+ background: #000000;
+}
+
table.list th, table.list td {
padding: 5px 10px 5px 10px;
}
@@ -56,11 +59,12 @@ table.list th {
color: #000000;
border-width: 1px;
border-style: solid;
- border-color: #ffffd4 #000000 #000000 #ffffd4;
+ /*border-color: #ffffd4 #000000 #000000 #ffffd4;*/
text-transform: uppercase;
text-align: center;
background: #7fffd4;
overflow: auto;
+ padding: 1px;
}
table.list th.title {
diff --git a/public/stylesheets/projxp.css b/public/stylesheets/projxp.css
index b0a5d40..b9d23fe 100644
--- a/public/stylesheets/projxp.css
+++ b/public/stylesheets/projxp.css
@@ -22,7 +22,8 @@ td {
}
#client-box {
- width: 100%;
+ width: 900px;
+ margin-left: 124px;
}
#content-box {
@@ -58,11 +59,8 @@ td {
left: 0px;
bottom: 0px;
- background-color: #336699;
- color: #ffffff;
+ border-top: 1px solid #000000;
font-size: 100%;
- padding-left: 15px;
- padding-right: 15px;
border-top: solid 1px #000000;
text-align: center;
}
--
1.6.0.2
15 years, 5 months
[PROJXP [PATCH] Changed the styling for detail blocks.
by Darryl L. Pierce
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/items/show.html.erb | 28 +++++++++++++++++++++++++---
app/views/products/_details.html.erb | 2 +-
app/views/projects/_details.html.erb | 2 +-
app/views/sprints/show.html.erb | 2 +-
app/views/stories/show.html.erb | 27 ++++++++++++++++++++++++++-
app/views/tasks/show.html.erb | 10 ++++------
app/views/users/show.html.erb | 3 +--
public/stylesheets/details.css | 27 +++++++++++++++++----------
8 files changed, 76 insertions(+), 25 deletions(-)
diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb
index 0d2d5cd..aab97b3 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -1,11 +1,33 @@
-<table class="details">
+<table class="detail">
<tr>
<td class="label">Owner:</td>
<td class="value"><%= @backlog_item.owner.display_name if @backlog_item.owner %>
</tr>
-</table>
-<%= render(:partial => 'stories/show', :object => @backlog_item.user_story) %>
+ <tr>
+ <td class="label">Project:</td>
+ <td class="value"><%= link_to @product.project.name, project_path((a)product.project) %></td>
+ </tr>
+
+ <tr>
+ <td class="label">Product:</td>
+ <td class="value"><%= link_to @product.name, product_path(@product) %></td>
+ </tr>
+
+ <tr>
+ <td class="label">Title:</td>
+ <td class="value"><%= @backlog_item.user_story.title %></td>
+ </tr>
+
+ <tr>
+ <td class="label">Priority:</td>
+ <td class="value"><%= @backlog_item.user_story.priority %></td>
+ </tr>
+
+ <tr>
+ <td class="text" colspan="2"><%= simple_format @backlog_item.user_story.description %></td>
+ </tr>
+</table>
<% if @backlog_item.can_add_tasks?(@user) %>
<%= link_to "Add Task", new_user_task_path(@user, :item => @backlog_item) %>
diff --git a/app/views/products/_details.html.erb b/app/views/products/_details.html.erb
index 0275d57..c1b3433 100644
--- a/app/views/products/_details.html.erb
+++ b/app/views/products/_details.html.erb
@@ -1,4 +1,4 @@
-<table class="details">
+<table class="detail">
<thead>
<tr>
<th class="title" colspan="2"><%= "Details For #{(a)product.name}" %></th>
diff --git a/app/views/projects/_details.html.erb b/app/views/projects/_details.html.erb
index 9d3a5fe..a54b89b 100644
--- a/app/views/projects/_details.html.erb
+++ b/app/views/projects/_details.html.erb
@@ -1,4 +1,4 @@
-<table class="details">
+<table class="detail">
<thead>
<tr>
<th class="title" colspan="2"><%= "Details For #{(a)project.name}" %></th>
diff --git a/app/views/sprints/show.html.erb b/app/views/sprints/show.html.erb
index 0bfb308..6a92c74 100644
--- a/app/views/sprints/show.html.erb
+++ b/app/views/sprints/show.html.erb
@@ -6,7 +6,7 @@
<%= link_to "Plan", plan_product_sprint_path(@product, @sprint) %>
<% end %>
-<table class="details">
+<table class="detail">
<thead>
<tr>
<th class="title" colspan="2"><%= @sprint.title %></th>
diff --git a/app/views/stories/show.html.erb b/app/views/stories/show.html.erb
index ef7466a..989edb1 100644
--- a/app/views/stories/show.html.erb
+++ b/app/views/stories/show.html.erb
@@ -1,4 +1,29 @@
-<%= render(:partial => 'show', :object => @user_story) %>
+<table class="details">
+ <tr>
+ <td class="label">Project:</td>
+ <td class="value"><%= link_to @product.project.name, project_path((a)product.project) %></td>
+ </tr>
+
+ <tr>
+ <td class="label">Product:</td>
+ <td class="value"><%= link_to @product.name, product_path(@product) %></td>
+ </tr>
+
+ <tr>
+ <td class="label">Title:</td>
+ <td class="value"><%= @product.user_story.title %></td>
+ </tr>
+
+ <tr>
+ <td class="label">Description:</td>
+ <td class="value"><%= simple_format @product.user_story.description %></td>
+ </tr>
+
+ <tr>
+ <td class="label">Priority:</td>
+ <td class="value"><%= @product.user_story.priority %></td>
+ </tr>
+</table>
<% if @user_story.can_edit?(@user) %>
<%= link_to "Edit", edit_product_story_path(@product, @user_story) %>
diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb
index e84cb70..dfeb4a9 100644
--- a/app/views/tasks/show.html.erb
+++ b/app/views/tasks/show.html.erb
@@ -1,9 +1,4 @@
-<table class="details">
- <tr>
- <td class="label">Description:</td>
- <td class="value"><%= simple_format @task.description %></td>
- </tr>
-
+<table class="detail">
<tr>
<td class="label">When:</td>
<td class="value"><%= @task.when %></td>
@@ -24,6 +19,9 @@
<td class="label"><%= link_to(@task.backup.display_name,user_path((a)task.backup)) if @task.backup %></td>
</tr>
+ <tr>
+ <td class="text" colspan="2"><%= simple_format @task.description %></td>
+ </tr>
</table>
<%= link_to "Back", user_tasks_path((a)task.primary) %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 776a7e3..f2fdd88 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,7 +1,6 @@
<table class="detail">
<tr>
- <td class="label">Name:</td>
- <td class="value"><%= @this_user.display_name %></td>
+ <td class="title" colspan="2"><%= @this_user.display_name %></td>
</tr>
<tr>
diff --git a/public/stylesheets/details.css b/public/stylesheets/details.css
index 632f6fd..dc839db 100644
--- a/public/stylesheets/details.css
+++ b/public/stylesheets/details.css
@@ -1,23 +1,30 @@
-table.details {
- width: 100%;
-
- padding: 2px 3px 2px 3px;
+table.detail {
+ width: 600px;
+ border: 1px outset #000000;
+ padding: 5px 15px 5px 15px;
+ margin: 15px 0px 0px 15px;
}
-table.details th.title {
+table.detail th.title, table.detail td.title {
font-weight: bold;
text-align: center;
border-bottom: 1px solid #000000;
background-color: #f3f3f3;
}
-table.details td.label {
- width: 25%;
+table.detail td.label {
padding-left: 50px;
- color: #707070;
+ background-color: #ffffff;
+ color: #070707;
+ font-weight: bold;
+ text-align: right;
+}
+
+table.detail td.value {
+ width: 100%;
}
-table.details td.text {
+table.detail td.text {
font-size: 90%;
padding: 5px 10px 1px 10px;
-}
\ No newline at end of file
+}
--
1.6.0.2
15 years, 5 months