diff --git a/app/components/op_primer/border_box_table_component.rb b/app/components/op_primer/border_box_table_component.rb index f0a464c8c6f3..b1cb1b9463e8 100644 --- a/app/components/op_primer/border_box_table_component.rb +++ b/app/components/op_primer/border_box_table_component.rb @@ -32,12 +32,6 @@ module OpPrimer class BorderBoxTableComponent < TableComponent include ComponentHelpers - def before_render - raise ArgumentError, "BorderBoxTableComponent cannot be #sortable?" if sortable? - - super - end - def header_args(_column) {} end diff --git a/modules/meeting/app/components/meetings/row_component.rb b/modules/meeting/app/components/meetings/row_component.rb index b945f6ddf157..2ef6bdbaac09 100644 --- a/modules/meeting/app/components/meetings/row_component.rb +++ b/modules/meeting/app/components/meetings/row_component.rb @@ -29,7 +29,14 @@ #++ module Meetings - class RowComponent < ::RowComponent + class RowComponent < ::OpPrimer::BorderBoxRowComponent + def column_args(column) + if column == :title + { style: "grid-column: span 2" } + else + super + end + end def project_name helpers.link_to_project model.project, {}, {}, false end @@ -38,14 +45,6 @@ def title link_to model.title, project_meeting_path(model.project, model) end - def type - if model.is_a?(StructuredMeeting) - I18n.t("meeting.types.structured") - else - I18n.t("meeting.types.classic") - end - end - def start_time safe_join([helpers.format_date(model.start_time), helpers.format_time(model.start_time, include_date: false)], " ") end diff --git a/modules/meeting/app/components/meetings/table_component.rb b/modules/meeting/app/components/meetings/table_component.rb index 4cd2c1b8e0a9..b46fc9f3b84f 100644 --- a/modules/meeting/app/components/meetings/table_component.rb +++ b/modules/meeting/app/components/meetings/table_component.rb @@ -29,29 +29,24 @@ #++ module Meetings - class TableComponent < ::TableComponent + class TableComponent < ::OpPrimer::BorderBoxTableComponent options :current_project # used to determine if displaying the projects column - sortable_columns :title, :project_name, :type, :start_time, :duration, :location + columns :title, :project_name, :start_time, :duration, :location def initial_sort %i[start_time asc] end - def sortable_columns_correlation - super.merge( - project_name: "projects.name", - type: "meetings.type" - ) + def header_args(column) + if column == :title + { style: "grid-column: span 2" } + else + super + end end - def initialize_sorted_model - helpers.sort_clear - - super - end - - def paginated? + def sortable? true end @@ -59,8 +54,7 @@ def headers @headers ||= [ [:title, { caption: Meeting.human_attribute_name(:title) }], current_project.blank? ? [:project_name, { caption: Meeting.human_attribute_name(:project) }] : nil, - [:type, { caption: Meeting.human_attribute_name(:type) }], - [:start_time, { caption: Meeting.human_attribute_name(:start_time) }], + [:start_time, { caption: I18n.t(:label_meeting_date_and_time) }], [:duration, { caption: Meeting.human_attribute_name(:duration) }], [:location, { caption: Meeting.human_attribute_name(:location) }] ].compact diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml index 184f4e7f2ad3..fc15b080454c 100644 --- a/modules/meeting/config/locales/en.yml +++ b/modules/meeting/config/locales/en.yml @@ -111,6 +111,7 @@ en: label_meeting_open: "Open" label_meeting_agenda_close: "Close the agenda to begin the Minutes" label_meeting_date_time: "Date/Time" + label_meeting_date_and_time: "Date and time" label_meeting_diff: "Diff" label_upcoming_meetings: "Upcoming meetings" label_past_meetings: "Past meetings" @@ -128,6 +129,7 @@ en: label_time_zone: "Time zone" label_start_date: "Start date" + meeting: attachments: text: "Attached files are available to all meeting participants. You can also drag and drop these into agenda item notes."