diff --git a/app/controllers/backlogs_controller.rb b/app/controllers/backlogs_controller.rb index 19530fa27c..4695161a42 100644 --- a/app/controllers/backlogs_controller.rb +++ b/app/controllers/backlogs_controller.rb @@ -1,4 +1,5 @@ include StoriesHelper +include BacklogMenuHelper class BacklogsController < ApplicationController unloadable diff --git a/app/helpers/backlog_menu_helper.rb b/app/helpers/backlog_menu_helper.rb new file mode 100644 index 0000000000..cfa97e5b75 --- /dev/null +++ b/app/helpers/backlog_menu_helper.rb @@ -0,0 +1,31 @@ +module BacklogMenuHelper + unloadable + + def backlog_menu(is_sprint, items = []) + html = %{ + + } + end + + def menu_link(label, options = {}) + # options[:class] = "pureCssMenui" + link_to(label, options) + end + +end diff --git a/app/views/backlogs/_backlog.html.erb b/app/views/backlogs/_backlog.html.erb index 7e0f5e0aeb..f06625b9a0 100644 --- a/app/views/backlogs/_backlog.html.erb +++ b/app/views/backlogs/_backlog.html.erb @@ -7,32 +7,36 @@
<%= date_or_nil(backlog.effective_date) %>
<%= backlog.points %>
- <%- end %> + <%= backlog_menu is_sprint(backlog), + [ + { + :item => "New story", + :for => :both + }, + { + :item => menu_link('Stories/Tasks', { + :controller => 'backlogs', + :action => 'select_sprint', + :project_id => @project, + :sprint_id => backlog }), + :for => :sprint + }, + { + :item => menu_link('Wiki', { + :controller => 'backlogs', + :action => 'wiki_page', + :project_id => @project.id, + :sprint_id => backlog.id }), + :for => :sprint, + :condition => @project.enabled_modules.any? {|m| m.name=="wiki" } + }, + { + :item => "Select All", + :for => :both + } + ] + %>