From f49f9f386dfe56e569a9fb53608d0910b5e267d3 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Wed, 20 Nov 2024 12:13:33 -0800 Subject: [PATCH] Add item editing fields to manually override an item to be an NC item --- app/controllers/items_controller.rb | 3 ++- app/views/items/edit.html.haml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index 9689d3d8..3be03eac 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -182,7 +182,8 @@ class ItemsController < ApplicationController def item_params params.require(:item).permit( - :name, :thumbnail_url, :description, :modeling_status_hint + :name, :thumbnail_url, :description, :modeling_status_hint, + :is_manually_nc ).tap do |p| p[:modeling_status_hint] = nil if p[:modeling_status_hint] == "" end diff --git a/app/views/items/edit.html.haml b/app/views/items/edit.html.haml index 2220876b..b7149f82 100644 --- a/app/views/items/edit.html.haml +++ b/app/views/items/edit.html.haml @@ -25,6 +25,14 @@ = f.url_field :thumbnail_url = f.label :description = f.text_field :description + .field-name Item kind + .radio-field + %label{title: "NC items generally have a rarity value of 500.\nPaintbrush items generally contain a special message in the description."} + = f.radio_button :is_manually_nc, false + Automatic: Based on rarity and description + %label{title: "Use this when Neopets releases an NC item, but labels the rarity as something other than 500, usually by mistake."} + = f.radio_button :is_manually_nc, true + Manually NC: From the NC Mall, but not r500 .field-name Modeling status .radio-field %label{title: "If we fit two or more species of a standard color, assume we also fit the other standard-color pets that were released at the time.\nRepeat for special colors like Baby and Maraquan."}