artists: reorganize index page.

* Make other names searchable.
* Add post count and update timestamp.
* Add edit / delete / undelete links.
This commit is contained in:
evazion
2019-11-04 16:45:19 -06:00
parent 75ca53a9a1
commit 90fef76121
4 changed files with 54 additions and 16 deletions

View File

@@ -38,6 +38,8 @@ class ArtistsController < ApplicationController
def index
@artists = Artist.includes(:urls).paginated_search(params)
@artists = @artists.includes(:tag) if request.format.html?
@artists = @artists.includes(:urls) if !request.format.html?
if params[:redirect].to_s.truthy? && @artists.one? && @artists.first.name == Artist.normalize_name(params[:search][:any_name_or_url_matches])
redirect_to @artists.first