Conjunto de mudanças 721 no repositório publico


Ignorar:
Timestamp:
27/09/2005 09:59:57 (14 anos atrás)
Autor:
ciciliati
Mensagem:

Correção no cálculo da faixa de páginas a ser exibida.

Arquivo:
1 editado

Legenda:

Não Modificado
Adicionado
Removido
  • ILSAPL/trunk/skins/sk_sapl/pysc/PageListOutput_pysc.py

    r679 r721  
    5959                                            # quite a bit of trouble if you have an excessively
    6060                                            # large list with a comparatively low batch size!
    61 PageRange = 4                               # number of pages before and after the current page
     61PageRange = 5                               # number of pages before and after the current page
    6262                                            # to display
    6363#
     
    7474# output strings. Modify to alter what is returned by the script.
    7575#
    76 TotalPagesFormatString = "Pages (%s):"      # String to use when showing total number of pages.
     76TotalPagesFormatString = "Páginas (%s):"      # String to use when showing total number of pages.
    7777                                            # Use %s to signify where the page number will be displayed.
    7878EllipsesString = "..."                      # String signifying that not all pages numbers are displayed
    7979NextString = ">>"                     # content of the "Next Page" link                 
    8080PreviousString = "<<"                 # content of the "Previous Page" link
    81 FirstString = "Primeiro"                       # content of the "First Page" link
    82 LastString = "Último"                         # content of the "Last Page" link
     81FirstString = "Primeira"                       # content of the "First Page" link
     82LastString = "Última"                         # content of the "Last Page" link
    8383CurrentPageFormatString = "[%s]"            # String to use when showing the current page (which is not a link).
    8484                                            # Use %s to signify where the current page number is displayed.
     
    143143if DisplayAll:
    144144    LinkRange = range(1, numPages + 1)
    145 else:
    146     LinkRange = range(page - PageRange, page + PageRange + 1)
     145else:   
     146    LinkRange = range(page - PageRange - max(0, (page + PageRange - numPages)), page + PageRange + 1 - min (0, (page - PageRange - 1)))
    147147
    148148for index in LinkRange:
Note: Veja TracChangeset para ajuda no uso do visualizador de conjunto de mudanças.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.