Group PB items by color in Item Getting Guide
Ohh yeah, this helps communicate the process much better, especially for what the Shops/Trades links mean. I think I'm gonna also go get the paint brush thumbnail images and add them to the database too, to help better communicate that this is a paint brush item situation.
This commit is contained in:
parent
a8648fc9c1
commit
1a76923ce6
3 changed files with 18 additions and 13 deletions
|
@ -6,6 +6,7 @@
|
||||||
border: 1px solid $soft-border-color
|
border: 1px solid $soft-border-color
|
||||||
width: 60%
|
width: 60%
|
||||||
table-layout: auto
|
table-layout: auto
|
||||||
|
margin-bottom: 2em
|
||||||
|
|
||||||
td, th
|
td, th
|
||||||
border-top: 1px solid $soft-border-color
|
border-top: 1px solid $soft-border-color
|
||||||
|
|
|
@ -126,6 +126,8 @@ class ItemsController < ApplicationController
|
||||||
@other_nc_items = @items.select(&:nc?).reject(&:currently_in_mall?)
|
@other_nc_items = @items.select(&:nc?).reject(&:currently_in_mall?)
|
||||||
@np_items = @items.select(&:np?)
|
@np_items = @items.select(&:np?)
|
||||||
@pb_items = @items.select(&:pb?)
|
@pb_items = @items.select(&:pb?)
|
||||||
|
@pb_items_by_color = @pb_items.group_by(&:pb_color).
|
||||||
|
sort_by { |color, items| color.name }.to_h
|
||||||
|
|
||||||
render layout: "application"
|
render layout: "application"
|
||||||
end
|
end
|
||||||
|
|
|
@ -60,25 +60,27 @@
|
||||||
these items will be semi-permanently added to your Closet, even if your
|
these items will be semi-permanently added to your Closet, even if your
|
||||||
pet changes color again! You can use this to mix-and-match styles for
|
pet changes color again! You can use this to mix-and-match styles for
|
||||||
"cross-paint" outfits.
|
"cross-paint" outfits.
|
||||||
|
- @pb_items_by_color.each do |color, items|
|
||||||
%table.item-list
|
%table.item-list
|
||||||
%thead
|
%thead
|
||||||
%td
|
%td
|
||||||
%th{colspan: 2}
|
%th
|
||||||
Total: #{pluralize @pb_items.size, "item"}
|
#{color.pb_item_name || color.name.humanize}
|
||||||
%tbody
|
(#{pluralize items.size, "item"})
|
||||||
- @pb_items.each do |item|
|
%td.actions-cell
|
||||||
= render "item_list_row", item: do
|
- if color.pb_item_name.present?
|
||||||
- if item.pb_item_name.present?
|
|
||||||
= button_link_to "Shops",
|
= button_link_to "Shops",
|
||||||
shop_wizard_url_for(item.pb_item_name),
|
shop_wizard_url_for(color.pb_item_name),
|
||||||
target: "_blank", icon: search_icon
|
target: "_blank", icon: search_icon
|
||||||
= button_link_to "Trades",
|
= button_link_to "Trades",
|
||||||
trading_post_url_for(item.pb_item_name),
|
trading_post_url_for(color.pb_item_name),
|
||||||
target: "_blank", icon: search_icon
|
target: "_blank", icon: search_icon
|
||||||
- else
|
- else
|
||||||
.special-color-explanation
|
.special-color-explanation
|
||||||
No Paint Brush for this color. Get via Lab
|
Get via Lab Ray, morphing potions, etc.
|
||||||
Ray, morphing potions, etc.
|
%tbody
|
||||||
|
- items.each do |item|
|
||||||
|
= render "item_list_row", item:
|
||||||
|
|
||||||
- if @other_nc_items.present?
|
- if @other_nc_items.present?
|
||||||
%h2 Neocash items (Capsules, Dyeworks, events, retired, etc.)
|
%h2 Neocash items (Capsules, Dyeworks, events, retired, etc.)
|
||||||
|
|
Loading…
Reference in a new issue