Commiting
This commit is contained in:
@@ -19,28 +19,8 @@ module ApplicationHelper
|
||||
!user_signed_in? && !single_user_mode?
|
||||
end
|
||||
|
||||
def open_registrations?
|
||||
Setting.registrations_mode == 'open'
|
||||
end
|
||||
|
||||
def approved_registrations?
|
||||
Setting.registrations_mode == 'approved'
|
||||
end
|
||||
|
||||
def closed_registrations?
|
||||
Setting.registrations_mode == 'none'
|
||||
end
|
||||
|
||||
def available_sign_up_path
|
||||
if closed_registrations?
|
||||
'https://gab.com/hosting#getting-started'
|
||||
else
|
||||
new_user_registration_path
|
||||
end
|
||||
end
|
||||
|
||||
def open_deletion?
|
||||
Setting.open_deletion
|
||||
new_user_registration_path
|
||||
end
|
||||
|
||||
def locale_direction
|
||||
|
||||
@@ -65,13 +65,4 @@ module HomeHelper
|
||||
end
|
||||
end
|
||||
|
||||
def sign_up_message
|
||||
if closed_registrations?
|
||||
t('auth.registration_closed', instance: site_hostname)
|
||||
elsif open_registrations?
|
||||
t('auth.register')
|
||||
elsif approved_registrations?
|
||||
t('auth.apply_for_account')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module StreamEntriesHelper
|
||||
module StatusesHelper
|
||||
EMBEDDED_CONTROLLER = 'statuses'
|
||||
EMBEDDED_ACTION = 'embed'
|
||||
|
||||
@@ -41,16 +41,6 @@ module StreamEntriesHelper
|
||||
def account_badge(account, all: false)
|
||||
if account.bot?
|
||||
content_tag(:div, content_tag(:div, t('accounts.roles.bot'), class: 'account-role bot'), class: 'roles')
|
||||
elsif (Setting.show_staff_badge && account.user_staff?) || all
|
||||
content_tag(:div, class: 'roles') do
|
||||
if all && !account.user_staff?
|
||||
content_tag(:div, t('admin.accounts.roles.user'), class: 'account-role')
|
||||
elsif account.user_admin?
|
||||
content_tag(:div, t('accounts.roles.admin'), class: 'account-role admin')
|
||||
elsif account.user_moderator?
|
||||
content_tag(:div, t('accounts.roles.moderator'), class: 'account-role moderator')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user