appy.pod: variable named 'loop' is now available in the POD context of any section within a 'for' statement, with attributes like loop.[iterVariableName].length (=total number of looped elements) and loop.[iterVariableName].nb (=index of currently looped element).

This commit is contained in:
Gaetan Delannay 2012-03-16 14:59:59 +01:00
parent 0dd8b72dca
commit cbb8d5cd12
3 changed files with 58 additions and 1 deletions

View file

@ -979,7 +979,8 @@ class ToolMixin(BaseMixin):
rolesToShow = [r for r in appyUser.roles \
if r not in ('Authenticated', 'Member')]
if rolesToShow:
res.append(', '.join([self.translate(r) for r in rolesToShow]))
res.append(', '.join([self.translate('role_%s'%r) \
for r in rolesToShow]))
return (' | '.join(res), appyUser.o.getUrl(mode='edit'))
def generateUid(self, className):