Skip to content

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

correctly handle the page header

Klaus Zandersd1de6a39f3b3
diff --git a/modules/costs/app/components/my/time_tracking/calendar.sass b/modules/costs/app/components/my/time_tracking/calendar.sass
index 21366a456a6..076c5ad7a26 100644
--- a/modules/costs/app/components/my/time_tracking/calendar.sass
+++ b/modules/costs/app/components/my/time_tracking/calendar.sass
@@ -1,5 +1,5 @@
.time-entry-calendar
- height: calc(100% - 110px)
+ height: 100%
.op-fc-wrapper
flex-grow: 1
diff --git a/modules/costs/app/components/my/time_tracking/calendar_component.html.erb b/modules/costs/app/components/my/time_tracking/calendar_component.html.erb
index 0cebef6a5f5..7b7564bc4ff 100644
--- a/modules/costs/app/components/my/time_tracking/calendar_component.html.erb
+++ b/modules/costs/app/components/my/time_tracking/calendar_component.html.erb
@@ -1,4 +1,5 @@
<%= flex_layout(data: wrapper_data, classes: "time-entry-calendar") do |calendar_page| %>
+<% calendar_page.with_row { render(My::TimeTracking::HeaderComponent.new(mode: mode, date: date)) } %>
<% calendar_page.with_row do %>
<%= render(Primer::OpenProject::SubHeader.new) do |component|
component.with_text { title }
@@ -10,7 +11,7 @@
end
end
- component.with_action_button(tag: :a, href: today_href) { "Today" }
+ component.with_action_button(tag: :a, href: today_href) { I18n.t(:label_today) }
component.with_action_button(
scheme: :primary,
diff --git a/modules/costs/app/components/my/time_tracking/list_component.html.erb b/modules/costs/app/components/my/time_tracking/list_component.html.erb
index 50b66aa528f..e30bd310c6c 100644
--- a/modules/costs/app/components/my/time_tracking/list_component.html.erb
+++ b/modules/costs/app/components/my/time_tracking/list_component.html.erb
@@ -1,4 +1,5 @@
<%= component_wrapper(tag: "div", data: wrapper_data) do %>
+ <%= render(My::TimeTracking::HeaderComponent.new(mode: mode, date: date)) %>
<%= render(Primer::OpenProject::SubHeader.new) do |component|
component.with_text { title }
@@ -9,7 +10,7 @@
end
end
- component.with_action_button(tag: :a, href: today_href) { t("label_today") }
+ component.with_action_button(tag: :a, href: today_href) { t(:label_today) }
component.with_action_button(
scheme: :primary,
@@ -18,7 +19,7 @@
},
tag: :a,
href: dialog_time_entries_path(onlyMe: true)
- ) { "Log Time" }
+ ) { t(:button_log_time) }
end %>
<%- range.each_with_index do |date, i| %>
diff --git a/modules/costs/app/views/my/time_tracking/day.html.erb b/modules/costs/app/views/my/time_tracking/day.html.erb
index c11e1bd347b..b3f3712cf7d 100644
--- a/modules/costs/app/views/my/time_tracking/day.html.erb
+++ b/modules/costs/app/views/my/time_tracking/day.html.erb
@@ -1,2 +1 @@
-<%= render(My::TimeTracking::HeaderComponent.new(mode: params[:action].to_sym, date: current_day)) %>
<%= render(list_view_component) %>
diff --git a/modules/costs/app/views/my/time_tracking/month.html.erb b/modules/costs/app/views/my/time_tracking/month.html.erb
index c11e1bd347b..b3f3712cf7d 100644
--- a/modules/costs/app/views/my/time_tracking/month.html.erb
+++ b/modules/costs/app/views/my/time_tracking/month.html.erb
@@ -1,2 +1 @@
-<%= render(My::TimeTracking::HeaderComponent.new(mode: params[:action].to_sym, date: current_day)) %>
<%= render(list_view_component) %>
diff --git a/modules/costs/app/views/my/time_tracking/week.html.erb b/modules/costs/app/views/my/time_tracking/week.html.erb
index c11e1bd347b..b3f3712cf7d 100644
--- a/modules/costs/app/views/my/time_tracking/week.html.erb
+++ b/modules/costs/app/views/my/time_tracking/week.html.erb
@@ -1,2 +1 @@
-<%= render(My::TimeTracking::HeaderComponent.new(mode: params[:action].to_sym, date: current_day)) %>
<%= render(list_view_component) %>