Patch #231 » projects_controller.diff
| projects_controller.rb (working copy) | ||
|---|---|---|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
require 'csv'
|
||
|
require 'RSSParser'
|
||
|
class ProjectsController < ApplicationController
|
||
|
layout 'base'
|
||
| ... | ... | |
|
@total_issues_by_tracker = Issue.count(:group => :tracker, :conditions => ["project_id=?", @project.id])
|
||
|
@total_hours = @project.time_entries.sum(:hours)
|
||
|
@key = User.current.rss_key
|
||
|
if @project.ccfeed?
|
||
|
@cc_feed = RSSParser.run(@project.ccfeed)
|
||
|
end
|
||
|
end
|
||
|
def settings
|
||
| ... | ... | |
|
@key = User.current.rss_key
|
||
|
end
|
||
|
|
||
|
|
||
|
private
|
||
|
# Find project of id params[:id]
|
||
|
# if not found, redirect to project list
|
||
| ... | ... | |
|
@selected_tracker_ids = selectable_trackers.collect {|t| t.id.to_s }
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# Retrieve query from session or build a new query
|
||
|
def retrieve_query
|
||
|
if params[:query_id]
|
||