Add profile directory to web UI (#11688)
* Add profile directory to web UI * Add a line of bio to the directory
This commit is contained in:
@ -7,7 +7,6 @@ class DirectoriesController < ApplicationController
|
||||
before_action :require_enabled!
|
||||
before_action :set_instance_presenter
|
||||
before_action :set_tag, only: :show
|
||||
before_action :set_tags
|
||||
before_action :set_accounts
|
||||
|
||||
def index
|
||||
@ -28,13 +27,10 @@ class DirectoriesController < ApplicationController
|
||||
@tag = Tag.discoverable.find_normalized!(params[:id])
|
||||
end
|
||||
|
||||
def set_tags
|
||||
@tags = Tag.discoverable.limit(30).reject { |tag| tag.cached_sample_accounts.empty? }
|
||||
end
|
||||
|
||||
def set_accounts
|
||||
@accounts = Account.discoverable.by_recent_status.page(params[:page]).per(40).tap do |query|
|
||||
@accounts = Account.local.discoverable.by_recent_status.page(params[:page]).per(15).tap do |query|
|
||||
query.merge!(Account.tagged_with(@tag.id)) if @tag
|
||||
query.merge!(Account.not_excluded_by_account(current_account)) if current_account
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user