From 1c059bc7b5af6f785736e4eb450f035443dd0fbc Mon Sep 17 00:00:00 2001 From: Mohamed Wael Khobalatte Date: Wed, 4 Nov 2015 16:09:28 +0100 Subject: [PATCH] Move 'Create meeting' to toolbar --- app/views/meetings/index.html.erb | 10 +++++++++- lib/open_project/meeting/engine.rb | 5 ----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/views/meetings/index.html.erb b/app/views/meetings/index.html.erb index 384a61c59b..1c7d285c0c 100644 --- a/app/views/meetings/index.html.erb +++ b/app/views/meetings/index.html.erb @@ -21,7 +21,15 @@ See doc/COPYRIGHT.md for more details. <% html_title l(:label_meeting_plural) %> -<%= toolbar title: l(:label_meeting_plural) %> +<%= toolbar title: l(:label_meeting_plural) do %> + <% if authorize_for(:meetings, :new) %> + + + <%= I18n.t(:label_meeting_new) %> + + <% end %> +<% end %> + <% if @meetings_by_start_year_month_date.empty? -%>

<%= l(:label_no_data) %>

<% else -%> diff --git a/lib/open_project/meeting/engine.rb b/lib/open_project/meeting/engine.rb index 53d14d1c67..236b8de956 100644 --- a/lib/open_project/meeting/engine.rb +++ b/lib/open_project/meeting/engine.rb @@ -51,11 +51,6 @@ module OpenProject::Meeting param: :project_id, after: :wiki, html: { class: 'icon2 icon-quote' } - menu :project_menu, :new_meeting, { controller: '/meetings', action: 'new' }, - param: :project_id, - caption: :label_meeting_new, - parent: :meetings, - html: { class: 'icon2 icon-add' } ActiveSupport::Inflector.inflections do |inflect| inflect.uncountable 'meeting_minutes'