Changeset 1148

Show
Ignore:
Timestamp:
09/26/06 19:17:16 (2 years ago)
Author:
james
Message:

page numbers in pagination

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • peasantonline/app/views/catalog/_product_paginate.rhtml

    r1146 r1148  
    11<div id="prev_next"> 
    22        <div id="prev_page"><%= link_to 'Previous page', { :page => @product_pages.current.previous } if @product_pages.current.previous %>&nbsp;</div> 
     3        <div id="page_numbers"> 
     4        <% 
     5                @product_pages.each do |page| 
     6            if @product_pages.current == page 
     7        %> 
     8                       <%= page.number.to_s %> 
     9        <% else %> 
     10                       <%= link_to page.number.to_s, {:page => page.number.to_s }%> 
     11        <% end %> 
     12                                        &nbsp; 
     13        <% end %> 
     14        &nbsp;</div> 
    315        <div id="next_page"><%= link_to 'Next page', { :page => @product_pages.current.next } if @product_pages.current.next %>&nbsp;</div> 
    416</div> 
  • peasantonline/app/views/catalog/browse_by_category.rhtml

    r1146 r1148  
    11 <% @page_title = "Peasant Online: ", @category  %> 
    22                <h1><%= @category %></h1> 
     3                <%= render(:partial => "product_paginate") %> 
    34                <%= render(:partial => "product_list") %>  
    45                <%= render(:partial => "product_paginate") %> 
  • peasantonline/app/views/catalog/browse_by_designer.rhtml

    r1146 r1148  
    55 
    66                <h1> <%= @designer %> </h1> 
     7                <%= render(:partial => "product_paginate") %> 
    78                <%= render(:partial => "product_list") %>  
    89                <%= render(:partial => "product_paginate") %> 
  • peasantonline/app/views/catalog/browse_by_gender.rhtml

    r1146 r1148  
    22 
    33                <h1> <%= @gender %> </h1> 
     4                <%= render(:partial => "product_paginate") %> 
    45                <%= render(:partial => "product_list") %>  
    56                <%= render(:partial => "product_paginate") %> 
  • peasantonline/public/stylesheets/catalog.css

    r1147 r1148  
    184184 
    185185#prev_next { 
    186         width:  500px; 
     186        width:  550px; 
    187187        font-weight:  bold; 
     188        clear: both; 
    188189} 
    189190 
    190 #prev_page, #next_page
    191         width:  250px; 
     191#prev_page, #next_page, #page_numbers
     192        width:  150px; 
    192193        float:  left; 
    193194        text-align:  center; 
    194195        margin-bottom: 6px; 
    195196} 
     197#page_numbers { 
     198        width:  250px; 
     199}