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

Merge branch 'dev' into feature/49060-group-agenda-items-with-sections

Jonas Jabarifebb6a2e9c70
diff --cc modules/meeting/app/components/_index.sass
index 30244d389ce,2f17a54aef6..3082e33be43
--- a/modules/meeting/app/components/_index.sass
+++ b/modules/meeting/app/components/_index.sass
@@@ -1,6 -1,3 +1,4 @@@
@import "./meeting_agenda_items/item_component/show_component.sass"
@import "./meeting_agenda_items/form_component.sass"
+@import "./meeting_sections/header_component.sass"
@import "./meetings/sidebar/state_component.sass"
- @import "./meetings/sidebar/participants_component.sass"
- @import "./meetings/sidebar/details_component.sass"
diff --cc modules/meeting/app/components/meeting_agenda_items/item_component/show_component.html.erb
index e81f7b9a857,701053c2626..99062ceb459
--- 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
@@@ -70,11 -71,8 +71,13 @@@
test_selector: 'op-meeting-agenda-actions')
edit_action_item(menu) if @meeting_agenda_item.editable?
add_note_action_item(menu) if @meeting_agenda_item.editable? && @meeting_agenda_item.notes.blank?
+ unless first? && last?
+ menu.with_divider
+ move_actions(menu)
+ end
+ menu.with_divider
+ copy_action_item(menu)
- move_actions(menu)
++ menu.with_divider
delete_action_item(menu)
end
end
diff --cc modules/meeting/app/components/meeting_agenda_items/list_component.html.erb
index 85898cad564,2a378cf8c2f..b38a01d134d
--- a/modules/meeting/app/components/meeting_agenda_items/list_component.html.erb
+++ b/modules/meeting/app/components/meeting_agenda_items/list_component.html.erb
@@@ -1,45 -1,39 +1,43 @@@
<%=
component_wrapper(data: wrapper_data_attributes) do
-- # The borderBox needs to be `position: relative` because of bug #49853
-- # (The action menu items float somewhere on the page as soon as you have to scroll the Box in Firefox)
- render(border_box_container) do |border_box|
- if @meeting.agenda_items.empty? && @form_hidden
- border_box.with_body(
- scheme: :default
- ) do
- render(Primer::Beta::Blankslate.new) do |component|
- component.with_visual_icon(icon: :book)
- component.with_heading(tag: :h2).with_content(t("text_meeting_empty_heading"))
- component.with_description do
- flex_layout do |flex|
- flex.with_row(mb: 2) do
- render(Primer::Beta::Text.new(color: :subtle)) { t("text_meeting_empty_description_1") }
- end
- flex.with_row do
- render(Primer::Beta::Text.new(color: :subtle)) { t("text_meeting_empty_description_2") }
- end
- end
- end
- end
- end
- else
- first_and_last = [@meeting.agenda_items.first, @meeting.agenda_items.last]
+ flex_layout(mb: 3) do |flex|
+ flex.with_row(classes: 'dragula-container', data: { 'allowed-drop-type': 'section' }.merge(drop_target_config) ) do
+ first_and_last = [@meeting.sections.first, @meeting.sections.last]
render(
- MeetingAgendaItems::ItemComponent.with_collection(
- @meeting.agenda_items.with_includes_to_render,
- container: border_box,
+ MeetingSections::ShowComponent.with_collection(
+ @meeting.sections,
first_and_last:
)
)
end
- border_box.with_row(p: 0, border_top: 0, id: insert_target_modifier_id) do
- render(MeetingAgendaItems::NewComponent.new(meeting: @meeting, hidden: @form_hidden, type: @form_type))
+ if @meeting.agenda_items.empty? && @meeting.sections.empty?
+ flex.with_row do
- render(Primer::Beta::BorderBox.new(mt: 1, position: :relative)) do |border_box|
- if @form_hidden
++ render(border_box_container) do |border_box|
++ if @form_hidden
+ border_box.with_body(
+ scheme: :default
+ ) do
+ render(Primer::Beta::Blankslate.new) do |component|
+ component.with_visual_icon(icon: :book)
+ component.with_heading(tag: :h2).with_content(t("text_meeting_empty_heading"))
+ component.with_description do
+ flex_layout do |flex|
+ flex.with_row(mb: 2) do
+ render(Primer::Beta::Text.new(color: :subtle)) { t("text_meeting_empty_description_1") }
+ end
+ flex.with_row do
+ render(Primer::Beta::Text.new(color: :subtle)) { t("text_meeting_empty_description_2") }
+ end
+ end
+ end
+ end
+ end
+ end
+ border_box.with_row(p: 0, border_top: 0) do
+ render(MeetingAgendaItems::NewComponent.new(meeting: @meeting, hidden: @form_hidden, type: @form_type))
+ end
+ end
+ end
end
end
end