2020-08-28 08:56:56 +02:00
|
|
|
<%#-- copyright
|
|
|
|
|
OpenProject is an open source project management software.
|
2024-07-30 13:42:36 +02:00
|
|
|
Copyright (C) the OpenProject GmbH
|
2020-08-28 08:56:56 +02:00
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License version 3.
|
|
|
|
|
|
|
|
|
|
OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
|
|
|
|
Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
|
|
|
Copyright (C) 2010-2013 the ChiliProject Team
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
2021-09-02 21:49:06 +02:00
|
|
|
See COPYRIGHT and LICENSE files for more details.
|
2020-08-28 08:56:56 +02:00
|
|
|
|
|
|
|
|
++#%>
|
2025-02-06 17:24:51 +01:00
|
|
|
<%= component_wrapper(tag: "turbo-frame") do %>
|
2025-06-17 10:29:36 +02:00
|
|
|
<div class="project-list-page--table" data-controller="table-action-menu">
|
2024-07-25 10:17:26 +02:00
|
|
|
<div class="generic-table--flex-container">
|
|
|
|
|
<div class="generic-table--container <%= container_class %>">
|
|
|
|
|
<div class="generic-table--results-container">
|
2026-02-18 07:47:11 +01:00
|
|
|
<%= content_tag :table,
|
|
|
|
|
id: table_id,
|
|
|
|
|
class: "generic-table",
|
|
|
|
|
data: { controller: "table-highlighting" } do %>
|
2024-07-25 10:17:26 +02:00
|
|
|
<colgroup>
|
|
|
|
|
<% columns.each do |column| %>
|
2025-02-06 17:15:13 +01:00
|
|
|
<col <%= "opHighlightCol" unless column.attribute == :hierarchy %>>
|
2024-07-25 10:17:26 +02:00
|
|
|
<% end %>
|
|
|
|
|
<col>
|
|
|
|
|
</colgroup>
|
|
|
|
|
<thead class="-sticky">
|
2024-08-21 09:39:31 -05:00
|
|
|
<tr>
|
|
|
|
|
<% columns.each do |column| %>
|
|
|
|
|
<% if column.attribute == :hierarchy %>
|
|
|
|
|
<th id="project-table--hierarchy-header">
|
|
|
|
|
<div class="generic-table--sort-header-outer generic-table--sort-header-outer_no-highlighting">
|
|
|
|
|
<div class="generic-table--sort-header">
|
|
|
|
|
<%= content_tag :a,
|
2025-02-06 18:00:11 +01:00
|
|
|
helpers.op_icon("icon-hierarchy"),
|
|
|
|
|
href: href_only_when_not_sort_lft,
|
|
|
|
|
class: "spot-link #{deactivate_class_on_lft_sort}",
|
|
|
|
|
data: { "turbo-stream": true },
|
|
|
|
|
title: t(:label_sort_by, value: %("#{t(:label_project_hierarchy)}")) %>
|
2024-08-21 09:39:31 -05:00
|
|
|
</div>
|
2024-07-25 10:17:26 +02:00
|
|
|
</div>
|
2024-08-21 09:39:31 -05:00
|
|
|
</th>
|
|
|
|
|
<% else %>
|
2024-10-18 14:10:49 +02:00
|
|
|
<% if use_quick_action_table_headers? %>
|
2024-12-09 13:38:09 +01:00
|
|
|
<%= quick_action_table_header column, order_options(column, turbo: true) %>
|
2024-10-18 14:10:49 +02:00
|
|
|
<% else %>
|
|
|
|
|
<th>
|
|
|
|
|
<div class="generic-table--sort-header-outer">
|
|
|
|
|
<div class="generic-table--sort-header">
|
|
|
|
|
<span>
|
|
|
|
|
<%= column.caption %>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</th>
|
|
|
|
|
<% end %>
|
2024-08-21 09:39:31 -05:00
|
|
|
<% end %>
|
2024-07-25 10:17:26 +02:00
|
|
|
<% end %>
|
2024-05-21 14:48:56 +02:00
|
|
|
<th>
|
2024-08-21 09:39:31 -05:00
|
|
|
<div class="generic-table--empty-header">
|
2024-05-21 14:48:56 +02:00
|
|
|
</div>
|
|
|
|
|
</th>
|
2024-08-21 09:39:31 -05:00
|
|
|
</tr>
|
2024-07-25 10:17:26 +02:00
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2024-08-21 09:39:31 -05:00
|
|
|
<% if rows.empty? %>
|
|
|
|
|
<tr class="generic-table--empty-row">
|
|
|
|
|
<td colspan="<%= columns.length + 1 %>"><%= empty_row_message %></td>
|
|
|
|
|
</tr>
|
2024-01-29 22:20:06 +01:00
|
|
|
<% end %>
|
2024-08-21 09:39:31 -05:00
|
|
|
<%= render_collection rows %>
|
2024-07-25 10:17:26 +02:00
|
|
|
</tbody>
|
2026-02-18 07:47:11 +01:00
|
|
|
<% end %>
|
2024-07-25 10:17:26 +02:00
|
|
|
<% if inline_create_link && show_inline_create %>
|
|
|
|
|
<div class="wp-inline-create-button">
|
|
|
|
|
<%= inline_create_link %>
|
|
|
|
|
</div>
|
2024-01-29 22:20:06 +01:00
|
|
|
<% end %>
|
2024-07-25 10:17:26 +02:00
|
|
|
</div>
|
2024-01-29 22:20:06 +01:00
|
|
|
</div>
|
2020-09-21 12:58:26 +02:00
|
|
|
</div>
|
2020-08-28 08:56:56 +02:00
|
|
|
</div>
|
2024-07-25 10:17:26 +02:00
|
|
|
<% if paginated? %>
|
2025-07-14 07:20:47 +01:00
|
|
|
<%= helpers.pagination_links_full(model, **pagination_options) %>
|
2024-07-25 10:17:26 +02:00
|
|
|
<% end %>
|
2024-01-29 22:20:06 +01:00
|
|
|
<% end %>
|