Compare commits

...

2 commits

2 changed files with 24 additions and 4 deletions

View file

@ -15,15 +15,25 @@ class AltStylesController < ApplicationController
@alt_styles.merge!(@color.alt_styles) if @color
@alt_styles.merge!(@species.alt_styles) if @species
# We're using the HTML5 image for our preview, so make sure we have all the
# manifests ready!
SwfAsset.preload_manifests @alt_styles.map(&:swf_assets).flatten
respond_to do |format|
format.html {
@alt_styles = @alt_styles.
by_creation_date.order(:color_id, :species_id, :series_name).
paginate(page: params[:page], per_page: 30)
# We're using the HTML5 image for our preview, so make sure we have all the
# manifests ready!
SwfAsset.preload_manifests @alt_styles.map(&:swf_assets).flatten
if support_staff?
@counts = {
total: AltStyle.count,
unlabeled: AltStyle.unlabeled.count,
}
@counts[:labeled] = @counts[:total] - @counts[:unlabeled]
@unlabeled_style = AltStyle.unlabeled.newest.first
end
render
}
format.json {

View file

@ -22,6 +22,16 @@
[1]: https://www.neopets.com/mall/stylingstudio/
- if support_staff?
%p
%strong 💡 Support summary:
✅ #{number_with_delimiter @counts[:labeled]} labeled
- if @unlabeled_style
+ ❓️
= link_to "#{number_with_delimiter @counts[:unlabeled]} unlabeled",
edit_alt_style_path(@unlabeled_style, next: "unlabeled-style")
\= #{number_with_delimiter @counts[:total]} total
= form_with url: alt_styles_path, method: :get,
class: "rainbow-pool-filters" do |f|
%fieldset