diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 5fc0b0a28c1..7f020cbf871 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -24,6 +24,8 @@ class HelpController < ApplicationController tags_fandoms tags_ratings tags_relationships + tags_search_results + tags_search_text tags_warnings works_assignment works_backdating diff --git a/app/views/help/tags_search_results.html.erb b/app/views/help/tags_search_results.html.erb new file mode 100644 index 00000000000..cc643d9a992 --- /dev/null +++ b/app/views/help/tags_search_results.html.erb @@ -0,0 +1,5 @@ +

<%= t(".page_heading") %>

+ +

<%= t(".canonical.description_html", highlighted: tag.span(t(".canonical.highlighted"), class: "canonical")) %>

+

<%= t(".sorting") %>

+

<%= t(".refine") %>

diff --git a/app/views/help/tags_search_text.html.erb b/app/views/help/tags_search_text.html.erb new file mode 100644 index 00000000000..e29182df15f --- /dev/null +++ b/app/views/help/tags_search_text.html.erb @@ -0,0 +1,38 @@ +

<%= t(".page_heading") %>

+ +
+
+ <%= t(".asterisk.title") %> +
+
+ <%= t(".asterisk.description_html", book_query_kbd: tag.kbd(t(".asterisk.book_query_kbd")), book_samp: tag.samp(t(".asterisk.book_samp")), books_samp: tag.samp(t(".asterisk.books_samp")), booking_samp: tag.samp(t(".asterisk.booking_samp"))) %> +
+ +
+ <%= t(".and.title") %> +
+
+ <%= t(".and.description_html", harry_potter_kbd: tag.kbd(t(".and.harry_potter_kbd")), harry_potter_samp: tag.samp(t(".and.harry_potter_samp")), harry_james_potter_samp: tag.samp(t(".and.harry_james_potter_samp")), harry_samp: tag.samp(t(".and.harry_samp"))) %> +
+ +
+ <%= t(".or.title") %> +
+
+ <%= t(".or.description_html", harry_potter_kbd: tag.kbd(t(".or.harry_potter_kbd")), harry_samp: tag.samp(t(".or.harry_samp")), harry_potter_samp: tag.samp(t(".or.harry_potter_samp")), potter_samp: tag.samp(t(".or.potter_samp"))) %> +
+ +
+ <%= t(".double_quote.title") %> +
+
+ <%= t(".double_quote.description_html", harry_lockhart_kbd: tag.kbd(t(".double_quote.harry_lockhart_kbd")), harry_lockhart_samp: tag.samp(t(".double_quote.harry_lockhart_samp")), harry_potter_gilderoy_lockhart_samp: tag.samp(t(".double_quote.harry_potter_gilderoy_lockhart_samp"))) %> +
+ +
+ <%= t(".not.title") %> +
+
+ <%= t(".not.description_html", harry_not_lockhart_kbd: tag.kbd(t(".not.harry_not_lockhart_kbd")), harry_potter_samp: tag.samp(t(".not.harry_potter_samp")), harry_lockhart_samp: tag.samp(t(".not.harry_lockhart_samp")), gilderoy_lockhart_harry_potter_samp: tag.samp(t(".not.gilderoy_lockhart_harry_potter_samp"))) %> +
+
diff --git a/app/views/tags/_search_form.html.erb b/app/views/tags/_search_form.html.erb index 50ce8a1c26d..9be7e8be4c0 100644 --- a/app/views/tags/_search_form.html.erb +++ b/app/views/tags/_search_form.html.erb @@ -3,7 +3,7 @@
<%= f.label :name, t(".tag_name") %> - <%= link_to_help "tag-search-text-help" %> + <%= link_to_help_modal(help_tags_search_text_path, t(".tags_search_text_help_title")) %>
<%= f.text_field :name %> diff --git a/app/views/tags/search.html.erb b/app/views/tags/search.html.erb index b77048d206f..859dc5c64cf 100644 --- a/app/views/tags/search.html.erb +++ b/app/views/tags/search.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'tags/search_form' %> <% if @tags %> -

<%= search_results_found(@tags) %> <%= link_to_help "tag-search-results-help" %>

+

<%= search_results_found(@tags) %> <%= link_to_help_modal(help_tags_search_results_path, t(".tags_search_results_help_title")) %>

Listing Tags

    <% for tag in @tags %> diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 9467cd12ec9..67e7a152f7b 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -1749,6 +1749,49 @@ en: html: "(For more information, see the %{tags_faq_section_link}.)" tags_faq_section: Tags on the Archive FAQ page_heading: Relationships Tags + tags_search_results: + canonical: + description_html: "%{highlighted} tags are canonical." + highlighted: Highlighted + page_heading: Tag Search Results + refine: If there are too many tags, try refining your search, rather than paging through the results. + sorting: Very new tags will be at the top of the list. Otherwise the list is sorted alphabetically by type and then name. + tags_search_text: + and: + description_html: "%{harry_potter_kbd} will find %{harry_potter_samp} and %{harry_james_potter_samp} but not %{harry_samp}." + harry_james_potter_samp: Harry James Potter + harry_potter_kbd: Harry Potter + harry_potter_samp: Harry Potter + harry_samp: Harry + title: 'space: a space acts like AND' + asterisk: + book_query_kbd: book* + book_samp: book + booking_samp: booking + books_samp: books + description_html: "%{book_query_kbd} will find %{book_samp} and %{books_samp} and %{booking_samp}." + title: "*: any characters" + double_quote: + description_html: "%{harry_lockhart_kbd} will find %{harry_lockhart_samp} but not %{harry_potter_gilderoy_lockhart_samp}." + harry_lockhart_kbd: '"Harry Lockhart"' + harry_lockhart_samp: '"Harry Lockhart"' + harry_potter_gilderoy_lockhart_samp: Harry Potter/Gilderoy Lockhart + title: "\": words in exact sequence" + not: + description_html: "%{harry_not_lockhart_kbd} will find %{harry_potter_samp} but not %{harry_lockhart_samp} or %{gilderoy_lockhart_harry_potter_samp}." + gilderoy_lockhart_harry_potter_samp: Gilderoy Lockhart/Harry Potter + harry_lockhart_samp: Harry Lockhart + harry_not_lockhart_kbd: Harry NOT Lockhart + harry_potter_samp: Harry Potter + title: 'NOT: NOT' + or: + description_html: "%{harry_potter_kbd} will find %{harry_samp}, %{harry_potter_samp}, and %{potter_samp}." + harry_potter_kbd: Harry || Potter + harry_potter_samp: Harry Potter + harry_samp: Harry + potter_samp: Potter + title: "||: OR (not exclusive)" + page_heading: Tag Search Text tags_warnings: choose_not_to_use: description: Use this if you don't want to warn for anything. You may also choose this option if you don't know what you should warn for; if you don't like warning for certain topics or warnings in general; if you want to avoid some spoilers, but not others; etc. @@ -3087,6 +3130,8 @@ en: random: These are some random tags used on the Archive. To find more tags, %{search_tags_link}. random_in_collection: These are some random tags used in the collection. search_tags: try our tag search + search: + tags_search_results_help_title: Tag search results help search_form: fandoms: Fandoms fandoms_footnote: Find tags wrangled to specific canonical fandoms. @@ -3103,6 +3148,7 @@ en: synonymous: Synonymous unwrangleable: Unwrangleable tag_name: Tag name + tags_search_text_help_title: Tag search text help type: Type wrangling_status: Wrangling status show: diff --git a/config/routes.rb b/config/routes.rb index 0d145b1826c..98f2bfcf040 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -682,6 +682,8 @@ get "/help/fandom-help.html", to: redirect("/help/tags_fandoms") get "/help/rating-help.html", to: redirect("/help/tags_ratings") get "/help/relationships-help.html", to: redirect("/help/tags_relationships") + get "/help/tag-search-results-help.html", to: redirect("/help/tags_search_results") + get "/help/tag-search-text-help.html", to: redirect("/help/tags_search_text") get "/help/warning-help.html", to: redirect("/help/tags_warnings") get "/help/add-work-to-assignment.html", to: redirect("/help/works_assignment") get "/help/backdating-help.html", to: redirect("/help/works_backdating") diff --git a/public/help/tag-search-results-help.html b/public/help/tag-search-results-help.html deleted file mode 100644 index 62d96119c76..00000000000 --- a/public/help/tag-search-results-help.html +++ /dev/null @@ -1,5 +0,0 @@ -

    Tag Search Results

    - -

    Highlighted tags are canonical.

    -

    Very new tags will be at the top of the list. Otherwise the list is sorted alphabetically by type and then name.

    -

    If there are too many tags, try refining your search, rather than paging through the results.

    diff --git a/public/help/tag-search-text-help.html b/public/help/tag-search-text-help.html deleted file mode 100644 index cbaf324579c..00000000000 --- a/public/help/tag-search-text-help.html +++ /dev/null @@ -1,43 +0,0 @@ -

    Tag Search Text

    - -
    -
    - *: any characters -
    -
    - book* will find book and books and - booking. -
    - -
    - space: a space acts like AND -
    -
    - Harry Potter will find Harry Potter and Harry - James Potter but not Harry. -
    - -
    - ||: OR (not exclusive) -
    -
    - Harry || Potter will find Harry, Harry - Potter, and Potter. -
    - -
    - ": words in exact sequence -
    -
    - "Harry Lockhart" will find "Harry Lockhart" but not - Harry Potter/Gilderoy Lockhart. -
    - -
    - NOT: NOT -
    -
    - Harry NOT Lockhart will find Harry Potter but not - Harry Lockhart or Gilderoy Lockhart/Harry Potter. -
    -