Skip to content

Commit

Permalink
add hook to control tags on wiki show
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermeindl committed Jul 31, 2024
1 parent fd4985b commit 4a8f67c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions app/helpers/additional_tags_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,12 @@ def issue_tag_status_filter(operator: nil, open_issues_only: false)
end
end

def show_wiki_tags_on_show?
AdditionalTags.setting? :active_wiki_tags
def wiki_tags_on_show?
options = { enabled: AdditionalTags.setting?(:active_wiki_tags) }

call_hook :helper_wiki_tags_on_show, options: options

options[:enabled]
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/views/wiki/_tags_show.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- if show_wiki_tags_on_show?
- if wiki_tags_on_show?
.wiki-attributes
= render 'additional_tags/tag_list',
entry: page,
Expand Down

0 comments on commit 4a8f67c

Please sign in to comment.