mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 17:25:44 +00:00
28 lines
900 B
Python
28 lines
900 B
Python
|
from flask_table import Table, Col, LinkCol
|
||
|
|
||
|
|
||
|
class JobInputTable(Table):
|
||
|
"""
|
||
|
Declares the table describing colum by column.
|
||
|
"""
|
||
|
classes = ['highlight', 'responsive-table']
|
||
|
filename = Col('Filename', column_html_attrs={'class': 'filename'},
|
||
|
th_html_attrs={'class': 'sort',
|
||
|
'data-sort': 'filename'})
|
||
|
url = LinkCol('Download', 'jobs.download_job_input',
|
||
|
url_kwargs=dict(job_id='job.id',
|
||
|
job_input_id='input_id'),
|
||
|
anchor_attrs={'class': 'waves-effect waves-light btn-small',
|
||
|
'download': ''})
|
||
|
|
||
|
|
||
|
class JobInputItem(object):
|
||
|
"""
|
||
|
Describes one item like one row per table.
|
||
|
"""
|
||
|
|
||
|
def __init__(self, filename, job, input_id):
|
||
|
self.filename = filename
|
||
|
self.job = job
|
||
|
self.input_id = input_id
|