From 16deee94e4744ddaedb703361e92736d73b7dbee Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Fri, 11 Oct 2024 17:48:23 -0700 Subject: [PATCH] Remove now-unused pet state show page --- app/assets/stylesheets/pet_states/show.sass | 5 -- app/controllers/pet_states_controller.rb | 5 +- app/views/pet_states/edit.html.haml | 4 +- app/views/pet_states/show.html.haml | 54 --------------------- config/routes.rb | 2 +- 5 files changed, 3 insertions(+), 67 deletions(-) delete mode 100644 app/assets/stylesheets/pet_states/show.sass delete mode 100644 app/views/pet_states/show.html.haml diff --git a/app/assets/stylesheets/pet_states/show.sass b/app/assets/stylesheets/pet_states/show.sass deleted file mode 100644 index 8e19d73c..00000000 --- a/app/assets/stylesheets/pet_states/show.sass +++ /dev/null @@ -1,5 +0,0 @@ -outfit-viewer - margin: 0 auto - -dt - cursor: help diff --git a/app/controllers/pet_states_controller.rb b/app/controllers/pet_states_controller.rb index 32bead88..d6cc3193 100644 --- a/app/controllers/pet_states_controller.rb +++ b/app/controllers/pet_states_controller.rb @@ -1,9 +1,6 @@ class PetStatesController < ApplicationController before_action :find_pet_state - before_action :support_staff_only, except: [:show] - - def show - end + before_action :support_staff_only def edit end diff --git a/app/views/pet_states/edit.html.haml b/app/views/pet_states/edit.html.haml index 5dc9ccd5..0f2d1b1a 100644 --- a/app/views/pet_states/edit.html.haml +++ b/app/views/pet_states/edit.html.haml @@ -13,9 +13,7 @@ %li = link_to "Appearances", @pet_type %li - = link_to "\##{@pet_state.id}", [@pet_type, @pet_state] - %li - Edit + \##{@pet_state.id} = outfit_viewer pet_state: @pet_state diff --git a/app/views/pet_states/show.html.haml b/app/views/pet_states/show.html.haml deleted file mode 100644 index 8958e3ee..00000000 --- a/app/views/pet_states/show.html.haml +++ /dev/null @@ -1,54 +0,0 @@ -- 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.color.human_name, - pet_types_path(color: @pet_type.color.human_name) - %li{"data-relation-to-prev": "sibling"} - = link_to @pet_type.species.human_name, - pet_types_path(species: @pet_type.species.human_name) - %li - = link_to "Appearances", @pet_type - %li - \##{@pet_state.id} - - if support_staff? - %li{"data-relation-to-prev": "menu"} - = link_to "Edit", edit_pet_type_pet_state_path(@pet_type, @pet_state) - -= outfit_viewer pet_state: @pet_state - -%dl - %dt{title: "Pose usually affects just the eyes and mouth. Neopets " + - "genders these as Male/Female, but I don't like those " + - "terms for like… it's just eyelashes! Sheesh!"} - Pose - %dd - = pose_name @pet_state.pose - - if @pet_state.pose == "UNCONVERTED" - (Retired, replaced by #{link_to "Alt Styles", alt_styles_path}) - - %dt{title: "This is our own internal ID number, nothing to do with " + - "Neopets's official data."} - DTI ID - %dd= @pet_state.id - - %dt{title: "When we notice a form looks wrong, we mark it Glitched, to " + - "tell our systems to prefer other forms for this pose instead."} - Glitched? - %dd - - if @pet_state.glitched? - 👾 Yes, it's bad news bonko'd - - else - ✅ Not marked as Glitched - -- content_for :stylesheets do - = stylesheet_link_tag "application/breadcrumbs" - = stylesheet_link_tag "application/hanger-spinner" - = stylesheet_link_tag "application/outfit-viewer" - = page_stylesheet_link_tag "pet_states/show" - -- content_for :javascripts do - = javascript_include_tag "outfit-viewer", async: true diff --git a/config/routes.rb b/config/routes.rb index 1191a7fe..f1ae1942 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -42,7 +42,7 @@ OpenneoImpressItems::Application.routes.draw do end resources :pet_types, path: 'rainbow-pool', param: "name", only: [:index, :show] do - resources :pet_states, only: [:show, :edit, :update], path: "appearances" + resources :pet_states, only: [:edit, :update], path: "appearances" end # Loading and modeling pets!