Sha256: e7c308bf52f91127a68a0cd87d0fcd8e32512ac5cb6f6e9f5a085429b289066b

Contents?: true

Size: 1.43 KB

Versions: 21

Compression:

Stored size: 1.43 KB

Contents

<%#
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.
%>

<%# convert class variable to a local variable if the local hasn't been set %>
<% generic_file = @generic_file unless generic_file  %>

<div class="breadcrumbs">
  <%
     include_file = true if include_file.blank?
     crumbs = []
     crumbs << link_to('Home', root_path)

     case request.referer
     when /dashboard/
       crumbs << link_to('Dashboard', sufia.dashboard_index_path)
     when /files/
       crumbs << link_to('Back to previous', request.referer)
     when /catalog/
       crumbs << link_to('Back to search results', request.referer)
     end

     crumbs << generic_file.title.first if include_file

     crumbs.each do |crumb| %>
       <% if crumb == crumbs.last %>
       <span class="active"> <%= crumb %>
       <% else %>
       <span> <%= crumb %> <span class="divider">/</span>
       <% end %>
       </span>
  <% end %>
</div><!-- /breadcrumbs -->

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
sufia-3.7.2 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.7.1 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.7.0 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.6.1 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.6.0 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.5.0 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.4.0 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.4.0.rc4 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.4.0.rc3 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.3.1 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.4.0.rc2 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.4.0.rc1 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.3.0 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.2.1 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.1.3 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.1.2 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.1.1 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.1.0 app/views/generic_files/_breadcrumbs.html.erb
sufia-3.0.0 app/views/generic_files/_breadcrumbs.html.erb
sufia-2.0.1 app/views/generic_files/_breadcrumbs.html.erb