artists: make artist pages less shit.
* Group URLs by site. * List most important URLs first and dead URLs last. * Add site icons next to URLs. * Put other names and group name beneath the artist name, instead of beneath the wiki.
This commit is contained in:
@@ -34,7 +34,9 @@ class Artist < ApplicationRecord
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def sorted_urls
|
||||
urls.sort {|a, b| a.priority <=> b.priority}
|
||||
urls.sort_by do |url|
|
||||
[url.is_active? ? 0 : 1, url.priority, url.domain, url.secondary_url? ? 1 : 0, url.url]
|
||||
end
|
||||
end
|
||||
|
||||
def url_array
|
||||
|
||||
Reference in New Issue
Block a user