<%# Copyright © 2012 The Pennsylvania State University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. %> <%= csrf_meta_tag %> <%= h(@page_title || application_name) %> <%= stylesheet_link_tag 'application' %> <%= yield(:css_head) %> <%= javascript_include_tag 'application' %> <%= yield(:js_head) %> <%= render :partial => '/ga', :formats => [:html] %> <%# need a better way to determine if we are on the home page and using three col layout %> <% if params[:controller].eql?("catalog") and !has_search_parameters? %> <% column_class = "three" %> <% elsif not ['generic_files', 'batch', 'advanced', 'users', 'batch_edits'].include?(params[:controller]) %> <% column_class = "two" %> <% else %> <% column_class = "one" %> <% end %>
<%= render :partial => '/masthead', :formats => [:html] %> <%= render :partial => '/flash_msg' %>
<% if column_class == "one" %>
<%= yield %>
<% else %>
<%= yield :sidebar %>
<% if column_class == "three" %>
<%= yield %>
<% else %>
<%= yield %>
<% end %> <% end %>
<%= render partial: '/footer' %>