Remove "most popular" tab from profile directory, add responsive design (#9539)

* Remove "most popular" tab from profile directory, add responsive design

* Remove unused translations
This commit is contained in:
Eugen Rochko 2018-12-17 03:14:28 +01:00 committed by GitHub
parent 628da11e38
commit 087e118971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 43 additions and 62 deletions

View file

@ -32,22 +32,12 @@ class DirectoriesController < ApplicationController
end
def set_accounts
@accounts = Account.searchable.discoverable.page(params[:page]).per(50).tap do |query|
@accounts = Account.discoverable.page(params[:page]).per(30).tap do |query|
query.merge!(Account.tagged_with(@tag.id)) if @tag
if popular_requested?
query.merge!(Account.popular)
else
query.merge!(Account.by_recent_status)
end
end
end
def set_instance_presenter
@instance_presenter = InstancePresenter.new
end
def popular_requested?
request.path.ends_with?('/popular')
end
end