diff --git a/app/controllers/related_tags_controller.rb b/app/controllers/related_tags_controller.rb index e90a6d215..16cf5dea6 100644 --- a/app/controllers/related_tags_controller.rb +++ b/app/controllers/related_tags_controller.rb @@ -1,5 +1,6 @@ class RelatedTagsController < ApplicationController respond_to :json + respond_to :html, :only=>[:show] before_filter :require_reportbooru_key, only: [:update] def show diff --git a/app/logical/related_tag_query.rb b/app/logical/related_tag_query.rb index e2eb55007..8c387efc0 100644 --- a/app/logical/related_tag_query.rb +++ b/app/logical/related_tag_query.rb @@ -26,6 +26,10 @@ class RelatedTagQuery results end + def tags_for_html + map_with_category_data(tags) + end + def to_json {:query => query, :category => category, :tags => map_with_category_data(tags), :wiki_page_tags => map_with_category_data(wiki_page_tags)}.to_json end diff --git a/app/views/related_tags/show.html.erb b/app/views/related_tags/show.html.erb new file mode 100644 index 000000000..e5fcfe388 --- /dev/null +++ b/app/views/related_tags/show.html.erb @@ -0,0 +1,37 @@ +
| Name | +
|---|
| + <%= link_to("?", show_or_new_wiki_pages_path(:title => tag)) %> + <%= link_to(tag, posts_path(:tags => tag)) %> + | +