Sigh, the "Valentine Plushie" series is messing with me again! It doesn't follow the previously established pattern of the names being "<series> <color> <species>", because in this case the base color is considered "Valentine". Okay, well! In this change we add `full_name` as an explicit database field, and set the previous full name value as a fallback. (We also extract the generic fallback logic into `ApplicationRecord`, to help us express it more concisely.) We also tweak `adjective_name` to be able to shorten custom `full_name` values, too. That way, in the outfit editor, the Styles options show correct values like "Cherub Plushie" for the "Cherub Plushie Acara". I also make some changes in the outfit editor to better accommodate the longer series names, to try to better handle long words but also to just only use the first word of the series main name anyway. (Currently, all series main names are one word, except "Valentine Plushie" becomes "Valentine".)
41 lines
1.4 KiB
Text
41 lines
1.4 KiB
Text
- title @alt_style.full_name
|
|
- use_responsive_design
|
|
|
|
%ol.breadcrumbs
|
|
%li= link_to "Alt Styles", alt_styles_path
|
|
%li
|
|
= link_to @alt_style.color.human_name,
|
|
alt_styles_path(color: @alt_style.color.human_name)
|
|
%li{"data-relation-to-prev": "sibling"}
|
|
= link_to @alt_style.species.human_name,
|
|
alt_styles_path(species: @alt_style.species.human_name)
|
|
%li= @alt_style.series_name
|
|
|
|
= image_tag @alt_style.preview_image_url, class: "alt-style-preview"
|
|
|
|
= support_form_with model: @alt_style, class: "support-form" do |f|
|
|
= f.errors
|
|
|
|
= f.fields do
|
|
= f.field do
|
|
= f.label :real_series_name, "Series"
|
|
= f.text_field :real_series_name, autofocus: !@alt_style.real_series_name?,
|
|
placeholder: AltStyle.placeholder_name
|
|
|
|
= f.field do
|
|
= f.label :real_series_name, "Full name"
|
|
= f.text_field :real_full_name, placeholder: @alt_style.fallback_full_name
|
|
|
|
= f.field do
|
|
= f.label :thumbnail_url, "Thumbnail"
|
|
= f.thumbnail_input :thumbnail_url
|
|
|
|
= f.actions do
|
|
= f.submit "Save changes"
|
|
= f.go_to_next_field title: "If checked, takes you to the next unlabeled pet style, if any. Useful for labeling in bulk!" do
|
|
= f.go_to_next_check_box "unlabeled-style"
|
|
Then: Go to unlabeled style
|
|
|
|
- content_for :stylesheets do
|
|
= stylesheet_link_tag "application/breadcrumbs", "application/support-form"
|
|
= page_stylesheet_link_tag "alt_styles/edit"
|