Revision 30d69e62
Added by Thomas Noël almost 13 years ago
extra/modules/root.ptl | ||
---|---|---|
125 | 125 |
'</ul>' |
126 | 126 |
|
127 | 127 |
# with workflows |
128 |
forms_by_status_name = {} |
|
128 | 129 |
workflows = Workflow.select(order_by = 'name') |
129 | 130 |
for workflow in workflows: |
130 | 131 |
# XXX: seperate endpoints from non-endpoints |
... | ... | |
133 | 134 |
x.formdef and x.formdef.workflow_id == workflow.id] |
134 | 135 |
if not fms: |
135 | 136 |
continue |
136 |
'<h4>%s</h4>' % _('My forms with status "%s"') % status.name |
|
137 |
'<ul>' |
|
138 |
for f in fms: |
|
139 |
if f.formdef.category_id: |
|
140 |
category_url = f.formdef.category.url_name |
|
141 |
else: |
|
142 |
category_url = '.' |
|
143 |
'<li><a href="%s%s/%s/%s/">%s</a>, %s</li>' % ( |
|
144 |
base_url, |
|
145 |
category_url, |
|
146 |
f.formdef.url_name, f.id, f.formdef.name, |
|
147 |
misc.localstrftime(f.receipt_time)) |
|
148 |
'</ul>' |
|
137 |
if status.name in forms_by_status_name: |
|
138 |
forms_by_status_name[status.name] += fms |
|
139 |
else: |
|
140 |
forms_by_status_name[status.name] = fms |
|
141 |
for status_name in forms_by_status_name: |
|
142 |
'<h4>%s</h4>' % _('My forms with status "%s"') % status_name |
|
143 |
'<ul>' |
|
144 |
forms_by_status_name[status_name].sort(lambda x,y: cmp(x.receipt_time, y.receipt_time)) |
|
145 |
for f in forms_by_status_name[status_name]: |
|
146 |
if f.formdef.category_id: |
|
147 |
category_url = f.formdef.category.url_name |
|
148 |
else: |
|
149 |
category_url = '.' |
|
150 |
'<li><a href="%s%s/%s/%s/">%s</a>, %s</li>' % ( |
|
151 |
base_url, |
|
152 |
category_url, |
|
153 |
f.formdef.url_name, f.id, f.formdef.name, |
|
154 |
misc.localstrftime(f.receipt_time)) |
|
155 |
'</ul>' |
|
149 | 156 |
|
150 | 157 |
|
151 | 158 |
class AnnounceDirectory(Directory): |
Also available in: Unified diff
in myspace, display forms sorted by status