mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 09:15:41 +00:00
29 lines
982 B
Python
29 lines
982 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-floating',
|
|
'download': ''},
|
|
text_fallback='<i class="material-icons">file_download</i>')
|
|
|
|
|
|
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
|