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

change class name for changing template of closed meeting

bsatarnejadfb4731d289a0
diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb
index 8576682ddef..1a1699f53bd 100644
--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb
+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb
@@ -1,5 +1,5 @@
<%=
- grid_layout((meeting_open? ? 'op-meeting-agenda-item' : 'closed-meeting op-meeting-agenda-item'), tag: :div) do |grid|
+ grid_layout('op-meeting-agenda-item', classes: (meeting_closed? ? 'op-meeting-agenda-item--closed' : ''), tag: :div) do |grid|
if drag_and_drop_enabled?
grid.with_area(:'drag-handle', tag: :div) do
render(Primer::OpenProject::DragHandle.new(classes: 'handle'))
diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb
index 2439735528a..8c546a3f6d9 100644
--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb
+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.rb
@@ -49,8 +49,8 @@ module MeetingAgendaItems
@meeting.open? && User.current.allowed_in_project?(:manage_agendas, @meeting.project)
end
- def meeting_open?
- @meeting.open?
+ def meeting_closed?
end
def edit_action_item(menu)
menu.with_item(label: t("label_edit"),
diff --git a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass
index cac0facf488..2c966791827 100644
--- a/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass
+++ b/modules/meeting/app/components/meeting_agenda_items/item_component/show_component.sass
@@ -26,7 +26,7 @@ $meeting-agenda-item--author-width: 300px
&--content
@include text-shortener
- &.closed-meeting
+ &--closed
grid-template-columns: 20px auto 1fr minmax(auto, $meeting-agenda-item--author-width)
grid-template-areas: "drag-handle content duration author" ". notes notes notes notes"