Initial Redmine tooling and local plugin forks

This commit is contained in:
Jason Thistlethwaite
2026-04-24 22:01:18 +00:00
commit 9f682af0eb
683 changed files with 56878 additions and 0 deletions
@@ -0,0 +1,26 @@
module RedmineHelpdesk
module WikiMacros
Redmine::WikiFormatting::Macros.register do
desc "Mail icon Macro"
macro :mail do |obj, args|
"<span class=\"icon icon-email\"/>"
end
desc "Helpdesk send_file macro"
macro :send_file do |obj, args|
return "" unless obj.is_a?(Issue) || obj.is_a?(Journal)
issue = obj.is_a?(Journal) ? obj.issue : obj
return "" unless issue.respond_to?(:customer) || (issue.respond_to?(:customer) && issue.customer.blank?)
args, options = extract_macro_options(args, :parent)
raise 'No or bad arguments.' if args.size < 1
attachment = issue.attachments.where(:filename => args.first).first
link_to_attachment attachment if attachment
end
end
end
end