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

[#52147] not all project tables use quick actions

Tobias Dillmannc06ed0c690d2
diff --git a/app/components/admin/custom_fields/custom_field_projects/table_component.rb b/app/components/admin/custom_fields/custom_field_projects/table_component.rb
index 5eb0f19a4cd..9cded59b611 100644
--- a/app/components/admin/custom_fields/custom_field_projects/table_component.rb
+++ b/app/components/admin/custom_fields/custom_field_projects/table_component.rb
@@ -39,6 +39,10 @@ module Admin
def sortable?
false
end
+
+ def use_quick_action_table_headers?
+ false
+ end
end
end
end
diff --git a/app/components/projects/table_component.html.erb b/app/components/projects/table_component.html.erb
index 59ffb873111..a114faeff84 100644
--- a/app/components/projects/table_component.html.erb
+++ b/app/components/projects/table_component.html.erb
@@ -55,7 +55,19 @@ See COPYRIGHT and LICENSE files for more details.
</div>
</th>
<% else %>
- <%= quick_action_table_header column.attribute, order_options(column, turbo: true) %>
+ <% if use_quick_action_table_headers? %>
+ <%= quick_action_table_header column.attribute, order_options(column, turbo: true) %>
+ <% else %>
+ <th>
+ <div class="generic-table--sort-header-outer">
+ <div class="generic-table--sort-header">
+ <span>
+ <%= column.caption %>
+ </span>
+ </div>
+ </div>
+ </th>
+ <% end %>
<% end %>
<% end %>
<th>
diff --git a/app/components/projects/table_component.rb b/app/components/projects/table_component.rb
index dfd0f4d3fba..19525e2ffc9 100644
--- a/app/components/projects/table_component.rb
+++ b/app/components/projects/table_component.rb
@@ -135,6 +135,10 @@ module Projects
sortable? && query.known_order?(select.attribute)
end
+ def use_quick_action_table_headers?
+ true
+ end
+
def columns
@columns ||= begin
columns = query.selects.reject { |select| select.is_a?(::Queries::Selects::NotExistingSelect) }
diff --git a/modules/storages/app/components/storages/project_storages/projects/table_component.rb b/modules/storages/app/components/storages/project_storages/projects/table_component.rb
index ea1db72e051..bcba0607e1f 100644
--- a/modules/storages/app/components/storages/project_storages/projects/table_component.rb
+++ b/modules/storages/app/components/storages/project_storages/projects/table_component.rb
@@ -46,6 +46,10 @@ module Storages::ProjectStorages::Projects
false
end
+ def use_quick_action_table_headers?
+ false
+ end
+
# Overwritten to avoid loading data that is not needed in this context
def projects(query)
@projects ||= query