app/views/layouts/admin.html.erb in tkh_admin_panel-0.2.5 vs app/views/layouts/admin.html.erb in tkh_admin_panel-0.2.5.1

- old
+ new

@@ -1,19 +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> - <% if defined?(Setting) && !Setting.first.site_name.blank? %> - <%= t("admin_panel_for") + ' ' + Setting.first.site_name %> - <% elsif defined?(APP_SETTINGS) && APP_SETTINGS['site_name'] %> - <%= t("admin_panel_for") + ' ' + APP_SETTINGS['site_name'] %> - <% else %> - <%= t 'admin_panel' %> - <% end %> - </title> + <title><%= t("admin_panel_for") + ' ' + Setting.first.try(: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 --> @@ -30,18 +22,10 @@ <div class="container-fluid"> <div class="row-fluid"> <div class="span12"> <%= render 'shared/login_info' %> - <h1> - <% if defined?(Setting) && !Setting.first.site_name.blank? %> - <%= (t("admin_panel_for") + ' ' + link_to(Setting.first.site_name, root_path)).html_safe %> - <% elsif defined?(APP_SETTINGS) && APP_SETTINGS['site_name'] %> - <%= t("admin_panel_for") + ' ' + APP_SETTINGS['site_name'] %> - <% else %> - <%= t 'admin_panel' %> - <% end %> - </h1> + <h1><%= (t("admin_panel_for") + ' ' + link_to(Setting.first.try(:site_name), root_path)).html_safe %></h1> <% flash.each do |name, msg| %> <div class="alert alert-<%= name == :notice ? "success" : "error" %>"> <a class="close" data-dismiss="alert">×</a> <%= msg %>