source: WAeUP_SRP/branches/regebro-noskins/skins/waeup_design/folder_view.py @ 1689

Last change on this file since 1689 was 1522, checked in by lregebro, 18 years ago

The skinless design.

  • Property svn:keywords set to Id
File size: 741 bytes
Line 
1##parameters=b_start=0
2##
3from ZTUtils import Batch
4from ZTUtils import LazyFilter
5
6options = {}
7
8options['has_local'] = 'local_pt' in context.objectIds()
9
10key, reverse = context.getDefaultSorting()
11items = context.contentValues()
12items = sequence.sort( items, ((key, 'cmp', reverse and 'desc' or 'asc'),) )
13items = LazyFilter(items, skip='View')
14batch_obj = Batch(items, 25, b_start, orphan=0)
15listItemInfos = context.getBatchItemInfos(batch_obj)
16try:
17    target = context.getActionInfo('object/view')['url']
18except:
19    target = ''
20
21navigation = context.getBatchNavigation(batch_obj, target)
22options['batch'] = { 'listItemInfos': listItemInfos,
23                     'navigation': navigation }
24return context.index_html_template(**options)
Note: See TracBrowser for help on using the repository browser.