aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2016-07-25 16:05:01 +0200
committerjpl2016-07-25 16:05:01 +0200
commiteb43133d983a065f960e1588adb03373ef799c5d (patch)
tree6b62a861d22d83db907512c255ef795cd9f2b0bc
parentf4a5bb7c820a513d63fd6146a10ac89a02a8015e (diff)
downloadchouette-core-eb43133d983a065f960e1588adb03373ef799c5d.tar.bz2
Refs #1295: convert erb to slim (layouts)
-rw-r--r--app/views/layouts/_logos.erb3
-rw-r--r--app/views/layouts/_logos.html.slim3
-rw-r--r--app/views/layouts/application.html.erb44
-rw-r--r--app/views/layouts/application.html.slim42
-rw-r--r--app/views/layouts/devise.html.erb42
-rw-r--r--app/views/layouts/devise.html.slim41
-rw-r--r--app/views/layouts/mailer.html.erb24
-rw-r--r--app/views/layouts/mailer.html.slim22
8 files changed, 108 insertions, 113 deletions
diff --git a/app/views/layouts/_logos.erb b/app/views/layouts/_logos.erb
deleted file mode 100644
index 0420e78a6..000000000
--- a/app/views/layouts/_logos.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-<ul class="logos">
- <li><%= image_tag "logoMEDDE.jpg" %></li>
-</ul> \ No newline at end of file
diff --git a/app/views/layouts/_logos.html.slim b/app/views/layouts/_logos.html.slim
new file mode 100644
index 000000000..315e4362d
--- /dev/null
+++ b/app/views/layouts/_logos.html.slim
@@ -0,0 +1,3 @@
+ul.logos
+ li
+ = image_tags "logoMEDDE.jpg" \ No newline at end of file
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
deleted file mode 100644
index 78c4f4a5f..000000000
--- a/app/views/layouts/application.html.erb
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html lang="<%= I18n.locale %>">
- <head>
- <title>STIF BOIV - <%= title %></title>
- <%= favicon_link_tag "logo_chouette_small.ico" %>
- <%= favicon_link_tag 'logo_chouette_small.png', rel: 'apple-touch-icon', type: 'image/png' %>
- <%= stylesheet_link_tag :application %>
- <%= javascript_include_tag :application %>
- <% if defined?( @map) %>
- <script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
- <script src="http://openlayers.org/api/OpenLayers.js"></script>
- <script type="text/JavaScript">
- OpenLayers.ImgPath = "<%= polymorphic_path_patch("/assets/openlayers/") %>";
- </script>
- <% end %>
- <%= analytics_init if Rails.env.production? %>
- <%= csrf_meta_tag %>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
- </head>
- <body>
- <div id="header">
- <%= render partial: "shared/header" %>
- </div>
- <div id="middle" class="container">
- <div class="row">
- <div class="<%= content_for?(:sidebar) ? 'col-md-9' : 'col-md-12' %>">
- <div id="workspace" class="<%= controller_name %> <%= action_name %>">
- <%= render partial: "shared/flash_messages", flash: flash %>
- <%= render partial: "shared/breadcrumb" %>
- <%= yield %>
- </div>
- </div>
- <div id="sidebar" class="<%= content_for?(:sidebar) ? 'col-md-3' : '' %>">
- <%= yield :sidebar %>
- </div>
- </div>
- </div>
- <div class="clearfix"></div>
- <div id="footer">
- <%= render partial: "shared/footer" %>
- </div>
- </body>
-</html>
diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim
new file mode 100644
index 000000000..fad7a3ed7
--- /dev/null
+++ b/app/views/layouts/application.html.slim
@@ -0,0 +1,42 @@
+doctype html
+html lang=I18n.locale
+ head
+ meta charset="utf-8"
+ meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
+ meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible"
+
+ title = "STIF BOIV - #{title}"
+
+ = favicon_link_tag "logo_chouette_small.ico"
+ = favicon_link_tag 'logo_chouette_small.png', rel: 'apple-touch-icon', type: 'image/png'
+
+ = stylesheet_link_tag :application
+ = javascript_include_tag :application
+
+ - if defined?(@map)
+ = javascript_include_tag "http://maps.google.com/maps/api/js?v=3.2&sensor=false"
+ = javascript_include_tag "http://openlayers.org/api/OpenLayers.js"
+
+ / Todo from @jpl: check if it works...
+ <script type="text/JavaScript">
+ OpenLayers.ImgPath = polymorphic_path_patch('/assets/openlayers/')
+ </script>
+
+ = analytics_init if Rails.env.production?
+ = csrf_meta_tag
+
+ body
+ #header
+ = render partial: "shared/header"
+ #middle.container
+ .row
+ div class=("#{content_for?(:sidebar) ? 'col-md-9' : 'col-md-12'}")
+ #workspace class=("#{controller_name} #{action_name}")
+ = render partial: "shared/flash_messages", flash: flash
+ = render partial: "shared/breadcrumb"
+ = yield
+ #sidebar class=("#{content_for?(:sidebar) ? 'col-md-3' : ''}")
+ = yield :sidebar
+ .clearfix
+ #footer
+ = render partial: "shared/footer"
diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb
deleted file mode 100644
index 809e235f4..000000000
--- a/app/views/layouts/devise.html.erb
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<html lang="<%= I18n.locale %>">
- <head>
- <title>STIF BOIV - <%= title %></title>
- <%= favicon_link_tag "logo_chouette_small.ico" %>
- <%= favicon_link_tag 'logo_chouette_small.png', rel: 'apple-touch-icon', type: 'image/png' %>
- <%= stylesheet_link_tag :application %>
- <%= javascript_include_tag :application %>
- <% if defined?( @map) %>
- <script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
- <script src="http://openlayers.org/api/OpenLayers.js"></script>
- <script type="text/JavaScript">
- OpenLayers.ImgPath = "<%= polymorphic_path_patch("/assets/openlayers/") %>";
- </script>
- <% end %>
- <%= analytics_init if Rails.env.production? %>
- <%= csrf_meta_tag %>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
- </head>
- <body id="devise">
- <div id="header">
- <%= render partial: "shared/header" %>
- </div>
- <div class="front_bg">
- <div id="devise_middle" class="container">
- <div class="row">
- <div class="<%= content_for?(:sidebar) ? 'col-md-9' : 'col-md-12' %>">
- <div id="workspace" class="<%= controller_name %> <%= action_name %>">
- <%= render partial: "shared/flash_messages", flash: flash %>
- <%= render partial: "shared/breadcrumb" %>
- <%= yield %>
- </div>
- </div>
- </div>
- </div>
- <div id="footer">
- <%= render partial: "shared/footer" %>
- </div>
- </div>
- </body>
-</html>
diff --git a/app/views/layouts/devise.html.slim b/app/views/layouts/devise.html.slim
new file mode 100644
index 000000000..e72748d10
--- /dev/null
+++ b/app/views/layouts/devise.html.slim
@@ -0,0 +1,41 @@
+doctype html
+html lang=I18n.locale
+ head
+ meta charset="utf-8"
+ meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
+ meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible"
+
+ title = "STIF BOIV - #{title}"
+
+ = favicon_link_tag "logo_chouette_small.ico"
+ = favicon_link_tag 'logo_chouette_small.png', rel: 'apple-touch-icon', type: 'image/png'
+
+ = stylesheet_link_tag :application
+ = javascript_include_tag :application
+
+ - if defined?(@map)
+ = javascript_include_tag "http://maps.google.com/maps/api/js?v=3.2&sensor=false"
+ = javascript_include_tag "http://openlayers.org/api/OpenLayers.js"
+
+ / Todo from @jpl: check if it works...
+ <script type="text/JavaScript">
+ OpenLayers.ImgPath = polymorphic_path_patch('/assets/openlayers/')
+ </script>
+
+ = analytics_init if Rails.env.production?
+ = csrf_meta_tag
+
+ body#devise
+ #header
+ = render partial: "shared/header"
+
+ .front_bg
+ #devise_middle.container
+ .row
+ div class=("#{content_for?(:sidebar) ? 'col-md-9' : 'col-md-12'}")
+ #workspace class=("#{controller_name} #{action_name}")
+ = render partial: "shared/flash_messages", flash: flash
+ = render partial: "shared/breadcrumb"
+ = yield
+ #footer
+ = render partial: "shared/footer" \ No newline at end of file
diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb
deleted file mode 100644
index ac00bdfea..000000000
--- a/app/views/layouts/mailer.html.erb
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
- <title><%= message.subject %></title>
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-</head>
-
-<body style="font-family: Verdana, Helvetica, Arial, MS Trebuchet, sans-serif; font-size: 14px; width: 600px; background: #E5E5E5; padding: 15px">
- <style>
- h2 { font-size: 18px; }
- h3 { font-size: 14px; }
- a { color: black; }
- </style>
-
- <h1 style="background: #61970B; height: 75px; font-size: 24px; font-weight: normal; color: white; padding: 20px 0 0 30px;">Chouette</h1>
-
- <div style="background: white; margin-bottom: 10px; padding: 15px; -moz-box-shadow: 3px 3px 4px #bbbbbb; -webkit-box-shadow: 3px 3px 4px #BBB; box-shadow: 3px 3px 4px #BBB; border-right: 1px solid #BBB; border-bottom: 1px solid #BBB;">
- <%= yield %>
- </div>
-
- <div style="color: #333333; text-align:center; font-size: 10px;">
- Envoyé par <%= link_to "Chouette", unauthenticated_root_url %>
- </div>
-</body>
-</html>
diff --git a/app/views/layouts/mailer.html.slim b/app/views/layouts/mailer.html.slim
new file mode 100644
index 000000000..2ea993105
--- /dev/null
+++ b/app/views/layouts/mailer.html.slim
@@ -0,0 +1,22 @@
+doctype html
+html
+ head
+ meta charset="utf-8"
+ title= message.subject
+
+ body style="font-family: Verdana, Helvetica, Arial, MS Trebuchet, sans-serif; font-size: 14px; width: 600px; background: #E5E5E5; padding: 15px"
+
+ <style>
+ h2 { font-size: 18px; }
+ h3 { font-size: 14px; }
+ a { color: black; }
+ </style>
+
+ h1 style="background: #61970B; height: 75px; font-size: 24px; font-weight: normal; color: white; padding: 20px 0 0 30px;"
+ |Chouette
+
+ div style="background: white; margin-bottom: 10px; padding: 15px; -moz-box-shadow: 3px 3px 4px #bbbbbb; -webkit-box-shadow: 3px 3px 4px #BBB; box-shadow: 3px 3px 4px #BBB; border-right: 1px solid #BBB; border-bottom: 1px solid #BBB;"
+ = yield
+
+ div style="color: #333333; text-align:center; font-size: 10px;"
+ = "Envoyé par #{link_to 'Chouette', unauthenticated_root_url}" \ No newline at end of file