プロジェクト

全般

プロフィール

« | » 

リビジョン a8ad7e36

高徹 高橋 徹 さんが約6年前に追加

[phase-16](step 1) add termno macro in init.rb

差分を表示:

init.rb
Redmine::Activity.register :glossary_terms
Redmine::WikiFormatting::Macros.register do
desc "create macro which links to glossary term."
macro :termno do |obj, args|
puts "@@@@@@@@@@@@ Macros.register macro block: obj=#{obj.inspect} @@@@@@@@@@@@"
term_id = args.first
term = GlossaryTerm.find(term_id)
link_to term.name, project_glossary_term_path(@project, term)
end
macro :term do |obj, args|
term = GlossaryTerm.find_by(name: args.first)
link_to
end
end

他の形式にエクスポート: Unified diff