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

hide item actions when meeting is closed

bsatarnejad2c9f21beaef6
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 87e7ddaf1af..ba50197dcb0 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('op-meeting-agenda-item', tag: :div) do |grid|
+ grid_layout((meeting_open? ? 'op-meeting-agenda-item' : 'closed-meeting op-meeting-agenda-item'), 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 eae7805f24e..d3d56d7d50f 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,6 +49,9 @@ module MeetingAgendaItems
@meeting.open? && User.current.allowed_in_project?(:manage_agendas, @meeting.project)
end
+ def meeting_open?
+ @meeting.open?
+ end
def edit_action_item(menu)
menu.with_item(label: t("label_edit"),
href: edit_meeting_agenda_item_path(@meeting_agenda_item.meeting, @meeting_agenda_item),
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 f4faaccd5f3..cac0facf488 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,6 +26,10 @@ $meeting-agenda-item--author-width: 300px
&--content
@include text-shortener
+ &.closed-meeting
+ 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"
+
@media screen and (max-width: $breakpoint-lg)
grid-template-columns: 20px auto 1fr 50px
grid-template-areas: "drag-handle content content actions" ". author author duration" ". notes notes notes"