X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4d91fe3dd95c1058cb8d24fd4c900223e30b9059..98475075c70d19fc04912c12b67a8f9194fc709f:/app/helpers/application_helper.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fb422cc17..18f233e50 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -88,6 +88,14 @@ module ApplicationHelper end end + def dir + if dir = params[:dir] + dir == "rtl" ? "rtl" : "ltr" + else + I18n.t("html.dir") + end + end + def friendly_date(date) content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly)) end