Support multiple modules with additionals_library_load

This commit is contained in:
Alexander Meindl 2020-06-22 20:48:55 +02:00
parent 7755e10c60
commit 111390d23d

View File

@ -63,9 +63,9 @@ module Additionals
comment_link = link_to(comment_id, issue_url(issue, only_path: only_path, anchor: "note-#{comment_id}")) comment_link = link_to(comment_id, issue_url(issue, only_path: only_path, anchor: "note-#{comment_id}"))
end end
content_tag :div, class: 'issue-macro box' do tag.div class: 'issue-macro box' do
content_tag(:div, safe_join([content, '-', l(:label_comment), comment_link], ' '), class: 'issue-macro-subject') + tag.div(safe_join([content, '-', l(:label_comment), comment_link], ' '), class: 'issue-macro-subject') +
content_tag(:div, textilizable(comment), class: 'issue-macro-comment journal has-notes') tag.div(textilizable(comment), class: 'issue-macro-comment journal has-notes')
end end
end end
@ -134,9 +134,12 @@ module Additionals
rc rc
end end
def additionals_library_load(module_name) def additionals_library_load(module_names)
method = "additionals_load_#{module_name}" s = []
send(method) Array(module_names).each do |module_name|
s << send("additionals_load_#{module_name}")
end
safe_join(s)
end end
def system_uptime def system_uptime