app/views/layouts/admin.html.erb in tkh_admin_panel-0.0.3 vs app/views/layouts/admin.html.erb in tkh_admin_panel-0.0.4

- old
+ new

@@ -1,11 +1,11 @@ <!DOCTYPE html> <html lang="<%= I18n.locale.to_s || 'en' %>"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Admin Panel<%= " for #{SETTINGS['site_name']}" if SETTINGS['site_name'] %></title> + <title>Admin Panel<%= " for #{SETTINGS['site_name']}" if defined?(SETTINGS) && SETTINGS['site_name'] %></title> <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script> <![endif]--> <!-- Le styles --> @@ -22,11 +22,11 @@ <div class="container-fluid"> <div class="row-fluid"> <div class="span12"> <p><b><%= I18n.locale == :en ? link_to('switch to Spanish', locale: :es) : link_to('switch to English', locale: :en) %></b></p> - <h1>Admin Panel<%= " for #{SETTINGS['site_name']}" if SETTINGS['site_name'] %></h1> + <h1>Admin Panel<%= " for #{SETTINGS['site_name']}" if defined?(SETTINGS) && SETTINGS['site_name'] %></h1> <% flash.each do |name, msg| %> <div class="alert alert-<%= name == :notice ? "success" : "error" %>"> <a class="close" data-dismiss="alert">×</a> <%= msg %> @@ -45,12 +45,12 @@ </div><!--/row--> </div> <!-- /container --> <div class="row-fluid"> <footer class="span12"> - <p><b><%= SETTINGS['web_shop_name'] || "Ten Thousand Hours" %></b><br /> - <%= SETTINGS['web_shop_short_url'] ? link_to(SETTINGS['web_shop_short_url'], SETTINGS['web_shop_url']) : link_to("http://TenThousandHours.eu", 'http://TenThousandHours.eu') %><br /> - <%= SETTINGS['web_shop_email'] ? link_to(SETTINGS['web_shop_email'], 'mailto:' + SETTINGS['web_shop_email']) : link_to("swami@TenThousandHours.eu", 'mailto:http://TenThousandHours.eu') %><br /></p> + <p><b><%= defined?(SETTINGS) && SETTINGS['web_shop_name'] || "Ten Thousand Hours" %></b><br /> + <%= defined?(SETTINGS) && SETTINGS['web_shop_short_url'] && SETTINGS['web_shop_url'] ? link_to(SETTINGS['web_shop_short_url'], SETTINGS['web_shop_url']) : link_to("http://TenThousandHours.eu", 'http://TenThousandHours.eu') %><br /> + <%= defined?(SETTINGS) && SETTINGS['web_shop_email'] ? link_to(SETTINGS['web_shop_email'], 'mailto:' + SETTINGS['web_shop_email']) : link_to("swami@TenThousandHours.eu", 'mailto:http://TenThousandHours.eu') %><br /></p> </footer> </div> <!-- Le javascript ================================================== -->