From 4f52f457d7f494047b6365ef5a11f4ebf3b6d28a Mon Sep 17 00:00:00 2001 From: agnes Date: Sun, 15 Nov 2026 21:44:56 +0000 Subject: [PATCH] Add app/views/works/_work_form_tags.rb --- app/views/works/_work_form_tags.rb | 136 +++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 app/views/works/_work_form_tags.rb diff --git a/app/views/works/_work_form_tags.rb b/app/views/works/_work_form_tags.rb new file mode 100644 index 0000000..4efed79 --- /dev/null +++ b/app/views/works/_work_form_tags.rb @@ -0,0 +1,136 @@ +
+<%= ts('Tags') %> +

<%= ts('Tags') %>

+ +

+<%= ts("Tags are comma separated, %{max} characters per tag. Fandom, relationship, character, and additional tags must not add up to more than %{limit}. Archive warning, category, and rating tags do not count toward this limit.", +limit: ArchiveConfig.USER_DEFINED_TAGS_MAX, +max: ArchiveConfig.TAG_MAX) %> +

+ +
+
+ +<%= link_to_help "rating-help" %> +
+
+<%= collection_select :work, +:rating_string, +Rating.defaults_by_severity, +:name, +:name, +include_blank: include_blank, +selected: include_blank ? nil : +rating_selected(@work) %> +
+ +
+ +<%= link_to_help "warning-help" %> +
+
+
+ +
    +<%= collection_check_boxes( +:work, :archive_warning_strings, +ArchiveWarning.canonical.by_name, +:name, :name, +include_hidden: !include_blank +) do |builder| %> +
  • +<%= builder.check_box %> +<%= builder.label %> +
  • +<% end %> +
+
+
+
+ +<%= link_to_help "fandom-help" %> +
+
+<%= text_field_tag "work[fandom_string]", include_blank ? "" : @work.fandom_string, +autocomplete_options('fandom', +:id => "work_fandom", +:title => ts('fandoms')) %> +

<%= ts('If this is the first work for a fandom, it may not show up in the fandoms page for a day or two.') %>

+
+ +
+ +<%= link_to_help "categories-help" %> +
+
+
+ +
    +<%= collection_check_boxes( +:work, :category_strings, +Category.canonical.by_name.sort, +:name, :name, +include_hidden: !include_blank +) do |builder| %> +
  • +<%= builder.check_box %> +<%= builder.label %> +
  • +<% end %> +
+
+
+ +
+ +<%= link_to_help "relationships-help" %> +
+
+<%= text_field_tag "work[relationship_string]", include_blank ? "" : @work.relationship_string, +autocomplete_options("relationship_in_fandom", +id: "work_relationship", +title: ts('relationships'), +data: { autocomplete_live_params: "fandom=work_fandom" }) %> +
+### ADD THIS PART BEGINNING +
+ +
+
+<%= text_field_tag( +"work[side_pairing_names]", +include_blank ? "" : @work.side_pairing_names, +autocomplete_options( +"relationship_in_fandom", +id: "work_side_pairing", +title: "Side/Background Pairings", +data: { autocomplete_live_params: "fandom=work_fandom" } +) +) %> +
+### ADD THIS PART END + +
+ +<%= link_to_help "characters-help" %> +
+
+<%= text_field_tag "work[character_string]", include_blank ? "" : @work.character_string, +autocomplete_options('character_in_fandom', +id: "work_character", +title: ts('characters'), +data: { autocomplete_live_params: "fandom=work_fandom" }) %> +
+ +
+ +<%= link_to_help "additional-tags-help" %> +
+
+<%= text_field_tag "work[freeform_string]", include_blank ? "" : @work.freeform_string, autocomplete_options('freeform', +:id => "work_freeform", +:title => ts('additional tags')) %> +
+ +
+
\ No newline at end of file