parent
e02b96ffec
commit
a5c69e8fb5
@ -1,11 +0,0 @@ |
||||
class RbChangesController < RbApplicationController |
||||
unloadable |
||||
|
||||
def show |
||||
# Gather all that has changed in the project (params[:id]) since params[:last_update] |
||||
|
||||
respond_to do |format| |
||||
format.html |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,27 @@ |
||||
class RbUpdatedItemsController < RbApplicationController |
||||
unloadable |
||||
|
||||
# Returns all models that have changed since params[:since] |
||||
# params[:only] limits the types of models that the method |
||||
# should return |
||||
def show |
||||
only = (params[:only] ? params[:only].split(/, ?/).map{|v| v.to_sym} : [:sprints, :stories, :tasks, :impediments]) |
||||
@items = HashWithIndifferentAccess.new |
||||
|
||||
if only.include? :stories |
||||
@items[:stories] = Story.find_all_updated_since(params[:since], @project.id) |
||||
end |
||||
|
||||
if only.include? :tasks |
||||
@items[:tasks] = Task.find_all_updated_since(params[:since], @project.id) |
||||
end |
||||
|
||||
if only.include? :impediments |
||||
@items[:impediments] = Task.find_all_updated_since(params[:since], @project.id, true) |
||||
end |
||||
|
||||
respond_to do |format| |
||||
format.html { render :layout => false } |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,9 @@ |
||||
<div id="stories"> |
||||
<%= render :partial => "rb_stories/story", :collection => @items[:stories] %> |
||||
</div> |
||||
<div id="tasks"> |
||||
<%= render :partial => "rb_tasks/task", :collection => @items[:tasks] %> |
||||
</div> |
||||
<div id="impediments"> |
||||
<%= render :partial => "rb_impediments/impediment", :collection => @items[:impediments] %> |
||||
</div> |
Loading…
Reference in new issue