Compare commits
No commits in common. "77872311e64fb30a903fb367602a3b622f5166df" and "59da1fa04d8a1da7cc18f8db416be580301ac234" have entirely different histories.
77872311e6
...
59da1fa04d
2 changed files with 4 additions and 24 deletions
|
|
@ -15,25 +15,15 @@ class AltStylesController < ApplicationController
|
||||||
@alt_styles.merge!(@color.alt_styles) if @color
|
@alt_styles.merge!(@color.alt_styles) if @color
|
||||||
@alt_styles.merge!(@species.alt_styles) if @species
|
@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|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
@alt_styles = @alt_styles.
|
@alt_styles = @alt_styles.
|
||||||
by_creation_date.order(:color_id, :species_id, :series_name).
|
by_creation_date.order(:color_id, :species_id, :series_name).
|
||||||
paginate(page: params[:page], per_page: 30)
|
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
|
render
|
||||||
}
|
}
|
||||||
format.json {
|
format.json {
|
||||||
|
|
|
||||||
|
|
@ -22,16 +22,6 @@
|
||||||
|
|
||||||
[1]: https://www.neopets.com/mall/stylingstudio/
|
[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,
|
= form_with url: alt_styles_path, method: :get,
|
||||||
class: "rainbow-pool-filters" do |f|
|
class: "rainbow-pool-filters" do |f|
|
||||||
%fieldset
|
%fieldset
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue