Changeset 11826 for main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
- Timestamp:
- 29 Sep 2014, 05:32:52 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r11794 r11826 216 216 status = job.failed and 'FAILED' or status 217 217 start_time = getattr(job, 'begin_after', None) 218 time_delta = None 218 219 if start_time: 219 start_time = start_time.astimezone( 220 getUtility( 221 IKofaUtils).tzinfo).strftime("%Y-%m-%d %H:%M:%S %Z") 220 tz = getUtility(IKofaUtils).tzinfo 221 time_delta = datetime.now(tz) - start_time 222 start_time = start_time.astimezone(tz).strftime( 223 "%Y-%m-%d %H:%M:%S %Z") 222 224 download_url = view.url(view.context, 'download_export', 223 225 data=dict(job_id=job_id)) 226 show_download_button = job.finished and not \ 227 job.failed and time_delta and \ 228 time_delta.days < 1 224 229 new_entry = dict( 225 230 job=job_id, … … 230 235 start_time=start_time, 231 236 download_url=download_url, 232 show_download_button = (job.finished and not job.failed),237 show_download_button = show_download_button, 233 238 show_refresh_button = not job.finished, 234 239 show_discard_button = job.finished,)
Note: See TracChangeset for help on using the changeset viewer.