mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
Enable RTL direction in emails.
This commit is contained in:
@ -32,7 +32,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def html_classes
|
||||
"#{mobile_view? ? 'mobile-view' : 'desktop-view'} #{mobile_device? ? 'mobile-device' : 'not-mobile-device'} #{rtl_view? ? 'rtl' : ''}"
|
||||
"#{mobile_view? ? 'mobile-view' : 'desktop-view'} #{mobile_device? ? 'mobile-device' : 'not-mobile-device'} #{RTL.html_class}"
|
||||
end
|
||||
|
||||
def escape_unicode(javascript)
|
||||
@ -124,21 +124,6 @@ module ApplicationHelper
|
||||
MobileDetection.mobile_device?(request.user_agent)
|
||||
end
|
||||
|
||||
def rtl_view?
|
||||
site_default_rtl? || current_user_rtl?
|
||||
end
|
||||
|
||||
def current_user_rtl?
|
||||
SiteSetting.allow_user_locale && current_user.try(:locale).in?(rtl_locales)
|
||||
end
|
||||
|
||||
def site_default_rtl?
|
||||
!SiteSetting.allow_user_locale && SiteSetting.default_locale.in?(rtl_locales)
|
||||
end
|
||||
|
||||
def rtl_locales
|
||||
%w(he ar)
|
||||
end
|
||||
|
||||
def customization_disabled?
|
||||
controller.class.name.split("::").first == "Admin" || session[:disable_customization]
|
||||
|
Reference in New Issue
Block a user