fairdm.contrib.collections.tables#
Table classes and column helpers for sample and measurement listings.
Module Contents#
Classes#
Base table for all listings, adding type-based column classes and header tooltips. |
|
Listing table for samples. |
|
Listing table for measurements. |
Functions#
Render a concept many-to-many value as comma-separated links. |
Data#
API#
- render_concept_many_to_many(value)[source]#
Render a concept many-to-many value as comma-separated links.
Args: value: The related manager for the concept field.
Returns: HTML with one link per concept, or an empty string when there are none.
- field_map#
None
- class BaseTable(*args, **kwargs)[source]#
Bases:
django_tables2.TableBase table for all listings, adding type-based column classes and header tooltips.
Args: *args: Passed to
django_tables2.Table. **kwargs: Passed todjango_tables2.Table.Attributes: id: The hidden UUID column. dataset: The dataset icon column.
Initialization
- id#
‘Column(…)’
- dataset#
‘Column(…)’
- render_dataset(value)[source]#
Link the dataset icon unless the dataset is private.
A published dataset can still be private, and its records stay in the listing without a link to a page the visitor cannot read.
- class SampleTable(*args, **kwargs)[source]#
Bases:
fairdm.contrib.collections.tables.BaseTableListing table for samples.
Initialization
- name#
‘Column(…)’
- latitude#
‘Column(…)’
- longitude#
‘Column(…)’