forked from OpenNeo/impress
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
|
||||
width: 60%
|
||||
table-layout: auto
|
||||
margin-bottom: 2em
|
||||
|
||||
td, th
|
||||
border-top: 1px solid $soft-border-color
|
||||
|
|
|
@ -126,6 +126,8 @@ class ItemsController < ApplicationController
|
|||
@other_nc_items = @items.select(&:nc?).reject(&:currently_in_mall?)
|
||||
@np_items = @items.select(&:np?)
|
||||
@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"
|
||||
end
|
||||
|
|
|
@ -60,25 +60,27 @@
|
|||
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
|
||||
"cross-paint" outfits.
|
||||
%table.item-list
|
||||
%thead
|
||||
%td
|
||||
%th{colspan: 2}
|
||||
Total: #{pluralize @pb_items.size, "item"}
|
||||
%tbody
|
||||
- @pb_items.each do |item|
|
||||
= render "item_list_row", item: do
|
||||
- if item.pb_item_name.present?
|
||||
- @pb_items_by_color.each do |color, items|
|
||||
%table.item-list
|
||||
%thead
|
||||
%td
|
||||
%th
|
||||
#{color.pb_item_name || color.name.humanize}
|
||||
(#{pluralize items.size, "item"})
|
||||
%td.actions-cell
|
||||
- if color.pb_item_name.present?
|
||||
= 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
|
||||
= 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
|
||||
- else
|
||||
.special-color-explanation
|
||||
No Paint Brush for this color. Get via Lab
|
||||
Ray, morphing potions, etc.
|
||||
Get via Lab Ray, morphing potions, etc.
|
||||
%tbody
|
||||
- items.each do |item|
|
||||
= render "item_list_row", item:
|
||||
|
||||
- if @other_nc_items.present?
|
||||
%h2 Neocash items (Capsules, Dyeworks, events, retired, etc.)
|
||||
|
|
Loading…
Reference in a new issue