From 8300040f9bee3653017f8b35c9969726531bce06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 7 Sep 2015 16:26:37 +0200 Subject: [PATCH 1/3] adds browser --- Gemfile | 2 ++ Gemfile.lock | 1 + 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index 6840329ff..0fbe796bf 100644 --- a/Gemfile +++ b/Gemfile @@ -53,6 +53,8 @@ gem 'whenever', require: false gem 'ahoy_matey', '~> 1.2.1' gem 'groupdate' # group temporary data +gem 'browser' + group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug' diff --git a/Gemfile.lock b/Gemfile.lock index 4814dc6af..fdfae6d17 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -406,6 +406,7 @@ DEPENDENCIES acts_as_votable ahoy_matey (~> 1.2.1) ancestry + browser bullet byebug cancancan From d5274a69c42405aad38813cb460f053d6bd72597 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Wed, 16 Sep 2015 15:37:47 +0200 Subject: [PATCH 2/3] Adds IE popup for IE less than IE9 versions --- app/assets/stylesheets/participacion.scss | 11 +++++++++++ app/views/layouts/application.html.erb | 17 +++++++++++++++++ config/locales/en.yml | 9 +++++++++ config/locales/es.yml | 9 +++++++++ 4 files changed, 46 insertions(+) diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index a14d6f67f..7ed7f2372 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -262,6 +262,17 @@ h6 { border-top: rem-calc(6) solid $brand; } +.ie-alert-box { + position: absolute; + top: 0; + width: 100%; + + a.close { + font-size: 36px; + top: 20%; + } +} + // 04. Header // - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a54f23e7e..abf7ec568 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -22,6 +22,23 @@
<%= render 'layouts/header' %> + + <% if notice %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index a8c0c8d70..4193d92ad 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -48,6 +48,15 @@ en: privacy: "Privacy Policy" conditions: "Terms of use" more_info: "More information" + application: + ie_title: "This site is not optimized for your browser" + ie: + "You are using Internet Explorer. + For a better experience we recommend use %{chrome} or %{firefox}." + chrome: "Google Chrome" + chrome_url: "https://www.google.com/chrome/browser/desktop/" + firefox: "Firefox" + firefox_url: "https://www.mozilla.org/firefox" form: error: error errors: errors diff --git a/config/locales/es.yml b/config/locales/es.yml index 8de1f4cc8..0c10f5d81 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -48,6 +48,15 @@ es: privacy: "Política de privacidad" conditions: "Condiciones de uso" more_info: "Más información" + application: + ie_title: "Esta web no está optimizada para tu navegador" + ie: + "Hemos detectado que estás navegando desde Internet Explorer. + Para una mejor experiencia te recomendamos utilizar %{chrome} o %{firefox}." + chrome: "Google Chrome" + chrome_url: "https://www.google.com/chrome/browser/desktop/" + firefox: "Firefox" + firefox_url: "https://www.mozilla.org/firefox" form: error: error errors: errores From bdf420666b85cce2aa10ab9feef8a2536904d771 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 17 Sep 2015 10:50:14 +0200 Subject: [PATCH 3/3] Moves browser's url out of yml --- app/views/layouts/application.html.erb | 4 ++-- config/locales/en.yml | 2 -- config/locales/es.yml | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index abf7ec568..31f1a2367 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -30,9 +30,9 @@

<%= t("layouts.application.ie", chrome: link_to( - t("layouts.application.chrome"), t("layouts.application.chrome_url"), target: "_blank"), + t("layouts.application.chrome"), "https://www.google.com/chrome/browser/desktop/", target: "_blank"), firefox: link_to( - t("layouts.application.firefox"), t("layouts.application.firefox_url"), target: "_blank") + t("layouts.application.firefox"), "https://www.mozilla.org/firefox", target: "_blank") ).html_safe %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 4193d92ad..31d3419ed 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -54,9 +54,7 @@ en: "You are using Internet Explorer. For a better experience we recommend use %{chrome} or %{firefox}." chrome: "Google Chrome" - chrome_url: "https://www.google.com/chrome/browser/desktop/" firefox: "Firefox" - firefox_url: "https://www.mozilla.org/firefox" form: error: error errors: errors diff --git a/config/locales/es.yml b/config/locales/es.yml index 0c10f5d81..cb256b897 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -54,9 +54,7 @@ es: "Hemos detectado que estás navegando desde Internet Explorer. Para una mejor experiencia te recomendamos utilizar %{chrome} o %{firefox}." chrome: "Google Chrome" - chrome_url: "https://www.google.com/chrome/browser/desktop/" firefox: "Firefox" - firefox_url: "https://www.mozilla.org/firefox" form: error: error errors: errores