From a66d65fb28a145192e2b73d88fc3799d7c0999e7 Mon Sep 17 00:00:00 2001
From: Luka Murn <luka.murn@biosistemika.com>
Date: Tue, 12 Jun 2018 14:47:15 +0200
Subject: [PATCH] Fix the sign in halt layout

... so it's not dependant on common addon any more.
---
 app/views/layouts/sign_in_halt.html.erb | 71 ++++++++++++++++---------
 1 file changed, 45 insertions(+), 26 deletions(-)

diff --git a/app/views/layouts/sign_in_halt.html.erb b/app/views/layouts/sign_in_halt.html.erb
index 9358ade32..141958d8d 100644
--- a/app/views/layouts/sign_in_halt.html.erb
+++ b/app/views/layouts/sign_in_halt.html.erb
@@ -1,31 +1,50 @@
 <% # This layout should be used when sign in flow is halted (due to e.g. password expiry, %>
 <% # or some similar halt in sign-in chain) %>
-<% content_for :content do %>
-  <nav class="navbar navbar-default navbar-fixed-top navbar-sign-in-halt" id="main-nav">
-    <div class="container-fluid">
-      <div class="navbar-header">
-        <span class="navbar-brand" title="<% t('nav.label.scinote') %>">
-          <%= image_tag('/images/scinote_icon.jpg', id: 'logo') %>
-        </span>
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta data-hook="head-js">
+    <title><%=t "head.title", title: (yield :head_title) %></title>
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+    <style media="all">
+      html, body { height: 100%; min-height: 100%; }
+    </style>
+    <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
+    <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
+
+    <%= favicon_link_tag "favicon.ico" %>
+    <%= favicon_link_tag "favicon-16.png", type: "image/png", size: "16x16" %>
+    <%= favicon_link_tag "favicon-32.png", type: "image/png", size: "32x32" %>
+    <%= favicon_link_tag "favicon-48.png", type: "image/png", size: "48x48" %>
+
+    <%= csrf_meta_tags %>
+  </head>
+  <body class="<%= yield :body_class %>">
+    <nav class="navbar navbar-default navbar-fixed-top navbar-sign-in-halt" id="main-nav">
+      <div class="container-fluid">
+        <div class="navbar-header">
+          <span class="navbar-brand" title="<% t('nav.label.scinote') %>">
+            <%= image_tag('/images/scinote_icon.jpg', id: 'logo') %>
+          </span>
+        </div>
+        <div class="pull-right sign-in-halt-logout-button">
+          <%= link_to main_app.destroy_user_session_path, class: 'btn btn-default', method: :delete do %>
+            <%= t('nav.user.logout') %>
+          <% end %>
+        </div>
       </div>
-      <div class="pull-right sign-in-halt-logout-button">
-        <%= link_to main_app.destroy_user_session_path, class: 'btn btn-default', method: :delete do %>
-          <%= t('nav.user.logout') %>
-        <% end %>
+    </nav>
+    <% if flash[:error]%>
+      <div class="alert alert-danger alert-dismissable alert-floating">
+        <div class="container">
+          <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
+          <span class="glyphicon glyphicon-exclamation-sign"></span>
+          <span><%= sanitize_input(flash[:error]) %></span>
+        </div>
       </div>
+    <% end %>
+    <div class="container sign-in-halt-container">
+      <%= yield %>
     </div>
-  </nav>
-  <% if flash[:error]%>
-    <div class="alert alert-danger alert-dismissable alert-floating">
-      <div class="container">
-        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
-        <span class="glyphicon glyphicon-exclamation-sign"></span>
-        <span><%= sanitize_input(flash[:error]) %></span>
-      </div>
-    </div>
-  <% end %>
-  <div class="container sign-in-halt-container">
-    <%= yield %>
-  </div>
-<% end %>
-<%= render template: 'scinote/common/layouts/application' %>
+  </body>
+</html>
\ No newline at end of file