fixed problem with pagination url, it was creating a relative path instead of an absolute path

This commit is contained in:
Jaime Andres 2011-04-19 00:33:54 -05:00
parent 7b30c34a9b
commit 860b206b0a

View File

@ -82,13 +82,13 @@ module Locomotive
previous_link = (if paginate['previous'].blank? previous_link = (if paginate['previous'].blank?
"<span class=\"disabled prev_page\">#{previous_label}</span>" "<span class=\"disabled prev_page\">#{previous_label}</span>"
else else
"<a href=\"#{paginate['previous']['url']}\" class=\"prev_page\">#{previous_label}</a>" "<a href=\"/#{paginate['previous']['url']}\" class=\"prev_page\">#{previous_label}</a>"
end) end)
links = "" links = ""
paginate['parts'].each do |part| paginate['parts'].each do |part|
links << (if part['is_link'] links << (if part['is_link']
"<a href=\"#{part['url']}\">#{part['title']}</a>" "<a href=\"/#{part['url']}\">#{part['title']}</a>"
elsif part['hellip_break'] elsif part['hellip_break']
"<span class=\"gap\">#{part['title']}</span>" "<span class=\"gap\">#{part['title']}</span>"
else else
@ -99,7 +99,7 @@ module Locomotive
next_link = (if paginate['next'].blank? next_link = (if paginate['next'].blank?
"<span class=\"disabled next_page\">#{next_label}</span>" "<span class=\"disabled next_page\">#{next_label}</span>"
else else
"<a href=\"#{paginate['next']['url']}\" class=\"next_page\">#{next_label}</a>" "<a href=\"/#{paginate['next']['url']}\" class=\"next_page\">#{next_label}</a>"
end) end)
%{<div class="pagination #{options[:css]}"> %{<div class="pagination #{options[:css]}">