Use radio buttons for poses in Rainbow Pool form, instead of dropdown
Just a bit easier to find what you want! especially with the grid layout
This commit is contained in:
parent
d5a901b917
commit
946a6326ac
3 changed files with 48 additions and 7 deletions
25
app/assets/stylesheets/pet_states/edit.sass
Normal file
25
app/assets/stylesheets/pet_states/edit.sass
Normal file
|
@ -0,0 +1,25 @@
|
|||
@import "../partials/clean/constants"
|
||||
|
||||
outfit-viewer
|
||||
margin: 0 auto
|
||||
|
||||
.pose-options
|
||||
list-style-type: none
|
||||
display: grid
|
||||
grid-template-columns: 1fr 1fr 1fr
|
||||
gap: .25em
|
||||
|
||||
label
|
||||
display: flex
|
||||
align-items: center
|
||||
gap: .5em
|
||||
padding: .5em 1em
|
||||
border: 1px solid $soft-border-color
|
||||
border-radius: 1em
|
||||
|
||||
input
|
||||
margin: 0
|
||||
|
||||
&:has(:checked)
|
||||
background: $module-bg-color
|
||||
border-color: $module-border-color
|
|
@ -20,9 +20,17 @@ module PetStatesHelper
|
|||
end
|
||||
end
|
||||
|
||||
POSE_OPTIONS = %w(UNKNOWN HAPPY_FEM HAPPY_MASC SAD_FEM SAD_MASC SICK_FEM
|
||||
SICK_MASC UNCONVERTED)
|
||||
POSE_OPTIONS = %w(HAPPY_FEM SAD_FEM SICK_FEM HAPPY_MASC SAD_MASC SICK_MASC
|
||||
UNCONVERTED UNKNOWN)
|
||||
def pose_options
|
||||
POSE_OPTIONS.map { |p| [pose_name(p), p] }
|
||||
POSE_OPTIONS
|
||||
end
|
||||
|
||||
def useful_pet_state_path(...)
|
||||
if support_staff?
|
||||
edit_pet_type_pet_state_path(...)
|
||||
else
|
||||
pet_type_pet_state_path(...)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,16 +27,24 @@
|
|||
- @pet_state.errors.each do |error|
|
||||
%li= error.full_message
|
||||
%dl
|
||||
%dt= f.label :pose
|
||||
%dd= f.select :pose, pose_options
|
||||
%dt= f.label :glitched, "Glitched?"
|
||||
%dd= f.select :glitched, [["✅ Not marked as Glitched", false],
|
||||
%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"
|
||||
|
|
Loading…
Reference in a new issue