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 the layout for the week view
Klaus Zanders96acca07a44d
diff --git a/modules/costs/app/views/my/time_tracking/day.html.erb b/modules/costs/app/views/my/time_tracking/day.html.erbindex 7f32dd9c59d..8d731f456fa 100644--- a/modules/costs/app/views/my/time_tracking/day.html.erb+++ b/modules/costs/app/views/my/time_tracking/day.html.erb@@ -1,10 +1,10 @@<%=render Primer::OpenProject::PageHeader.new do |header|- header.with_title { "my time: day view" }+ header.with_title { I18n.t(:label_today) }header.with_breadcrumbs([- { title: "label_my_time_tracking", href: my_time_tracking_week_path },- "day view"+ { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_week_path },+ I18n.t(:label_today)])enddiff --git a/modules/costs/app/views/my/time_tracking/month.html.erb b/modules/costs/app/views/my/time_tracking/month.html.erbindex 88a3b74e667..f18bf60a872 100644--- a/modules/costs/app/views/my/time_tracking/month.html.erb+++ b/modules/costs/app/views/my/time_tracking/month.html.erb@@ -1,6 +1,11 @@<%=render Primer::OpenProject::PageHeader.new do |header|- header.with_title { "my time: month" }- header.with_breadcrumbs(["my time"])+ header.with_title { I18n.t(:label_this_month) }+ header.with_breadcrumbs(+ [+ { text: I18n.t(:label_my_time_tracking), href: my_time_tracking_week_path },+ I18n.t(:label_this_month)+ ]+ )end%>diff --git a/modules/costs/app/views/my/time_tracking/week.html.erb b/modules/costs/app/views/my/time_tracking/week.html.erbindex f9b68609a16..965396b6b34 100644--- a/modules/costs/app/views/my/time_tracking/week.html.erb+++ b/modules/costs/app/views/my/time_tracking/week.html.erb@@ -1,6 +1,65 @@<%=render Primer::OpenProject::PageHeader.new do |header|- header.with_title { "my time week" }- header.with_breadcrumbs(["my time"])+ 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 },+ I18n.t(:label_this_week)+ ]+ )++ btn = lambda do |button|+ button.with_leading_visual_icon(icon: :calendar)+ button.with_trailing_action_icon(icon: :"triangle-down")+ "Calendar"+ end++ header.with_action_menu(menu_arguments: { anchor_align: :end }, button_arguments: { button_block: btn }) do |menu|+ menu.with_item(label: "Calendar") do |item|+ item.with_leading_visual_icon(icon: :calendar)+ end+ menu.with_item(label: "List") do |item|+ item.with_leading_visual_icon(icon: "list-unordered")+ end+ end++ header.with_action_zen_mode_button+ header.with_action_icon_button(icon: "ellipsis", mobile_icon: "ellipsis", label: "more")end%>++<%= render(Primer::OpenProject::SubHeader.new) do |component|+ component.with_filter_component do+ concat(render(Primer::Beta::IconButton.new(icon: "search", aria: { label: "Search" })))++ concat(+ render(Primer::Beta::Button.new) do |button|+ button.with_leading_visual_icon(icon: :project)+ button.with_trailing_action_icon(icon: :"triangle-down")+ "Project"+ end+ )++ concat(+ render(Primer::Beta::Button.new) do |button|+ button.with_leading_visual_icon(icon: :log)+ button.with_trailing_action_icon(icon: :"triangle-down")+ "Activity"+ end+ )+ end++ component.with_text do+ "#{Time.zone.now.beginning_of_week.day} - #{Time.zone.now.end_of_week.day}, #{Time.zone.now.strftime('%B %Y')}"+ end+ component.with_action_component do+ render(Primer::Beta::ButtonGroup.new) do |group|+ group.with_button(icon: "arrow-left", aria: { label: "Previous week" })+ group.with_button(icon: "arrow-right", aria: { label: "Next week" })+ end+ end++ component.with_action_button { "Today" }++ component.with_action_button(scheme: :primary) { "Log Time" }+ end %>diff --git a/modules/costs/lib/costs/engine.rb b/modules/costs/lib/costs/engine.rbindex 18838251cb8..a321326683d 100644--- a/modules/costs/lib/costs/engine.rb+++ b/modules/costs/lib/costs/engine.rb@@ -144,7 +144,7 @@ module Costsmenu :global_menu,:my_time_tracking,- { controller: "/my/time_tracking", action: "day" },+ { controller: "/my/time_tracking", action: "week" },after: :my_page,caption: :label_my_time_tracking,icon: :stopwatch