|
|
@ -22,10 +22,18 @@ module ApplicationHelper |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def add_rtl_body_class(other_classes) |
|
|
|
def add_rtl_body_class(other_classes) |
|
|
|
other_classes = "#{other_classes} rtl" if [:ar, :fa, :he].include?(I18n.locale) |
|
|
|
other_classes = "#{other_classes} rtl" if locale_direction == 'rtl' |
|
|
|
other_classes |
|
|
|
other_classes |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def locale_direction |
|
|
|
|
|
|
|
if [:ar, :fa, :he].include?(I18n.locale) |
|
|
|
|
|
|
|
'rtl' |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
'ltr' |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def favicon_path |
|
|
|
def favicon_path |
|
|
|
env_suffix = Rails.env.production? ? '' : '-dev' |
|
|
|
env_suffix = Rails.env.production? ? '' : '-dev' |
|
|
|
"/favicon#{env_suffix}.ico" |
|
|
|
"/favicon#{env_suffix}.ico" |
|
|
|