-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Description
additionnals plugin v4.3.0 (redmine 6.1+) supress clipboardjs functionnality - https://github.com/alphanodes/additionals/blob/stable/CHANGELOG.md
this breaks
- render_clipboard_button in app/presenters/repository_presenter.rb
- app/views/common/_git_urls.html.slim (
additionals_library_load :clipboardjsfails) - app/views/repository_mirrors/index.html.slim (
clipboardjs_button_for 'mirror_pubkey')
To get it work with additionals 4.3.0 (loosing some copy-paste buttons) I did:
--- a/app/presenters/repository_presenter.rb
+++ b/app/presenters/repository_presenter.rb
@@ -22,8 +22,7 @@ class RepositoryPresenter < SimpleDelegator
tag.div class: 'git_url_box', id: urls_container_id do
render_git_urls +
render_git_url_text +
- render_permissions +
- render_clipboard_button
+ render_permissions
end
end
@@ -53,10 +52,6 @@ class RepositoryPresenter < SimpleDelegator
tag.div tag.span('', id: permissions_container_id), class: 'git_url_permissions'
end
- def render_clipboard_button
- clipboardjs_button_for url_text_container_id
- end
-
def committer_label(value)
RedminePluginKit.true?(value[:committer]) ? l(:label_read_write_permission) : l(:label_read_only_permission)
end
diff --git a/app/views/common/_git_urls.html.slim b/app/views/common/_git_urls.html.slim
index 77f15320..208ff299 100644
--- a/app/views/common/_git_urls.html.slim
+++ b/app/views/common/_git_urls.html.slim
@@ -1,5 +1,4 @@
- content_for :header_tags do
- = additionals_library_load :clipboardjs
= stylesheet_link_tag 'git_urls', plugin: 'redmine_git_hosting'
= javascript_include_tag 'git_urls', plugin: 'redmine_git_hosting'
diff --git a/app/views/repository_mirrors/index.html.slim b/app/views/repository_mirrors/index.html.slim
index f16046ea..0ab782d3 100644
--- a/app/views/repository_mirrors/index.html.slim
+++ b/app/views/repository_mirrors/index.html.slim
@@ -53,7 +53,7 @@ div
div style='margin: 2px 3px; width: 99%;'
div
- = clipboardjs_button_for 'mirror_pubkey'
+ = 'mirror_pubkey'
span style='margin-left: 10px;'
= l :label_mirror_help
@@ -62,6 +62,6 @@ div
.git_hosting_spacer
textarea#mirror_pubkey readonly='readonly' style='height: 100px; width: 99%; font-family: sans-serif;'
- = RedmineGitHosting::Config.mirroring_public_key
+ = render_text_with_clipboard RedmineGitHosting::Config.mirroring_public_key
.git_hosting_spacerReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels