OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Correctly register the new Gantt module, so that is (de-)selectable in the project settings
Henriette Dargebea533274cc9
diff --git a/modules/gantt/config/locales/en.yml b/modules/gantt/config/locales/en.ymlnew file mode 100644index 00000000000..13d8dabe726--- /dev/null+++ b/modules/gantt/config/locales/en.yml@@ -0,0 +1,3 @@+# English strings go here+en:+ project_module_gantt: "Gantt"diff --git a/modules/gantt/lib/open_project/gantt/engine.rb b/modules/gantt/lib/open_project/gantt/engine.rbindex 8e6c9eee12c..0580af7535e 100644--- a/modules/gantt/lib/open_project/gantt/engine.rb+++ b/modules/gantt/lib/open_project/gantt/engine.rb@@ -36,6 +36,16 @@ module OpenProject::Ganttauthor_url: 'https://www.openproject.org',bundled: true,settings: {} do+ Rails.application.reloader.to_prepare do+ OpenProject::AccessControl.map do |ac_map|+ ac_map.project_module(:gantt, dependencies: :work_package_tracking, order: 95)+ end++ OpenProject::AccessControl.permission(:view_work_packages).tap do |add|+ add.controller_actions << 'gantt/gantt/index'+ end+ end+# should_render_global_menu_item = Proc.new do# (User.current.logged? || !Setting.login_required?) &&# User.current.allowed_in_any_project?(:view_work_packages)@@ -55,6 +65,7 @@ module OpenProject::Gantt{ controller: '/work_packages', action: 'index' },caption: :label_gantt,after: :work_packages,+ if: ->(project) { project.module_enabled?(:gantt) },icon: 'view-timeline',html: {id: 'main-menu-gantt'@@ -66,7 +77,8 @@ module OpenProject::Ganttparent: :gantt,partial: 'gantt/gantt/menu',last: true,- caption: :label_gantt_chart+ caption: :label_gantt_chart,+ if: ->(project) { project.module_enabled?(:gantt) }# menu :top_menu,# :gantt,