Skip to content

Instantly share code, notes, and snippets.

@retorquere
Created March 19, 2010 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retorquere/338107 to your computer and use it in GitHub Desktop.
Save retorquere/338107 to your computer and use it in GitHub Desktop.
module BacklogsPlugin
module Hooks
class LayoutHook < Redmine::Hook::ViewListener
def view_issues_sidebar_queries_bottom(context={ })
links = ''
project = context[:project]
project_id = project.id
Sprint.open_sprints(project).each { |sprint|
# links += link_to(sprint.name, {
# :controller => 'backlogs',
# :action => 'select_sprint',
# :project_id => project_id,
# :sprint_id => sprint.id
# })
links += "#{sprint.name} "
links += "#{project.id} "
#links += "#{sprint.id} "
links += content_tag(:br)
}
return content_tag(:div, content_tag(:h3, l(:backlogs_sprints)) + links)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment