Revision 362dadaa snf-astakos-app/astakos/im/tables.py
b/snf-astakos-app/astakos/im/tables.py | ||
---|---|---|
225 | 225 |
|
226 | 226 |
|
227 | 227 |
def project_name_append(project, column): |
228 |
pending_apps = column.table.pending_apps
|
|
229 |
app = pending_apps.get(project.id)
|
|
230 |
if app and app.id != project.application_id:
|
|
228 |
if project.state != project.UNINITIALIZED and \
|
|
229 |
project.last_application is not None and \
|
|
230 |
project.last_application.state == ProjectApplication.PENDING:
|
|
231 | 231 |
return mark_safe("<br /><i class='tiny'>%s</i>" % |
232 | 232 |
_('modifications pending')) |
233 | 233 |
return u'' |
... | ... | |
250 | 250 |
append=project_name_append, |
251 | 251 |
args=(A('id'),), |
252 | 252 |
orderable=False, |
253 |
accessor='application.name') |
|
254 |
|
|
255 |
issue_date = tables.DateColumn(verbose_name=_('Application'), |
|
256 |
format=DEFAULT_DATE_FORMAT, |
|
257 |
orderable=False, |
|
258 |
accessor='application.issue_date') |
|
259 |
start_date = tables.DateColumn(format=DEFAULT_DATE_FORMAT, |
|
260 |
orderable=False, |
|
261 |
accessor='application.start_date') |
|
253 |
accessor='realname') |
|
254 |
|
|
255 |
creation_date = tables.DateColumn(verbose_name=_('Application'), |
|
256 |
format=DEFAULT_DATE_FORMAT, |
|
257 |
orderable=False, |
|
258 |
accessor='creation_date') |
|
262 | 259 |
end_date = tables.DateColumn(verbose_name=_('Expiration'), |
263 | 260 |
format=DEFAULT_DATE_FORMAT, |
264 | 261 |
orderable=False, |
265 |
accessor='application.end_date')
|
|
262 |
accessor='end_date') |
|
266 | 263 |
members_count_f = tables.Column(verbose_name=_("Members"), |
267 | 264 |
empty_values=(), |
268 | 265 |
orderable=False) |
... | ... | |
313 | 310 |
return mark_safe(str(members_count) + append) |
314 | 311 |
|
315 | 312 |
class Meta: |
316 |
sequence = ('name', 'membership_status', 'issue_date', 'end_date',
|
|
313 |
sequence = ('name', 'membership_status', 'creation_date', 'end_date',
|
|
317 | 314 |
'members_count_f', 'project_action') |
318 | 315 |
attrs = {'id': 'projects-list', 'class': 'my-projects alt-style'} |
319 | 316 |
template = "im/table_render.html" |
320 | 317 |
empty_text = _('No projects') |
321 |
exclude = ('start_date', ) |
|
322 | 318 |
|
323 | 319 |
|
324 | 320 |
def member_action_extra_context(membership, table, col): |
Also available in: Unified diff