Add support summary UI to alt styles page
This commit is contained in:
parent
c78c0cb237
commit
77872311e6
2 changed files with 19 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue