Method: Ramaze::Pager#navigation
- Defined in:
- lib/ramaze/helper/pager.rb
#navigation ⇒ Object
Override this method in your application if needed. – TODO: better markup. ++
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/ramaze/helper/pager.rb', line 204 def nav = "" unless first_page? nav << %{ <div class="first"><a href="#{link_first_page}">First</a></div> <div class="previous"><a href="#{link_prev_page}">Previous</a></div> } end unless last_page? nav << %{ <div class="last"><a href="#{link_last_page}">Last</a></div> <div class="next"><a href="#{link_next_page}">Next</a></div> } end nav << %{<ul>} for i in nav_range() if i == @page nav << %{<li class="active">#{i}</li>} else nav << %{<li><a href="#{target_uri(i)}">#{i}</a></li>} end end nav << %{</ul>} return nav end |