bredcrums fix

rails2
Espen Antonsen 2009-06-16 15:51:06 +02:00
parent 1317435506
commit 5b227a7774
2 changed files with 2 additions and 4 deletions

View File

@ -11,7 +11,7 @@ module ApplicationHelper
nocrumb = ["collections", "albums", "photos", "tags"]
levels.each_with_index do |level, index|
level = level.gsub(/[0-9]+-/,"") if levels[index-1] == "photos"
level = level.gsub(/^[0-9]+\-/,"") #if levels[index-1] == "photos"
level = level.gsub("-", " ")
if index+1 == levels.length
links += " #{sep} #{level.upcase}" unless nocrumb.include?(level)
@ -20,6 +20,6 @@ module ApplicationHelper
end
end
content_tag("div", content_tag("p", links ), :id => "breadcrumb")
content_tag("p", links, :id => "breadcrumb")
end
end

View File

@ -11,9 +11,7 @@
<div id="container">
<div id="header">
<p class="links">
<%= breadcrumbs %>
</p>
<h1>ImageGallery</h1>
<form action="/photos" method="get" id="search">
<input type="text" name="q" class="textfie.d"/>