From e7ce77417f5acb79cc6c7dae6d9f7bb929b5c68b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Pi=C4=8Dman?=
Date: Fri, 5 Dec 2025 09:29:20 +0100
Subject: [PATCH] 'data: { cy:' removed
---
app/views/dmsf/_main.html.erb | 5 ++--
app/views/dmsf/copymove.html.erb | 4 +--
app/views/dmsf/edit.html.erb | 3 +--
app/views/dmsf_context_menus/_file.html.erb | 27 +++++++------------
app/views/dmsf_context_menus/_folder.html.erb | 16 +++--------
app/views/dmsf_context_menus/_main.html.erb | 24 ++++++-----------
.../dmsf_files/_file_new_revision.html.erb | 2 +-
app/views/dmsf_upload/multi_upload.html.erb | 5 ++--
app/views/dmsf_upload/upload_files.html.erb | 1 -
app/views/dmsf_workflows/_main.html.erb | 4 +--
10 files changed, 30 insertions(+), 61 deletions(-)
diff --git a/app/views/dmsf/_main.html.erb b/app/views/dmsf/_main.html.erb
index 4f1fb387..3f095cb2 100644
--- a/app/views/dmsf/_main.html.erb
+++ b/app/views/dmsf/_main.html.erb
@@ -23,12 +23,11 @@
<% unless @locked || @system_folder %>
<% if @file_manipulation_allowed %>
<%= link_to sprite_icon('add', l(:label_document_new)),
- multi_dmsf_upload_path(id: @project, folder_id: @folder), class: 'icon icon-add',
- data: { cy: 'button__new-file--dmsf' } %>
+ multi_dmsf_upload_path(id: @project, folder_id: @folder), class: 'icon icon-add' %>
<% end %>
<% if @folder_manipulation_allowed %>
<%= link_to sprite_icon('add', l(:link_create_folder)), new_dmsf_path(id: @project, parent_id: @folder),
- class: 'icon icon-add', data: { cy: 'button__create-folder--dmsf' } %>
+ class: 'icon icon-add' %>
<% end %>
<% end %>
<%= actions_dropdown do %>
diff --git a/app/views/dmsf/copymove.html.erb b/app/views/dmsf/copymove.html.erb
index 35da3fe1..40ee172c 100644
--- a/app/views/dmsf/copymove.html.erb
+++ b/app/views/dmsf/copymove.html.erb
@@ -46,11 +46,11 @@
- <%= submit_tag l(:button_copy), id: 'copy_button', data: { cy: "button__copy--dmsf" } %>
+ <%= submit_tag l(:button_copy), id: 'copy_button' %>
<%# TODO: Lock and proper permissions %>
<% if User.current.allowed_to?(:folder_manipulation, @project) &&
User.current.allowed_to?(:file_manipulation, @project) %>
- <%= submit_tag l(:button_move), id: 'move_button', data: { cy: "button__move--dmsf" } %>
+ <%= submit_tag l(:button_move), id: 'move_button' %>
<% end %>
<% end %>
diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb
index f822f36a..fee64998 100644
--- a/app/views/dmsf/edit.html.erb
+++ b/app/views/dmsf/edit.html.erb
@@ -120,8 +120,7 @@
<% end %>
- <%= submit_tag create ? l(:button_create) : l(:submit_save), class: 'button-positive',
- data: { cy: "button__submit--dmsf_folder" } %>
+ <%= submit_tag create ? l(:button_create) : l(:submit_save), class: 'button-positive' %>
<% end %>
diff --git a/app/views/dmsf_context_menus/_file.html.erb b/app/views/dmsf_context_menus/_file.html.erb
index dd3a53d7..f0278cad 100644
--- a/app/views/dmsf_context_menus/_file.html.erb
+++ b/app/views/dmsf_context_menus/_file.html.erb
@@ -19,32 +19,28 @@
<%= context_menu_link sprite_icon('edit', l(:button_edit)), dmsf_file_path(id: dmsf_file, back_url: back_url),
- class: 'icon icon-edit', data: { cy: "icon__edit--dmsf_file_#{dmsf_file.id}" },
- disabled: !allowed || (locked && !unlockable) %>
+ class: 'icon icon-edit', disabled: !allowed || (locked && !unlockable) %>
<% unless dmsf_link %>
<%= context_menu_link sprite_icon('copy', "#{l(:button_copy)}/#{l(:button_move)}"),
copymove_entries_path(id: project, folder_id: folder, ids: ["file-#{dmsf_file.id}"],
- back_url: back_url), title: l(:title_copy), class: 'icon icon-copy',
- data: { cy: "icon__copy--dmsf_file_#{dmsf_file.id}" } %>
+ back_url: back_url), title: l(:title_copy), class: 'icon icon-copy' %>
<%= link_to sprite_icon('link', l(:label_link_to)),
new_dmsf_link_path(project_id: dmsf_file.project.id, dmsf_folder_id: dmsf_file.dmsf_folder,
dmsf_file_id: dmsf_file.id, type: 'link_to', back_url: back_url),
- title: l(:title_create_link), class: 'icon dmsf-icon-link',
- data: { cy: "icon__link_to--dmsf_file_#{dmsf_file.id}" } %>
+ title: l(:title_create_link), class: 'icon dmsf-icon-link' %>
<% end %>
<% if locked %>
<%= context_menu_link sprite_icon('unlock', l(:button_unlock)), unlock_dmsf_files_path(id: dmsf_file, back_url: back_url),
- class: 'icon icon-unlock', data: { cy: "icon__unlock--dmsf_file_#{dmsf_file.id}" },
- title: l(:title_locked_by_user, user: dmsf_file.locked_by), disabled: !unlockable %>
+ class: 'icon icon-unlock', title: l(:title_locked_by_user, user: dmsf_file.locked_by), disabled: !unlockable %>
<% else %>
<%= context_menu_link sprite_icon('lock', l(:button_lock)), lock_dmsf_files_path(id: dmsf_file, back_url: back_url),
- class: 'icon icon-lock', data: { cy: "icon__lock--dmsf_file_#{dmsf_file.id}" }, disabled: !allowed %>
+ class: 'icon icon-lock', disabled: !allowed %>
<% end %>
<% if notifications %>
@@ -52,14 +48,11 @@
<% if dmsf_file.notification %>
<%= context_menu_link sprite_icon('email', l(:label_notifications_off)),
notify_deactivate_dmsf_files_path(id: dmsf_file, back_url: back_url),
- class: 'icon icon-email', data: { cy: "icon__email--dmsf_file_#{dmsf_file.id}" },
- disabled: !allowed || locked %>
+ class: 'icon icon-email', disabled: !allowed || locked %>
<% else %>
<%= context_menu_link sprite_icon('email-disabled', l(:label_notifications_on)),
notify_activate_dmsf_files_path(id: dmsf_file, back_url: back_url),
- class: 'icon icon-email-add',
- data: { cy: "icon__email_add--dmsf_file_#{dmsf_file.id}" },
- disabled: !allowed || locked %>
+ class: 'icon icon-email-add', disabled: !allowed || locked %>
<% end %>
<% end %>
@@ -72,15 +65,13 @@
<% filename = dmsf_file.last_revision&.formatted_name(member) %>
<%= context_menu_link sprite_icon('download', l(:button_download)),
static_dmsf_file_path(dmsf_file, filename: filename, download: dmsf_file.last_revision&.id),
- class: 'icon icon-download', data: { cy: "icon__download--dmsf_file_#{dmsf_file.id}" },
- disabled: false %>
+ class: 'icon icon-download', disabled: false %>
<%= context_menu_link sprite_icon('email', l(:field_mail)),
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
email_entries: true, back_url: back_url),
- method: :post, class: 'icon icon-email',
- data: { cy: "icon__email--dmsf_file_#{dmsf_file.id}" }, disabled: !email_allowed %>
+ method: :post, class: 'icon icon-email', disabled: !email_allowed %>
<% if RedmineDmsf.dmsf_webdav? %>
diff --git a/app/views/dmsf_context_menus/_folder.html.erb b/app/views/dmsf_context_menus/_folder.html.erb
index f1effbb3..d770d176 100644
--- a/app/views/dmsf_context_menus/_folder.html.erb
+++ b/app/views/dmsf_context_menus/_folder.html.erb
@@ -21,23 +21,19 @@
<%= context_menu_link sprite_icon('edit', l(:button_edit)),
edit_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, back_url: back_url),
- class: 'icon icon-edit', data: { cy: "icon__edit--dmsf_folder_#{dmsf_folder.id}" },
- disabled: !allowed || locked %>
+ class: 'icon icon-edit', disabled: !allowed || locked %>
<% end %>
<% unless dmsf_link %>
<%= context_menu_link sprite_icon('copy', "#{l(:button_copy)}/#{l(:button_move)}"),
copymove_entries_path(id: project, folder_id: folder, ids: ["folder-#{dmsf_folder.id}"],
- back_url: back_url), class: 'icon icon-copy',
- data: { cy: "icon__copy--dmsf_folder_#{dmsf_folder.id}" },
- disabled: !allowed || locked %>
+ back_url: back_url), class: 'icon icon-copy', disabled: !allowed || locked %>
<%= context_menu_link sprite_icon('link', l(:label_link_to)),
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_folder.id, type: 'link_to',
- back_url: back_url), class: 'icon dmsf-icon-link',
- data: { cy: "icon__link_to--dmsf_folder_#{dmsf_folder.id}" } %>
+ back_url: back_url), class: 'icon dmsf-icon-link' %>
<% end %>
<% unless edit %>
@@ -46,12 +42,10 @@
<%= context_menu_link sprite_icon('unlock', l(:button_unlock)),
unlock_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, back_url: back_url),
title: l(:title_locked_by_user, user: dmsf_folder.locked_by), class: 'icon icon-unlock',
- data: { cy: "icon__unlock--dmsf_folder_#{dmsf_folder.id}" },
disabled: !allowed || !unlockable %>
<% else %>
<%= context_menu_link sprite_icon('lock', l(:button_lock)),
lock_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder, back_url: back_url),
- class: 'icon icon-lock', data: { cy: "icon__lock--dmsf_folder_#{dmsf_folder.id}" },
disabled: !allowed %>
<% end %>
@@ -62,13 +56,11 @@
<%= context_menu_link sprite_icon('email', l(:label_notifications_off)),
notify_deactivate_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder,
back_url: back_url), class: 'icon icon-email',
- data: { cy: "icon__email--dmsf_folder_#{dmsf_folder.id}" },
disabled: !allowed || locked || !dmsf_folder.notification? %>
<% else %>
<%= context_menu_link sprite_icon('email-disabled', l(:label_notifications_on)),
notify_activate_dmsf_path(id: dmsf_folder.project, folder_id: dmsf_folder,
back_url: back_url), class: 'icon icon-email-add',
- data: { cy: "icon__email_add--dmsf_folder_#{dmsf_folder.id}" },
disabled: !allowed || locked || dmsf_folder.notification? %>
<% end %>
@@ -79,7 +71,6 @@
entries_operations_dmsf_path(id: project, folder_id: folder, ids: params[:ids],
download_entries: true, back_url: back_url),
method: :post, class: 'icon icon-download',
- data: { cy: "icon__download--dmsf_folder_#{dmsf_folder.id}" },
id: 'dmsf-cm-download', disabled: false %>
@@ -87,7 +78,6 @@
entries_operations_dmsf_path(id: dmsf_folder.project, folder_id: folder, ids: params[:ids],
email_entries: true, back_url: back_url),
method: :post, class: 'icon icon-email',
- data: { cy: "icon__email--dmsf_folder_#{dmsf_folder.id}" },
disabled: !email_allowed %>
<% end %>
diff --git a/app/views/dmsf_context_menus/_main.html.erb b/app/views/dmsf_context_menus/_main.html.erb
index c1ba311e..3ebe0bb0 100644
--- a/app/views/dmsf_context_menus/_main.html.erb
+++ b/app/views/dmsf_context_menus/_main.html.erb
@@ -22,14 +22,12 @@
<%= link_to sprite_icon('edit', l(:button_edit)),
edit_root_dmsf_path(id: project),
title: l(:link_edit, title: l(:link_documents)),
- class: 'icon icon-edit',
- data: { cy: 'button__edit--dmsf' } %>
+ class: 'icon icon-edit' %>
<% elsif !locked %>
<%= link_to sprite_icon('edit', l(:button_edit)),
edit_dmsf_path(id: project, folder_id: folder, redirect_to_folder_id: folder.id),
title: l(:link_edit, title: h(folder.title)),
- class: 'icon icon-edit',
- data: { cy: 'button__edit--dmsf' } %>
+ class: 'icon icon-edit' %>
<% end %>
<% if folder && (!locked || User.current.allowed_to?(:force_file_unlock, project)) %>
<% if folder.locked? %>
@@ -37,13 +35,11 @@
sprite_icon('unlock', l(:button_unlock)),
unlock_dmsf_path(id: project, folder_id: folder, current: request.url),
title: l(:title_unlock_folder),
- class: 'icon icon-unlock',
- data: { cy: 'button__unlock--dmsf' } %>
+ class: 'icon icon-unlock' %>
<% else %>
<%= link_to sprite_icon('lock', l(:button_lock)),
lock_dmsf_path(id: project, folder_id: folder, current: request.url),
- title: l(:title_lock_folder), class: 'icon icon-lock',
- data: { cy: 'button__lock--dmsf' } %>
+ title: l(:title_lock_folder), class: 'icon icon-lock' %>
<% end %>
<% end %>
<% if notifications && !locked %>
@@ -51,14 +47,12 @@
<%= link_to sprite_icon('email', l(:label_notifications_off)),
notify_deactivate_dmsf_path(id: project, folder_id: folder),
title: l(:title_notifications_active_deactivate),
- class: 'icon icon-email',
- data: { cy: 'button__notifications-off--dmsf' } %>
+ class: 'icon icon-email' %>
<% else %>
<%= link_to sprite_icon('email-disabled', l(:label_notifications_on)),
notify_activate_dmsf_path(id: project, folder_id: folder),
title: l(:title_notifications_not_active_activate),
- class: 'icon icon-email-add',
- data: { cy: 'button__notifications-on--dmsf' } %>
+ class: 'icon icon-email-add' %>
<% end %>
<% end %>
<% if file_manipulation_allowed && !locked %>
@@ -66,8 +60,7 @@
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: folder ? folder.id : folder,
type: 'link_from'),
title: l(:title_create_link),
- class: 'icon dmsf-icon-link',
- data: { cy: 'button__create-link--dmsf' } %>
+ class: 'icon dmsf-icon-link' %>
<% end %>
<% end %>
<%= render partial: 'dmsf_context_menus/watch', locals: { object: folder ? folder : project } %>
@@ -75,8 +68,7 @@
<%= link_to sprite_icon('del', l(:link_trash_bin)),
trash_dmsf_path(project),
title: l(:link_trash_bin),
- class: 'icon icon-del',
- data: { cy: 'button__trash--dmsf' } %>
+ class: 'icon icon-del' %>
<% else %>
<%= sprite_icon('del', l(:link_trash_bin)) %>
diff --git a/app/views/dmsf_files/_file_new_revision.html.erb b/app/views/dmsf_files/_file_new_revision.html.erb
index 92b2f891..45d8e650 100644
--- a/app/views/dmsf_files/_file_new_revision.html.erb
+++ b/app/views/dmsf_files/_file_new_revision.html.erb
@@ -74,7 +74,7 @@
<%= f.text_area :comment, rows: 2, label: l(:label_comment), class: 'wiki-edit dmsf-description' %>
- <%= f.submit l(:button_create), class: 'button-positive', data: { cy: "button__submit--file_dmsf"} %>
+ <%= f.submit l(:button_create), class: 'button-positive' %>
<% end %>
<% end %>
diff --git a/app/views/dmsf_upload/multi_upload.html.erb b/app/views/dmsf_upload/multi_upload.html.erb
index 3161e6c7..18b38f14 100644
--- a/app/views/dmsf_upload/multi_upload.html.erb
+++ b/app/views/dmsf_upload/multi_upload.html.erb
@@ -31,9 +31,8 @@
locals: { multiple: true, container: nil, description: true, awf: false } %>
- <%= submit_tag l(:label_upload), data: { cy: 'button__submit--dmsf-upload--project' }, class: 'button-positive',
+ <%= submit_tag l(:label_upload), class: 'button-positive',
id: "dmsf-upload-button" %>
- <%= submit_tag l(:label_dmsf_upload_commit), data: { cy: 'button__submit--dmsf-upload-commit--project' },
- class: 'button-positive' %>
+ <%= submit_tag l(:label_dmsf_upload_commit), class: 'button-positive' %>
<% end %>
diff --git a/app/views/dmsf_upload/upload_files.html.erb b/app/views/dmsf_upload/upload_files.html.erb
index ac6d6cde..25522171 100644
--- a/app/views/dmsf_upload/upload_files.html.erb
+++ b/app/views/dmsf_upload/upload_files.html.erb
@@ -41,7 +41,6 @@
<% end %>
<%= submit_tag l(:label_dmsf_commit),
- data: { cy: 'button__submit__commit-file--project' },
class: 'button-positive',
onclick: "$('#ajax-indicator').show();" %>
diff --git a/app/views/dmsf_workflows/_main.html.erb b/app/views/dmsf_workflows/_main.html.erb
index 68faf8a6..d84f0787 100644
--- a/app/views/dmsf_workflows/_main.html.erb
+++ b/app/views/dmsf_workflows/_main.html.erb
@@ -23,12 +23,12 @@
<% @path = settings_project_path(@project, tab: 'dmsf_workflow') %>
<%= link_to sprite_icon('add', l(:label_dmsf_workflow_new)), new_dmsf_workflow_path(project_id: @project&.id),
- class: 'icon icon-add', data: { cy: "button__new--dmsf-workflow" } %>
+ class: 'icon icon-add' %>
<% else %>
<%= link_to sprite_icon('add', l(:label_dmsf_workflow_new)), new_dmsf_workflow_path(project_id: @project&.id),
- class: 'icon icon-add', data: { cy: "button__new--dmsf-workflow" } %>
+ class: 'icon icon-add' %>
<%= l(:label_dmsf_workflow_plural) %>
<% end %>