Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed drag and drop, edit functionality.

  • Loading branch information...
commit 1bc277d9a7b858b8bead6053d943858f008b6088 1 parent 6f7a5eb
@den-plugins authored
View
10 app/controllers/task_boards_controller.rb
@@ -5,7 +5,7 @@ class TaskBoardsController < ApplicationController
before_filter :get_project, :authorize, :only => [:index, :show]
before_filter :set_cache_buster
before_filter :get_issue, :only => [:update_issue_status, :update_issue, :add_comment, :get_comment]
- before_filter :get_members, :only => [:update_issue_status, :update_issue, :show]
+ before_filter :get_dependencies, :only => [:update_issue_status, :update_issue]
def set_cache_buster
response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
@@ -28,6 +28,7 @@ def index
end
def show
+ get_members
@show_bugs = params[:show_bugs] ? true : false
@statuses = IssueStatus.all(:order => "position asc")
@version = Version.find params[:version_id]
@@ -112,7 +113,6 @@ def show
end
def update_issue_status
- get_project
@status = IssueStatus.find(params[:status_id])
@issue.init_journal(User.current, "")
@selected_resource = params[:selected_resource] ? params[:selected_resource] : ""
@@ -149,7 +149,6 @@ def update_issue_status
def update_issue
#TODO Permissions trapping - view
- get_project
@issue.init_journal(User.current, '')
@issue.update_attributes(params[:issue])
@selected_resource = params[:selected_resource] ? params[:selected_resource] : ""
@@ -212,6 +211,11 @@ def get_members
@members = @project.members.find(:all, :include => [:user], :order => "users.firstname ASC")
end
+ def get_dependencies
+ get_project
+ get_members
+ end
+
def ordered_keys(values)
values.keys.sort{|x,y| values[x][:order] <=> values[y][:order]}
end
View
2  app/views/task_boards/show.html.erb
@@ -83,7 +83,7 @@
<%= select_tag "selected_resource",
"<option id='selected_resource_blank' value='#{resource_blank}'>
#{resource_blank}
- </option>" + options_from_collection_for_select(@project.members.sort_by(&:name), "user_id", "name", @selected_resource.to_i),
+ </option>" + options_from_collection_for_select(@members.sort_by(&:name), "user_id", "name", @selected_resource.to_i),
:onchange => "filterByResource();" %>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.