diff --git a/app/controllers/alt_styles_controller.rb b/app/controllers/alt_styles_controller.rb index 74cc4853..a6a19b65 100644 --- a/app/controllers/alt_styles_controller.rb +++ b/app/controllers/alt_styles_controller.rb @@ -25,6 +25,15 @@ class AltStylesController < ApplicationController # 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 { diff --git a/app/views/alt_styles/index.html.haml b/app/views/alt_styles/index.html.haml index fc13fab5..f65e676a 100644 --- a/app/views/alt_styles/index.html.haml +++ b/app/views/alt_styles/index.html.haml @@ -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