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
Rename #calendar method to #index
Klaus Zanders0f9688971354
diff --git a/modules/costs/app/controllers/my/time_tracking_controller.rb b/modules/costs/app/controllers/my/time_tracking_controller.rbindex 1f799f29d77..ad9260c3684 100644--- a/modules/costs/app/controllers/my/time_tracking_controller.rb+++ b/modules/costs/app/controllers/my/time_tracking_controller.rb@@ -32,7 +32,7 @@ module Myclass TimeTrackingController < ApplicationControllerbefore_action :require_login- no_authorization_required!(:calendar, :day, :week, :month)+ no_authorization_required!(:index, :day, :week, :month)menu_item :my_time_tracking@@ -40,7 +40,7 @@ module Myhelper_method :current_day, :today?, :this_week?, :this_month?, :list_view_component, :view_mode- def calendar+ def indexif mobile?redirect_to action: :day, view_mode: default_view_modeelsediff --git a/modules/costs/config/routes.rb b/modules/costs/config/routes.rbindex 29a8ce80b38..642a837e29f 100644--- a/modules/costs/config/routes.rb+++ b/modules/costs/config/routes.rb@@ -50,7 +50,7 @@ Rails.application.routes.draw donamespace "my" doget "/timer" => "timer#show", as: "timers"- get "/time-tracking" => "time_tracking#calendar"+ get "/time-tracking" => "time_tracking#index"get "/time-tracking/day(-:view_mode)(/:date)" => "time_tracking#day",as: :time_tracking_dayget "/time-tracking/week(-:view_mode)(/:date)" => "time_tracking#week",diff --git a/modules/costs/lib/costs/engine.rb b/modules/costs/lib/costs/engine.rbindex 111ab738a03..f62be67afc3 100644--- a/modules/costs/lib/costs/engine.rb+++ b/modules/costs/lib/costs/engine.rb@@ -144,28 +144,10 @@ module Costsmenu :global_menu,:my_time_tracking,- { controller: "/my/time_tracking", action: "calendar" },+ { controller: "/my/time_tracking", action: "index" },after: :my_page,caption: :label_my_time_tracking,icon: :stopwatch-- # menu :global_menu,- # :my_time_tracking_today,- # { controller: "/my/time_tracking", action: "day" },- # parent: :my_time_tracking,- # caption: :label_today- #- # menu :global_menu,- # :my_time_tracking_this_week,- # { controller: "/my/time_tracking", action: "week" },- # parent: :my_time_tracking,- # caption: :label_this_week- #- # menu :global_menu,- # :my_time_tracking_this_month,- # { controller: "/my/time_tracking", action: "month" },- # parent: :my_time_tracking,- # caption: :label_this_monthendinitializer "costs.settings" dodiff --git a/modules/costs/spec/controllers/my/time_tracking_controller_spec.rb b/modules/costs/spec/controllers/my/time_tracking_controller_spec.rbindex 81a144d372d..6fb62ff2e40 100644--- a/modules/costs/spec/controllers/my/time_tracking_controller_spec.rb+++ b/modules/costs/spec/controllers/my/time_tracking_controller_spec.rb@@ -49,7 +49,7 @@ RSpec.describe My::TimeTrackingController doendit "redirects to the week calendar view" do- get :calendar+ get :indexexpect(response).to redirect_to(action: :week, view_mode: "calendar")endend@@ -60,7 +60,7 @@ RSpec.describe My::TimeTrackingController doendit "redirects to the week list view" do- get :calendar+ get :indexexpect(response).to redirect_to(action: :week, view_mode: "list")endend@@ -77,7 +77,7 @@ RSpec.describe My::TimeTrackingController doendit "redirects to the day calendar view" do- get :calendar+ get :indexexpect(response).to redirect_to(action: :day, view_mode: "calendar")endend@@ -88,7 +88,7 @@ RSpec.describe My::TimeTrackingController doendit "redirects to the day list view" do- get :calendar+ get :indexexpect(response).to redirect_to(action: :day, view_mode: "list")endend