Module: AdditionalTagsWikiHelper
- Defined in:
- app/helpers/additional_tags_wiki_helper.rb
Instance Method Summary collapse
- #render_sidebar_tags ⇒ Object
- #render_wiki_index_title(title, project: nil, name: nil, tag: nil) ⇒ Object
- #sidebar_tags ⇒ Object
Instance Method Details
#render_sidebar_tags ⇒ Object
12 13 14 15 16 17 |
# File 'app/helpers/additional_tags_wiki_helper.rb', line 12 def = { link_wiki_tag: true, project: @project } , ** end |
#render_wiki_index_title(title, project: nil, name: nil, tag: nil) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/helpers/additional_tags_wiki_helper.rb', line 19 def render_wiki_index_title(title, project: nil, name: nil, tag: nil) title = l title unless is_a? Symbol if tag.present? tag_object = ActsAsTaggableOn::Tag.new name: tag if project safe_join [l(:label_wiki_index_for_tag), additional_tag_link(tag_object, link: '#')], ' ' else items = [link_to(title, wiki_index_path)] items << safe_join([l(:label_wiki_index_for_tag), additional_tag_link(tag_object, link: '#')], ' ') items end elsif name.present? [link_to(title, wiki_index_path), name] else title end end |
#sidebar_tags ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/helpers/additional_tags_wiki_helper.rb', line 4 def unless @sidebar_tags @sidebar_tags = [] @sidebar_tags = WikiPage. project: @project if AdditionalTags. end @sidebar_tags end |