Changeset 888

Show
Ignore:
Timestamp:
06/19/07 04:25:46
Author:
fenix
Message:

Remove navigation for only one page of blog content.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • SimpleBlog/branches/optimizations/content/blog.py

    r869 r888  
    272272            total_len = notlimited_len 
    273273        ditems = self.getDisplayItems() 
    274         max_pages = total_len/ditems + (total_len%ditems and 1 or 0) 
     274         
    275275        batch = [] 
    276         if max_pages: 
     276        if total_len > ditems: 
     277            max_pages = total_len/ditems + (total_len%ditems and 1 or 0) 
    277278            vis_middle = 3  # max number of pages in one of the side around current 
    278279            curr_num = b_start/ditems >= max_pages and max_pages or b_start/ditems+1 
  • SimpleBlog/branches/optimizations/skins/SimpleBlog/blog_navigation_macros.pt

    r870 r888  
    99                 first_item python:len(nav)>0 and nav[0] or []; 
    1010                 last_item python:len(nav)>1 and nav[1] or []; 
    11                  batch python:len(nav)>2 and nav[2] or [];"> 
     11                 batch python:len(nav)>2 and nav[2] or [];" 
     12     tal:omit-tag="not:nav"> 
    1213 
    1314   <span class="previous"