forked from OpenNeo/impress
Better grouping for alt style series names in the filter dropdown
This commit is contained in:
parent
eff7f75a3a
commit
6ced72e10a
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
@import "../partials/clean/constants"
|
||||||
|
|
||||||
|
// Prefer to break the name at certain points.
|
||||||
.rainbow-pool-list
|
.rainbow-pool-list
|
||||||
.name span
|
.name span
|
||||||
display: inline-block
|
display: inline-block
|
||||||
|
|
||||||
|
// De-emphasize Prismatic styles, in browsers that support it.
|
||||||
|
.rainbow-pool-filters
|
||||||
|
select[name="series"]
|
||||||
|
option[value*=": "]
|
||||||
|
color: $soft-text-color
|
||||||
|
font-style: italic
|
||||||
|
|
|
@ -106,7 +106,9 @@ class AltStyle < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.all_series_names
|
def self.all_series_names
|
||||||
distinct.where.not(series_name: nil).pluck(:series_name).sort
|
# Sort by the part *after* the colon, then before (if any).
|
||||||
|
distinct.where.not(series_name: nil).pluck(:series_name).
|
||||||
|
sort_by { |series_name| series_name.split(': ', 2).reverse }
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.all_supported_colors
|
def self.all_supported_colors
|
||||||
|
|
Loading…
Reference in a new issue