2026-03-17 13:59:47 +01:00
|
|
|
<%#-- copyright
|
|
|
|
|
OpenProject is an open source project management software.
|
|
|
|
|
Copyright (C) the OpenProject GmbH
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
See COPYRIGHT and LICENSE files for more details.
|
|
|
|
|
|
|
|
|
|
++#%>
|
|
|
|
|
|
|
|
|
|
<%=
|
|
|
|
|
render(Primer::Beta::BorderBox.new) do |component|
|
|
|
|
|
component.with_header do |header|
|
|
|
|
|
header.with_title(tag: :h2) do
|
|
|
|
|
Type.model_name.human
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
types.each do |type|
|
|
|
|
|
component.with_row(data: { "filter--filter-list-target": "searchItem" }) do
|
2026-03-20 16:36:38 +01:00
|
|
|
flex_layout(align_items: :center, justify_content: :space_between) do |type_row|
|
|
|
|
|
type_row.with_column do
|
2026-03-26 08:58:26 +01:00
|
|
|
link_to type.name, edit_workflow_path(type), class: "text-bold"
|
2026-03-20 16:36:38 +01:00
|
|
|
end
|
|
|
|
|
type_row.with_column do
|
2026-03-26 08:58:26 +01:00
|
|
|
render(Primer::Alpha::ActionMenu.new(test_selector: "op-action-menu")) do |menu|
|
|
|
|
|
menu.with_show_button(
|
|
|
|
|
icon: "kebab-horizontal",
|
|
|
|
|
scheme: :invisible,
|
|
|
|
|
"aria-label": "Actions"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
menu.with_item(label:t("button_edit"),
|
|
|
|
|
tag: :a,
|
|
|
|
|
href: edit_workflow_path(type)) do |item|
|
|
|
|
|
item.with_leading_visual_icon(icon: :pencil)
|
|
|
|
|
end
|
|
|
|
|
menu.with_divider
|
2026-03-31 19:33:59 +02:00
|
|
|
menu.with_item(label: t("button_copy"),
|
2026-03-31 08:21:40 +02:00
|
|
|
content_arguments: { data: { controller: "async-dialog" }},
|
2026-03-26 08:58:26 +01:00
|
|
|
tag: :a,
|
2026-03-31 19:33:59 +02:00
|
|
|
href: new_workflow_copy_path(type)) do |item|
|
2026-03-26 08:58:26 +01:00
|
|
|
item.with_leading_visual_icon(icon: :copy)
|
2026-03-24 14:01:54 +01:00
|
|
|
end
|
2026-03-20 16:36:38 +01:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
2026-03-17 13:59:47 +01:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
if types.empty?
|
|
|
|
|
component.with_row do
|
|
|
|
|
render(Primer::Beta::Blankslate.new(border: false)) do |component|
|
|
|
|
|
component.with_heading(tag: :h2) { I18n.t(:label_nothing_display) }
|
|
|
|
|
component.with_description { I18n.t(:no_results_title_text) }
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
%>
|