Ignore:
Timestamp:
21 Dec 2012, 13:09:05 (12 years ago)
Author:
Henrik Bettermann
Message:

Extend IExportJob so that AsyncExportJobs? unveil their status like AsyncReportJobs? do. Use this property attribute to hide buttons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r9815 r9816  
    26712671            # XXX: Descr. should be improved
    26722672            descr = '%r, %r' % (job.args[1:], job.kwargs)
    2673 
    2674             # XXX: status should be replaced by 'ready', 'running' or 'FAILED'
    2675             # like in w.k.browser.reports ...
    2676             status = job.status
    2677             # ... and buttons should be displayed accordingly
    2678             show_download_button = True
    2679             show_discard_button = True
    2680             show_refresh_button = True
    2681 
    2682 
     2673            status = job.finished and 'ready' or 'running'
     2674            status = job.failed and 'FAILED' or status
     2675            show_download_button = job.finished and not job.failed
     2676            show_discard_button = job.finished
     2677            show_refresh_button = not job.finished
    26832678            start_time = getattr(job, 'begin_after', None)
    26842679            if start_time:
Note: See TracChangeset for help on using the changeset viewer.