From ef09f53b7f545bde37d3fdd2733735c3d8284dbf Mon Sep 17 00:00:00 2001
From: Jeff Sturek <jsturek8@unl.edu>
Date: Wed, 22 Jul 2020 17:02:43 -0500
Subject: [PATCH] Support WDN template 5.2

---
 views/fixed.erb | 316 +++++++++++++++++++++++++-----------------------
 1 file changed, 165 insertions(+), 151 deletions(-)

diff --git a/views/fixed.erb b/views/fixed.erb
index 53fe5c5..247e3a6 100644
--- a/views/fixed.erb
+++ b/views/fixed.erb
@@ -1,169 +1,183 @@
 <!DOCTYPE html>
-<% template_dep_version = '5.1.0' %>
+<% template_dep_version = '5.2.0' %>
 <html class="dcf-no-js dcf-no-webp" lang="en">
-<head>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/head-1.html"))).result %>
-  <!--
-    Membership and regular participation in the UNL Web Developer Network is required to use the UNLedu Web Framework. Visit the WDN site at http://wdn.unl.edu/. Register for our mailing list and add your site or server to UNLwebaudit.
-    All framework code is the property of the UNL Web Developer Network. The code seen in a source code view is not, and may not be used as, a template. You may not use this code, a reverse-engineered version of this code, or its associated visual presentation in whole or in part to create a derivative work.
-    This message may not be removed from any pages based on the UNLedu Web Framework.
+  <head>
+    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/head-1.html"))).result %>
+    <!--
+      Membership and regular participation in the University of Nebraska–Lincoln (UNL) Web Developer Network (WDN) is required to use the UNLedu Web Framework. Visit the WDN site at https://wdn.unl.edu/. Register for our mailing list and add your site or server to UNL Web Audit.
+      All framework code is the property of the UNL Web Developer Network. The code seen in a source code view is not, and may not be used as, a template. You may not use this code, a reverse-engineered version of this code, or its associated visual presentation in whole or in part to create a derivative work.
+      This message may not be removed from any pages based on the UNLedu Web Framework.
 
-    $Id$
-  -->
-  <!-- TemplateBeginEditable name="doctitle" -->
-  <title><%= @title %> | University of Nebraska&ndash;Lincoln</title>
-  <!-- TemplateEndEditable -->
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/head-2-local.html"))).result.gsub('$DEP_VERSION$', template_dep_version) %>
-  <!-- TemplateBeginEditable name="head" -->
-  <!-- Place optional header elements here -->
+      $Id$
+    -->
+    <!-- TemplateBeginEditable name="doctitle" -->
+    <title><%= @title %> | University of Nebraska&ndash;Lincoln</title>
+    <!-- TemplateEndEditable -->
+    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/head-2-local.html"))).result.gsub('$DEP_VERSION$', template_dep_version) %>
+    <!-- TemplateBeginEditable name="head" -->
     <meta name="apple-mobile-web-app-capable" content="yes">
     <link rel="stylesheet" href="/css/resource_scheduler.css">
     <link rel="stylesheet" href="/css/spencers.css">
     <% if defined?(kiosk_mode) && kiosk_mode == 'true' %>
     <link rel="stylesheet" href="/css/kiosk.css">
     <% end %>
-    <link rel="preload" href="/wdn/templates_5.1/css/deprecated.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
-    <noscript><link rel="stylesheet" href="/wdn/templates_5.1/css/deprecated.css"></noscript>
+    <link rel="preload" href="/wdn/templates_5.2/css/deprecated.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
+    <noscript><link rel="stylesheet" href="/wdn/templates_5.2/css/deprecated.css"></noscript>
     <link rel="stylesheet" href="/css/jquery.mCustomScrollbar.min.css" />
-  <!-- TemplateEndEditable -->
-  <!-- TemplateParam name="class" type="text" value="" -->
-</head>
-<body class="unl" data-version="5.1">
-<%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/skip-nav.html"))).result %>
-<header class="dcf-header" id="dcf-header" role="banner">
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/header-global-1.html"))).result %>
-    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-global-1.html"))).result %>
-      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/visit-global-1.html"))).result %>
-      <!-- TemplateBeginEditable name="visitlocal" -->
-      <!-- TemplateEndEditable -->
-      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/visit-global-2.html"))).result %>
-      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/apply-global-1.html"))).result %>
-      <!-- TemplateBeginEditable name="applylocal" -->
-      <!-- TemplateEndEditable -->
-      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/apply-global-2.html"))).result %>
-      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/give-global-1.html"))).result %>
-      <!-- TemplateBeginEditable name="givelocal" -->
-      <!-- TemplateEndEditable -->
-      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/give-global-2.html"))).result %>
-    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-global-2.html"))).result %>
-    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/idm.html"))).result %>
-    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/search.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/header-global-2.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/logo-lockup-1.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/site-affiliation-1.html"))).result %>
-  <!-- TemplateBeginEditable name="affiliation" -->
-  <!-- TemplateEndEditable -->
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/site-affiliation-2.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/site-title-1.html"))).result %>
-  <!-- TemplateBeginEditable name="titlegraphic" -->
-  <a class="dcf-txt-h5" href="/">UNL Resource Scheduler</a>
-  <!-- TemplateEndEditable -->
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/site-title-2.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/logo-lockup-2.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-toggle-group.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-menu-1.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-toggle-btn.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-menu-child-1.html"))).result %>
-  <!-- TemplateBeginEditable name="navlinks" -->
-  <%= erb :'template_partials/navigation' %>
-  <!-- TemplateEndEditable -->
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-menu-child-2.html"))).result %>
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/nav-menu-2.html"))).result %>
-</header>
-
-<main class="dcf-main" id="dcf-main" role="main" tabindex="-1">
-  <% unless defined?(kiosk_mode) && kiosk_mode == 'true' %>
-  <!-- TemplateBeginEditable name="hero" -->
-  <div class="dcf-hero dcf-hero-default">
     <!-- TemplateEndEditable -->
-    <div class="dcf-hero-group-1">
-      <div class="dcf-breadcrumbs-wrapper">
-        <nav class="dcf-breadcrumbs" id="dcf-breadcrumbs" role="navigation" aria-label="breadcrumbs">
-          <!-- TemplateBeginEditable name="breadcrumbs" -->
-           <ol>
-            <% @breadcrumbs.each do |crumb| %>
-            <% if crumb[:href].nil? %>
-            <li><%= crumb[:text] %></li>
-            <% else %>
-            <li><a href="<%= crumb[:href] %>" title="<%= crumb[:title] || crumb[:text] %>"><%= crumb[:text] %></a></li>
-            <% end %>
-            <% end %>
-          </ol>
+    <!-- TemplateParam name="class" type="text" value="" -->
+  </head>
+  <body class="unl" data-version="5.2">
+    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/skip-nav.html"))).result %>
+    <header class="dcf-header" id="dcf-header" role="banner">
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/header-global-1.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/cta-header-1.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/visit-header-1.html"))).result %>
+      <!-- InstanceBeginEditable name="headervisit" -->
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/visit-header-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/apply-header-1.html"))).result %>
+      <!-- InstanceBeginEditable name="headerapply" -->
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/apply-header-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/give-header-1.html"))).result %>
+      <!-- InstanceBeginEditable name="headergive" -->
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/give-header-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/cta-header-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/idm.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/search.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/header-global-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/logo-lockup-1.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/site-affiliation-1.html"))).result %>
+      <!-- InstanceBeginEditable name="affiliation" -->
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/site-affiliation-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/site-title-1.html"))).result %>
+      <!-- InstanceBeginEditable name="titlegraphic" -->
+      <a class="dcf-txt-h5" href="/">UNL Resource Scheduler</a>
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/site-title-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/logo-lockup-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/nav-toggle-group.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/nav-menu-1.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/nav-toggle-btn.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/nav-menu-child-1.html"))).result %>
+      <!-- InstanceBeginEditable name="navlinks" -->
+      <%= erb :'template_partials/navigation' %>
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/cta-nav-1.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/visit-nav-1.html"))).result %>
+      <!-- InstanceBeginEditable name="navvisit" -->
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/visit-nav-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/apply-nav-1.html"))).result %>
+      <!-- InstanceBeginEditable name="navapply" -->
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/apply-nav-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/give-nav-1.html"))).result %>
+      <!-- InstanceBeginEditable name="navgive" -->
+      <!-- InstanceEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/give-nav-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/cta-nav-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/nav-menu-child-2.html"))).result %>
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/nav-menu-2.html"))).result %>
+    </header>
+    <main class="dcf-main" id="dcf-main" role="main" tabindex="-1">
+    <% unless defined?(kiosk_mode) && kiosk_mode == 'true' %>
+      <!-- InstanceBeginEditable name="highlighted" -->
+      <!-- InstanceEndEditable -->
+      <!-- TemplateBeginEditable name="hero" -->
+      <div class="dcf-hero dcf-hero-default">
+        <!-- TemplateEndEditable -->
+        <div class="dcf-hero-group-1">
+          <div class="dcf-breadcrumbs-wrapper">
+            <nav class="dcf-breadcrumbs" id="dcf-breadcrumbs" role="navigation" aria-label="breadcrumbs">
+              <!-- TemplateBeginEditable name="breadcrumbs" -->
+                <ol>
+                  <% @breadcrumbs.each do |crumb| %>
+                      <% if crumb[:href].nil? %>
+                      <li><%= crumb[:text] %></li>
+                      <% else %>
+                      <li><a href="<%= crumb[:href] %>" title="<%= crumb[:title] || crumb[:text] %>"><%= crumb[:text] %></a></li>
+                      <% end %>
+                  <% end %>
+                </ol>
+                <!-- TemplateEndEditable -->
+            </nav>
+          </div>
+          <header class="dcf-page-title" id="dcf-page-title">
+            <!-- TemplateBeginEditable name="pagetitle" -->
+            <!-- TemplateEndEditable -->
+          </header>
+          <!-- TemplateBeginEditable name="herogroup1" -->
           <!-- TemplateEndEditable -->
-        </nav>
-      </div>
-      <header class="dcf-page-title dcf-d-none" id="dcf-page-title">
-        <!-- TemplateBeginEditable name="pagetitle" -->
+        </div>
+        <!-- TemplateBeginEditable name="herogroup2" -->
+        <div class="dcf-hero-group-2">
+        </div>
         <!-- TemplateEndEditable -->
-      </header>
-      <!-- TemplateBeginEditable name="herogroup1" -->
-      <!-- TemplateEndEditable -->
-    </div>
-    <!-- TemplateBeginEditable name="herogroup2" -->
-    <div class="dcf-hero-group-2">
-    </div>
-    <!-- TemplateEndEditable -->
-  </div>
-  <% end %>
-  <div class="dcf-main-content dcf-wrapper">
-    <!-- TemplateBeginEditable name="maincontentarea" -->
-    <div class="dcf-bleed">
-        <% if defined?(kiosk_mode) && kiosk_mode == 'true' %>
-        <div class="kiosk-mode">
-        <% else %>
-        <div class="dcf-wrapper dcf-pb-8">
-        <% end %>
-
-            <% unless session["notice"].nil? %>
-                <% notices = session.delete("notice") %>
-                <% notices.each do |notice| %>
-                <% notice_class = '' %>
-                <% case notice[:type]
-                    when 'success', :success
-                        notice_class = 'affirm'
-                    when 'failure', :failure
-                        notice_class = 'negate'
-                    when 'alert', 'danger', 'error', :error, :alert, :danger
-                        notice_class = 'alert' %>
+      </div>
+      <% end %>
+      <div class="dcf-main-content dcf-wrapper">
+        <!-- TemplateBeginEditable name="maincontentarea" -->
+            <div class="dcf-bleed">
+                <% if defined?(kiosk_mode) && kiosk_mode == 'true' %>
+                <div class="kiosk-mode">
+                <% else %>
+                <div class="dcf-wrapper dcf-pb-8">
                 <% end %>
-                <div id="notice" class="wdn_notice <%= notice_class %>">
-                    <div class="close">
-                        <a href="#" title="Close this notice">Close this notice</a>
-                    </div>
-                    <div class="message">
-                        <h4><%= notice[:header] %></h4>
-                        <div class="message-content">
-                            <%= notice[:message] %>
+
+                    <% unless session["notice"].nil? %>
+                        <% notices = session.delete("notice") %>
+                        <% notices.each do |notice| %>
+                        <% notice_class = '' %>
+                        <% case notice[:type]
+                            when 'success', :success
+                                notice_class = 'affirm'
+                            when 'failure', :failure
+                                notice_class = 'negate'
+                            when 'alert', 'danger', 'error', :error, :alert, :danger
+                                notice_class = 'alert' %>
+                        <% end %>
+                        <div id="notice" class="wdn_notice <%= notice_class %>">
+                            <div class="close">
+                                <a href="#" title="Close this notice">Close this notice</a>
+                            </div>
+                            <div class="message">
+                                <h4><%= notice[:header] %></h4>
+                                <div class="message-content">
+                                    <%= notice[:message] %>
+                                </div>
+                            </div>
                         </div>
-                    </div>
+                        <% end %>
+                    <% else %>
+                    <% session.delete(:notice) %>
+                    <% end %>
+                    <%= yield %>
                 </div>
-                <% end %>
-            <% else %>
-            <% session.delete(:notice) %>
-            <% end %>
-            <%= yield %>
-        </div>
-    </div>
+            </div>
+            <!-- TemplateEndEditable -->
+      </div>
+    </main>
+    <% unless defined?(kiosk_mode) && kiosk_mode == 'true' %>
+    <footer class="dcf-footer" id="dcf-footer" role="contentinfo">
+      <!-- TemplateBeginEditable name="optionalfooter" -->
+      <!-- TemplateEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/footer-global-1.html"))).result %>
+      <!-- TemplateBeginEditable name="contactinfo" -->
+      <%= erb :'template_partials/footer' %>
+      <!-- TemplateEndEditable -->
+      <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/footer-global-2.html"))).result %>
+    </footer>
+    <% end %>
+    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/noscript.html"))).result %>
+    <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.2/includes/global/js-body-local.html"))).result.gsub('$DEP_VERSION$', template_dep_version) %>
+    <!-- TemplateBeginEditable name="jsbody" -->
+    <!-- Put your custom JavaScript here -->
+    <script type="text/javascript">WDN.initializePlugin("notice");</script>
+    <%= @inline_body_script_content %>
     <!-- TemplateEndEditable -->
-  </div>
-</main>
-<% unless defined?(kiosk_mode) && kiosk_mode == 'true' %>
-<footer class="dcf-footer" id="dcf-footer" role="contentinfo">
-  <!-- TemplateBeginEditable name="optionalfooter" -->
-  <!-- TemplateEndEditable -->
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/footer-global-1.html"))).result %>
-  <!-- TemplateBeginEditable name="contactinfo" -->
-  <%= erb :'template_partials/footer' %>
-  <!-- TemplateEndEditable -->
-  <%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/footer-global-2.html"))).result %>
-</footer>
-<% end %>
-<%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/noscript.html"))).result %>
-<%= ERB.new(File.read(File.expand_path("#{ROOT}/public/wdn/templates_5.1/includes/global/js-body-local.html"))).result.gsub('$DEP_VERSION$', template_dep_version) %>
-<!-- TemplateBeginEditable name="jsbody" -->
-<!-- put your custom javascript here -->
-<script type="text/javascript">WDN.initializePlugin("notice");</script>
-<%= @inline_body_script_content %>
-<!-- TemplateEndEditable -->
-</body>
+  </body>
 </html>
-- 
GitLab