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

Corrections for: - https://community.openproject.com/projects/openproject/work_packages/31284/activity

Nicolas Salguero9739cd6d166b
diff --git a/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.sass b/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.sass
index 69d97caba61..425a3b6866e 100644
--- a/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.sass
+++ b/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.sass
@@ -3,8 +3,8 @@
.preview-modal--container
position: absolute
z-index: 5000
- min-width: 200px
- max-width: 400px
+ min-width: 400px
+ max-width: 600px
min-height: 100px
max-height: 300px
background: white
diff --git a/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb b/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb
index 63b349a8f03..a887b78a05e 100644
--- a/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb
+++ b/lib/open_project/text_formatting/matchers/link_handlers/work_packages.rb
@@ -56,9 +56,20 @@ module OpenProject::TextFormatting::Matchers
private
def render_work_package_link(wp_id)
+ wp_class = 'issue work_package preview-trigger'
+ wp = find_work_package(wp_id)
+ if !wp.nil? && wp.closed?
+ wp_class += ' closed'
+ end
link_to("##{wp_id}",
work_package_path_or_url(id: wp_id, only_path: context[:only_path]),
- class: 'issue work_package preview-trigger')
+ class: wp_class)
+ end
+
+ def find_work_package(wp_id)
+ WorkPackage
+ .visible
+ .find_by(id: wp_id)
end
end
end