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
add redirect to day page on mobile
Klaus Zandersdb10c8738f7b
diff --git a/modules/costs/app/controllers/my/time_tracking_controller.rb b/modules/costs/app/controllers/my/time_tracking_controller.rbindex 54248c0c85f..dc8d4697d53 100644--- a/modules/costs/app/controllers/my/time_tracking_controller.rb+++ b/modules/costs/app/controllers/my/time_tracking_controller.rb@@ -51,8 +51,11 @@ module Myhelper_method :current_day, :today?, :this_week?, :this_month?, :time_entries_jsondef calendar- # TODO: on mobile, we should show the day view- redirect_to action: :week+ if browser.device.mobile?+ redirect_to action: :day+ else+ redirect_to action: :week+ endenddef daydiff --git a/modules/costs/app/views/my/time_tracking/day.html.erb b/modules/costs/app/views/my/time_tracking/day.html.erbindex f3c7c50cfd3..bb66833433c 100644--- a/modules/costs/app/views/my/time_tracking/day.html.erb+++ b/modules/costs/app/views/my/time_tracking/day.html.erb@@ -3,7 +3,7 @@header.with_title { I18n.t(:label_today) }header.with_breadcrumbs([- { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_week_path },+ { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_path },I18n.t(:label_today)])diff --git a/modules/costs/app/views/my/time_tracking/month.html.erb b/modules/costs/app/views/my/time_tracking/month.html.erbindex d1e4bda3bac..09c750b46fd 100644--- a/modules/costs/app/views/my/time_tracking/month.html.erb+++ b/modules/costs/app/views/my/time_tracking/month.html.erb@@ -3,7 +3,7 @@header.with_title { I18n.t(:label_this_month) }header.with_breadcrumbs([- { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_week_path },+ { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_path },I18n.t(:label_this_month)])diff --git a/modules/costs/app/views/my/time_tracking/week.html.erb b/modules/costs/app/views/my/time_tracking/week.html.erbindex ce5662e0afc..3ed0044c3dd 100644--- a/modules/costs/app/views/my/time_tracking/week.html.erb+++ b/modules/costs/app/views/my/time_tracking/week.html.erb@@ -3,7 +3,7 @@header.with_title(variant: :large) { I18n.t(:label_this_week) }header.with_breadcrumbs([- { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_week_path },+ { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_path },I18n.t(:label_this_week)])