impress/app/views/pet_states/edit.html.haml
Emi Matchu 217d25edab Handle new colors/species in the Rainbow Pool
Oh right, yeah, we like to do things gracefully around here when
there's no corresponding color/species record yet!

Paying more attention to this, I'm thinking like… it could be a cool
idea to, in modeling, *create* the new color/species record, and just
not have all the attributes filled in yet? Especially now that we're
less dependent on attributes like `standard` to be set for correct
functioning.

But for now, we follow the same strategy we do elsewhere in the app: a
pet type can have `color_id` and `species_id` that don't correspond to
a real record, and we cover over that smoothly.
2024-11-15 19:56:07 -08:00

48 lines
1.3 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
= form_with model: [@pet_type, @pet_state] do |f|
- if @pet_state.errors.any?
%p
Could not save:
%ul.errors
- @pet_state.errors.each do |error|
%li= error.full_message
%dl
%dt Pose
%dd
%ul.pose-options
- pose_options.each do |pose|
%li
%label
= f.radio_button :pose, pose
= pose_name pose
%dt Glitched?
%dd
= f.select :glitched, [["✅ Not marked as Glitched", false],
["👾 Yes, it's bad news bonko'd", true]]
= f.submit "Save"
- content_for :stylesheets do
= stylesheet_link_tag "application/breadcrumbs"
= stylesheet_link_tag "application/outfit-viewer"
= page_stylesheet_link_tag "pet_states/edit"
- content_for :javascripts do
= javascript_include_tag "outfit-viewer"