change location.

This commit is contained in:
2025-08-23 11:22:54 +08:00
parent 3c4e315c9f
commit a0d7f427c9
5 changed files with 45 additions and 12 deletions

View File

@@ -4,7 +4,13 @@ Redmine插件一键打开归档地址。
## Install ## Install
``` ```bash
cd plugins cd plugins
git clone https://git.licsber.site/ruby/open_explorer git clone https://git.licsber.site/ruby/open_explorer
``` ```
## ChangeLog
```
250823周六0.0.2)位置改为上下文菜单之下
```

View File

@@ -0,0 +1,35 @@
<% issue = @issue %>
<%
archive_custom_field = issue.custom_field_values.find do |cfv|
cfv.custom_field.name == "归档地址"
end
%>
<% if archive_custom_field && archive_custom_field.value.present? %>
<% archive_url = archive_custom_field.value.strip %>
<a href="<%= archive_url %>"
target="_blank"
class="icon icon-attachment archive-button">
📂 一键打开归档地址
</a>
<% end %>
<style>
.archive-button {
font-weight: bold;
padding: 5px 10px;
background: #428bca;
color: white;
text-decoration: none;
border-radius: 3px;
display: inline-block;
transition: background-color 0.3s ease;
}
.archive-button:hover {
background-color: #3071a9;
text-decoration: none;
color: white;
}
</style>

View File

@@ -1,8 +0,0 @@
<% issue = @issue %>
<% archive_custom_field = issue.custom_field_values.find { |cfv| cfv.custom_field.name == "归档地址" } %>
<% if archive_custom_field && archive_custom_field.value.present? %>
<% archive_url = archive_custom_field.value.strip %>
<a href="<%= archive_url %>" target="_blank" class="icon icon-attachment" style="font-weight: bold; padding: 5px 10px; background: #428bca; color: white; text-decoration: none; border-radius: 3px;">📂 一键打开归档地址</a>
<% end %>

View File

@@ -2,7 +2,7 @@ Redmine::Plugin.register :open_explorer do
name 'Open Explorer plugin' name 'Open Explorer plugin'
author 'licsber' author 'licsber'
description 'Open archive path using explorer.' description 'Open archive path using explorer.'
version '0.0.1' version '0.0.2'
url 'https://git.licsber.site/ruby/open_explorer' url 'https://git.licsber.site/ruby/open_explorer'
author_url 'https://licsber.site' author_url 'https://licsber.site'
end end

View File

@@ -1,4 +1,4 @@
class Hooks < Redmine::Hook::ViewListener class Hooks < Redmine::Hook::ViewListener
render_on :view_issues_show_description_bottom, render_on :view_issues_context_menu_end,
:partial => 'hooks/view_issues_show_description_bottom' :partial => 'hooks/view_issues_context_menu_end'
end end