Revert "Enable RTL direction in emails."

This commit is contained in:
Robin Ward
2014-08-06 15:30:07 -04:00
parent 417d287813
commit 6783565d8f
5 changed files with 18 additions and 27 deletions

View File

@@ -32,7 +32,7 @@ module ApplicationHelper
end
def html_classes
"#{mobile_view? ? 'mobile-view' : 'desktop-view'} #{mobile_device? ? 'mobile-device' : 'not-mobile-device'} #{RTL.html_class}"
"#{mobile_view? ? 'mobile-view' : 'desktop-view'} #{mobile_device? ? 'mobile-device' : 'not-mobile-device'} #{rtl_view? ? 'rtl' : ''}"
end
def escape_unicode(javascript)
@@ -124,6 +124,21 @@ 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]