impress/app/views/pet_states/edit.html.haml
Emi Matchu b656ccd982 Add bulk labeling mode for pet appearances
We copy the same feature from alt styles, now that the UI is shared via
support form helpers! Easy peasy!

This adds a "Then: Go to unlabeled appearance" checkbox next to the
submit button on the pet appearance edit form. If checked, it takes you
to the first unlabeled appearance in the database, and keeps the box
checked for next time. Slam through 'em!
2024-12-01 10:10:33 -08:00

48 lines
1.5 KiB
Text

- title "#{@pet_type.human_name}: #{pose_name @pet_state.pose}"
- use_responsive_design
%ol.breadcrumbs
%li
= link_to "Rainbow Pool", pet_types_path
%li
= link_to @pet_type.possibly_new_color.human_name,
pet_types_path(color: @pet_type.possibly_new_color.human_name)
%li{"data-relation-to-prev": "sibling"}
= link_to @pet_type.possibly_new_species.human_name,
pet_types_path(species: @pet_type.possibly_new_species.human_name)
%li
= link_to "Appearances", @pet_type
%li
\##{@pet_state.id}
= outfit_viewer pet_state: @pet_state
= support_form_with model: [@pet_type, @pet_state] do |f|
= f.errors
= f.fields do
= f.radio_grid_fieldset "Pose" do
- pose_options.each do |pose|
= f.radio_field do
= f.radio_button :pose, pose
= pose_name(pose)
= f.field do
= f.label :glitched, "Gliched?"
= f.select :glitched, [["✅ Not marked as Glitched", false],
["👾 Yes, it's bad news bonko'd", true]]
= f.actions do
= f.submit "Save changes"
= f.go_to_next_field title: "If checked, takes you to the first unlabeled appearance in the database, if any. Useful for labeling in bulk!" do
= f.go_to_next_check_box "unlabeled-appearance"
Then: Go to unlabeled appearance
- content_for :stylesheets do
= stylesheet_link_tag "application/breadcrumbs"
= stylesheet_link_tag "application/outfit-viewer"
= stylesheet_link_tag "application/support-form"
= page_stylesheet_link_tag "pet_states/edit"
- content_for :javascripts do
= javascript_include_tag "outfit-viewer"