Commit f6f99700 authored by Rémy Lebrun's avatar Rémy Lebrun

add study view in obs table and session detail

parent 6b854b18
......@@ -1345,6 +1345,7 @@ class SightingTable(tables.Table):
PLACETYPE, accessor='session.place.type.descr', verbose_name='Type de localité', exclude_from_export=True)
session = tables.LinkColumn('sights:session_detail', args=[
A('session.id_session')], accessor='session.name')
study = tables.Column(accessor='session.study', verbose_name=_('Etude'), exclude_from_export=True)
municipality = tables.Column(accessor='session.place.municipality',verbose_name=_('Commune'), exclude_from_export=True)
export_x = tables.Column(accessor='session.place.geom.x', verbose_name='X', attrs={
'th': {'style': 'display: none;'}, 'td': {'style': 'display:none;'}
......@@ -1372,7 +1373,7 @@ class SightingTable(tables.Table):
attrs = {'class': 'table table-striped table-condensed'}
# exclude_column = ('actions', 'session.place.municipality', 'comment')
fields = (
'id','actions', 'common_name_fr', 'sci_name','sp_true', 'total_count', 'breed_colo', 'session', 'session.date_start',
'id','actions', 'common_name_fr', 'sci_name','sp_true', 'total_count', 'breed_colo', 'session', 'study', 'session.date_start',
'period', 'session.contact.descr', 'place', 'placetype', 'municipality','export_placetype', 'export_municipality', 'export_territory', 'export_x', 'export_y',
'created_by', 'comment', 'export_comment')
......
......@@ -100,6 +100,12 @@
{% endif %}
</div>
</div>
<div class="col-lg-12">
<label>Étude</label>
<div class="well well-sm">
{% if object.study %}{{ object.study }}{% else %} Session non-attribuée à une étude {% endif %}
</div>
</div>
{% if object.is_confidential %}
<div class="col-lg-12">
<div class="alert alert-danger" role="alert">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment