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

Clean up layout

Mir Bhatia7715d823962e
diff --git a/modules/meeting/app/components/_index.sass b/modules/meeting/app/components/_index.sass
index cba7d0c0d18..554400e71d2 100644
--- a/modules/meeting/app/components/_index.sass
+++ b/modules/meeting/app/components/_index.sass
@@ -3,3 +3,4 @@
@import "./meeting_sections/header_component.sass"
@import "./meetings/side_panel/state_component.sass"
@import "./meetings/side_panel/participants_component.sass"
+@import "./recurring_meetings/table_header_component.sass"
diff --git a/modules/meeting/app/components/recurring_meetings/show_page_header_component.html.erb b/modules/meeting/app/components/recurring_meetings/show_page_header_component.html.erb
index 6ba8d651df3..c1318ad6a60 100644
--- a/modules/meeting/app/components/recurring_meetings/show_page_header_component.html.erb
+++ b/modules/meeting/app/components/recurring_meetings/show_page_header_component.html.erb
@@ -8,14 +8,6 @@
header.with_description { page_description }
header.with_breadcrumbs(breadcrumb_items)
- header.with_action_button(
- tag: :a,
- mobile_label: I18n.t("recurring_meeting.template.label_view_template"),
- mobile_icon: :eye,
- size: :medium,
- href: meeting_path(@meeting.template)
- ) { I18n.t("recurring_meeting.template.label_view_template") }
-
if render_create_button?
header.with_action_menu(menu_arguments: { anchor_align: :end },
button_arguments: { icon: "op-kebab-vertical",
diff --git a/modules/meeting/app/components/recurring_meetings/table_header_component.html.erb b/modules/meeting/app/components/recurring_meetings/table_header_component.html.erb
index dd3846b36f3..ca857599766 100644
--- a/modules/meeting/app/components/recurring_meetings/table_header_component.html.erb
+++ b/modules/meeting/app/components/recurring_meetings/table_header_component.html.erb
@@ -30,25 +30,27 @@ See COPYRIGHT and LICENSE files for more details.
<%=
component_wrapper do
flex_layout do |flex|
- flex.with_row(mb: 2, mt: space) do
- # flex.with_column do
- render(Primer::Beta::Heading.new(tag: :h3)) { @title }
- # end
-
- # flex.with_column do
- # render(Primer::Beta::Button.new(
- # tag: :a,
- # mobile_label: I18n.t("recurring_meeting.template.label_view_template"),
- # side: :medium,
- # href: meeting_path(@meeting.template)
- # )) do |button|
- # button.with_leading_visual_icon(icon: :pencil)
- # I18n.t("recurring_meeting.template.label_edit_template")
- # end
- # end
+ flex.with_row(mb: 2, mt: planned) do
+ flex_layout(justify_content: :space_between) do |container|
+ container.with_column do
+ render(Primer::Beta::Heading.new(tag: :h3)) { @title }
+ end
+
+ container.with_column do
+ render(Primer::Beta::Button.new(
+ tag: :a,
+ mobile_label: I18n.t("recurring_meeting.template.label_view_template"),
+ side: :medium,
+ href: meeting_path(@meeting.template)
+ )) do |button|
+ button.with_leading_visual_icon(icon: :pencil)
+ I18n.t("recurring_meeting.template.label_edit_template")
+ end
+ end if @planned
+ end
end
- flex.with_row(mb: 2) do
+ flex.with_row(classes: "op-table-heading-no-mobile", mb: 2) do
render(Primer::Beta::Text.new(tag: :p)) do
@subtitle
end
diff --git a/modules/meeting/app/components/recurring_meetings/table_header_component.rb b/modules/meeting/app/components/recurring_meetings/table_header_component.rb
index a864e1969ad..7df8c532d6b 100644
--- a/modules/meeting/app/components/recurring_meetings/table_header_component.rb
+++ b/modules/meeting/app/components/recurring_meetings/table_header_component.rb
@@ -32,19 +32,19 @@ module RecurringMeetings
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers
- def initialize(meeting:, title:, subtitle:, space: false)
+ def initialize(meeting:, title:, subtitle:, planned: false)
super
@meeting = meeting
@title = title
@subtitle = subtitle
- @space = space
+ @planned = planned
end
private
- def space
- @space ? 2 : 0
+ def planned
+ @planned ? 5 : 0
end
end
end
diff --git a/modules/meeting/app/components/recurring_meetings/table_header_component.sass b/modules/meeting/app/components/recurring_meetings/table_header_component.sass
new file mode 100644
index 00000000000..dd74be00260
--- /dev/null
+++ b/modules/meeting/app/components/recurring_meetings/table_header_component.sass
@@ -0,0 +1,5 @@
+@import "helpers"
+
+@media screen and (max-width: $breakpoint-md)
+ .op-table-heading-no-mobile
+ display: none
diff --git a/modules/meeting/app/views/recurring_meetings/show.html.erb b/modules/meeting/app/views/recurring_meetings/show.html.erb
index fc40e40eb51..ba3cad360e3 100644
--- a/modules/meeting/app/views/recurring_meetings/show.html.erb
+++ b/modules/meeting/app/views/recurring_meetings/show.html.erb
@@ -40,7 +40,7 @@ See COPYRIGHT and LICENSE files for more details.
<% else -%>
<%= render RecurringMeetings::TableHeaderComponent.new(meeting: @recurring_meeting, title: I18n.t("recurring_meeting.agenda_opened.title"), subtitle: I18n.t("recurring_meeting.agenda_opened.subtitle")) %>
<%= render RecurringMeetings::TableComponent.new(rows: @meetings, current_project: @project, count: @count, direction: @direction, max_count: @max_count) %>
- <%= render RecurringMeetings::TableHeaderComponent.new(meeting: @recurring_meeting, title: I18n.t("recurring_meeting.planned.title"), subtitle: I18n.t("recurring_meeting.planned.subtitle"), space: true) %>
+ <%= render RecurringMeetings::TableHeaderComponent.new(meeting: @recurring_meeting, title: I18n.t("recurring_meeting.planned.title"), subtitle: I18n.t("recurring_meeting.planned.subtitle"), planned: true) %>
<%= render RecurringMeetings::TableComponent.new(rows: @planned_meetings, current_project: @project, count: @count, direction: @direction, max_count: @max_count) %>
<% end -%>
<% end -%>