change location.
This commit is contained in:
35
app/views/hooks/_view_issues_context_menu_end.html.erb
Normal file
35
app/views/hooks/_view_issues_context_menu_end.html.erb
Normal 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>
|
@@ -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 %>
|
Reference in New Issue
Block a user