- is_default = 0
-
-columns = ( {'key': 'Lock',
- 'title': '',
- 'width': '16',
- 'colspan': None}
- , {'key': 'Type',
- 'title': 'Type',
- 'width': None,
- 'colspan': '2'}
- , {'key': 'title_or_id',
- 'title': 'Name',
- 'width': None,
- 'colspan': None}
- , {'key': 'modified',
- 'title': 'Last Modified',
- 'width': None,
- 'colspan': None}
- , {'key': 'position',
- 'title': 'Position',
- 'width': None,
- 'colspan': None }
- )
-
-for column in columns:
- images = []
- if key == column['key'] :
- if not is_default and manage_props_allowed :
- images.append( {'src' : getattr(context, 'set_default_sorting.gif').absolute_url(),
- 'alt' : 'Set Sorting as Default',
- 'id' : 'SetSortingAsDefault',
- 'href': '%s?%s' % (target, make_query(items_sort=True,
- key=key,
- reverse= (key != 'position' and [reverse] or [False])[0] )
- )
- }
- )
-
- if key != 'position' :
- if reverse :
- toggleImg = getattr(context, 'arrowDown.gif')
- alt = 'descending sort'
- else :
- toggleImg = getattr(context, 'arrowUp.gif')
- alt = 'ascending sort'
- query = make_query(key=column['key'], reverse = not reverse)
- else :
- toggleImg = getattr(context, 'arrowUp.gif')
- alt = 'ascending sort'
- query = make_query(key=column['key'])
- images.append( {'src' : toggleImg.absolute_url(), 'alt' : alt} )
- else :
- if key != 'position' :
- query = make_query(key=column['key'], reverse = reverse)
- else :
- query = make_query(key=column['key'])
-
- column['url'] = '%s?%s' % (target, query)
- column['images'] = images
+ is_default = 0
+
+columns = ( {'key': 'Type',
+ 'title': _('Type'),
+ 'width': None,
+ 'colspan': '2'}
+ , {'key': 'id',
+ 'title': _('Name'),
+ 'width': None,
+ 'colspan': None}
+ , {'key': 'modified',
+ 'title': _('Last Modified'),
+ 'width': None,
+ 'colspan': None}
+ )
+
+for column in columns:
+ images = []
+ if key == column['key'] :
+ if not is_default and manage_props_allowed :
+ images.append( {'src' : getattr(context, 'set_default_sorting.gif').absolute_url(),
+ 'alt' : _('Set Sorting as Default'),
+ 'id' : 'SetSortingAsDefault',
+ 'href': '%s?%s' % (target, make_query(items_sort=True,
+ key=key,
+ reverse= (key != 'position' and [reverse] or [False])[0] )
+ )
+ }
+ )
+
+ if key != 'position' :
+ if reverse :
+ toggleImg = getattr(context, 'arrowDown.gif')
+ alt = 'descending sort'
+ else :
+ toggleImg = getattr(context, 'arrowUp.gif')
+ alt = 'ascending sort'
+ query = make_query(key=column['key'], reverse = not reverse)
+ else :
+ toggleImg = getattr(context, 'arrowUp.gif')
+ alt = 'ascending sort'
+ query = make_query(key=column['key'])
+ images.append( {'src' : toggleImg.absolute_url(), 'alt' : alt} )
+ else :
+ if key != 'position' :
+ query = make_query(key=column['key'], reverse = reverse)
+ else :
+ query = make_query(key=column['key'])
+
+ column['url'] = '%s?%s' % (target, query)
+ column['images'] = images