init commit.
This commit is contained in:
10
README.md
Normal file
10
README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# open_explorer
|
||||||
|
|
||||||
|
Redmine插件,一键打开归档地址。
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```
|
||||||
|
cd plugins
|
||||||
|
git clone https://git.licsber.site/ruby/open_explorer
|
||||||
|
```
|
@@ -0,0 +1,8 @@
|
|||||||
|
<% 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 %>
|
8
init.rb
Normal file
8
init.rb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Redmine::Plugin.register :open_explorer do
|
||||||
|
name 'Open Explorer plugin'
|
||||||
|
author 'licsber'
|
||||||
|
description 'Open archive path using explorer.'
|
||||||
|
version '0.0.1'
|
||||||
|
url 'https://git.licsber.site/ruby/open_explorer'
|
||||||
|
author_url 'https://licsber.site'
|
||||||
|
end
|
4
lib/hooks.rb
Normal file
4
lib/hooks.rb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
class Hooks < Redmine::Hook::ViewListener
|
||||||
|
render_on :view_issues_show_description_bottom,
|
||||||
|
:partial => 'hooks/view_issues_show_description_bottom'
|
||||||
|
end
|
Reference in New Issue
Block a user