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 some elements when printing a meeting

Henriette Dargefc631023cb05
diff --git a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.html b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.html
index a013d994c54..f4950262804 100644
--- a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.html
+++ b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.component.html
@@ -24,7 +24,7 @@
<span
*ngIf="showTimestamp"
- class="op-file-list--item-text"
+ class="op-file-list--item-text hide-when-print"
[textContent]="timestampText"
></span>
diff --git a/frontend/src/app/shared/components/attachments/attachments.component.html b/frontend/src/app/shared/components/attachments/attachments.component.html
index d20b30203f1..3c7dccbb6be 100644
--- a/frontend/src/app/shared/components/attachments/attachments.component.html
+++ b/frontend/src/app/shared/components/attachments/attachments.component.html
@@ -54,7 +54,7 @@
<div
*ngIf="allowUploading && resource.canAddAttachments"
- class="op-file-section--actions"
+ class="op-file-section--actions hide-when-print"
>
<button
*ngIf="!externalUploadButton"
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 99062ceb459..cc78c69a60d 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
@@ -2,7 +2,7 @@
component_wrapper do
grid_layout('op-meeting-agenda-item', tag: :div, id: "item-#{@meeting_agenda_item.id}") do |grid|
if drag_and_drop_enabled?
- grid.with_area(:'drag-handle', tag: :div) do
+ grid.with_area(:'drag-handle', tag: :div, classes: "hide-when-print") do
render(Primer::OpenProject::DragHandle.new(classes: 'handle'))
end
end
@@ -61,7 +61,7 @@
end
end
- grid.with_area(:actions, tag: :div, justify_self: :end) do
+ grid.with_area(:actions, tag: :div, justify_self: :end, classes: "hide-when-print") do
if edit_enabled?
render(Primer::Alpha::ActionMenu.new) do |menu|
menu.with_show_button(icon: "kebab-horizontal",
@@ -72,7 +72,7 @@
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
+ menu.with_divider
move_actions(menu)
end
menu.with_divider
diff --git a/modules/meeting/app/components/meeting_sections/header_component.html.erb b/modules/meeting/app/components/meeting_sections/header_component.html.erb
index 7d768c2d52f..6eeb23ad560 100644
--- a/modules/meeting/app/components/meeting_sections/header_component.html.erb
+++ b/modules/meeting/app/components/meeting_sections/header_component.html.erb
@@ -2,7 +2,7 @@
component_wrapper(class: "op-meeting-section-container", data: wrapper_data_attributes) do
if @state == :show
grid_layout('op-meeting-section', tag: :div) do |grid|
- grid.with_area(:'drag-handle', tag: :div) do
+ grid.with_area(:'drag-handle', tag: :div, classes: "hide-when-print") do
if editable?
render(Primer::OpenProject::DragHandle.new(classes: 'handle'))
end
@@ -19,7 +19,7 @@
end
end
end
- grid.with_area(:actions, tag: :div, justify_self: :end) do
+ grid.with_area(:actions, tag: :div, justify_self: :end, classes: "hide-when-print") do
if editable?
render(Primer::Alpha::ActionMenu.new(data: { test_selector: "meeting-section-action-menu" })) do |menu|
menu.with_show_button(icon: "kebab-horizontal", 'aria-label': t("settings.project_attributes.label_section_actions"), scheme: :invisible)
diff --git a/modules/meeting/app/components/meetings/header_component.html.erb b/modules/meeting/app/components/meetings/header_component.html.erb
index 6815a47b639..df2604d9cce 100644
--- a/modules/meeting/app/components/meetings/header_component.html.erb
+++ b/modules/meeting/app/components/meetings/header_component.html.erb
@@ -14,6 +14,7 @@
header.with_action_menu(menu_arguments: {},
button_arguments: { icon: "kebab-horizontal",
"aria-label": t("label_meeting_actions"),
+ classes: "hide-when-print",
test_selector: 'op-meetings-header-action-trigger'}) do |menu|
menu.with_item(label: t("label_meeting_edit_title"),
href: edit_meeting_path(@meeting),
diff --git a/modules/meeting/app/components/meetings/side_panel/attachments_component.html.erb b/modules/meeting/app/components/meetings/side_panel/attachments_component.html.erb
index 1baa07bc76d..89f275625d9 100644
--- a/modules/meeting/app/components/meetings/side_panel/attachments_component.html.erb
+++ b/modules/meeting/app/components/meetings/side_panel/attachments_component.html.erb
@@ -6,7 +6,8 @@
section.with_counter { @meeting.attachments.count }
section.with_footer_button(
- id: "meetings-add-attachments"
+ id: "meetings-add-attachments",
+ classes: "hide-when-print"
) do |button|
button.with_leading_visual_icon(icon: "op-attachmentadd")
t("js.label_add_attachments")
diff --git a/modules/meeting/app/components/meetings/side_panel/details_component.html.erb b/modules/meeting/app/components/meetings/side_panel/details_component.html.erb
index 7add1558ddf..9cbcc67a853 100644
--- a/modules/meeting/app/components/meetings/side_panel/details_component.html.erb
+++ b/modules/meeting/app/components/meetings/side_panel/details_component.html.erb
@@ -9,6 +9,7 @@
scheme: :invisible,
tag: :a,
href: details_dialog_meeting_path(@meeting),
+ classes: "hide-when-print",
data: { controller: 'async-dialog' },
'aria-label': t(:label_meeting_details_edit),
test_selector: "edit-meeting-details-button",
@@ -97,6 +98,7 @@
underline: false,
tag: :a,
href: participants_dialog_meeting_path(@meeting),
+ classes: "hide-when-print",
data: { controller: 'async-dialog' }
)) do
t("label_meeting_show_all_participants")
diff --git a/modules/meeting/app/components/meetings/side_panel/participants_component.html.erb b/modules/meeting/app/components/meetings/side_panel/participants_component.html.erb
index aadcb0c079e..fccb04fe69a 100644
--- a/modules/meeting/app/components/meetings/side_panel/participants_component.html.erb
+++ b/modules/meeting/app/components/meetings/side_panel/participants_component.html.erb
@@ -11,6 +11,7 @@
scheme: :invisible,
tag: :a,
href: participants_dialog_meeting_path(@meeting),
+ classes: "hide-when-print",
data: { controller: 'async-dialog' },
'aria-label': t("label_meeting_manage_participants"),
test_selector: "manage-participants-button",
@@ -42,6 +43,7 @@
font_weight: :bold,
tag: :a,
href: participants_dialog_meeting_path(@meeting),
+ classes: "hide-when-print",
data: { controller: 'async-dialog' }
)) do |button|
button.with_leading_visual_icon(icon: "person-add")
diff --git a/modules/meeting/app/components/meetings/side_panel/state_component.html.erb b/modules/meeting/app/components/meetings/side_panel/state_component.html.erb
index c64db36c773..f003ef06b8d 100644
--- a/modules/meeting/app/components/meetings/side_panel/state_component.html.erb
+++ b/modules/meeting/app/components/meetings/side_panel/state_component.html.erb
@@ -25,6 +25,7 @@
section.with_footer_button(
tag: :a,
href: change_state_meeting_path(@meeting, state: 'closed'),
+ classes: "hide-when-print",
data: { 'turbo-stream': true, 'turbo-method': 'put' }
) do |button|
button.with_leading_visual_icon(icon: :unlock)
@@ -54,6 +55,7 @@
section.with_footer_button(
tag: :a,
href: change_state_meeting_path(@meeting, state: 'open'),
+ classes: "hide-when-print",
data: { 'turbo-stream': true, 'turbo-method': 'put' }
) do |button|
button.with_leading_visual_icon(icon: :unlock)