Files
additionals/lib/additionals/wiki_macros/last_updated_by_macro.rb
Alexander Meindl cc26243a64 More code cleanups
2020-08-09 10:11:52 +02:00

19 lines
508 B
Ruby

# Last_updated_by wiki macros
module Additionals
module WikiMacros
Redmine::WikiFormatting::Macros.register do
desc <<-DESCRIPTION
Displays a user who updated the page.
{{last_updated_by}}
DESCRIPTION
macro :last_updated_by do |obj, args|
raise 'The correct usage is {{last_updated_by}}' unless args.empty?
tag.span safe_join([avatar(obj.author, size: 14), ' ', link_to_user(obj.author)]),
class: 'last-updated-by'
end
end
end
end