Skip to content
Snippets Groups Projects
Commit 11752ff0 authored by Renaud Le Gac's avatar Renaud Le Gac
Browse files

refactorize the column publication.

parent 4e4465f2
No related branches found
No related tags found
No related merge requests found
...@@ -122,6 +122,19 @@ tpl = ['{PublicationsTitle}<br>', ...@@ -122,6 +122,19 @@ tpl = ['{PublicationsTitle}<br>',
'<tpl if="PublicationsLast_page">-{PublicationsLast_page}</tpl>', '<tpl if="PublicationsLast_page">-{PublicationsLast_page}</tpl>',
'</tpl>', '</tpl>',
'<tpl if="PublicationsE_print"><br>{PublicationsE_print}</tpl>', '<tpl if="PublicationsE_print"><br>{PublicationsE_print}</tpl>',
'<tpl if="PublicationsConference_title"><br><br>{PublicationsConference_title}',
'<tpl if="PublicationsConference_town"><br>{PublicationsConference_town}</tpl>',
'<tpl if="CountriesCountry">, {CountriesCountry}</tpl>',
'<tpl if="PublicationsConference_start">, {PublicationsConference_start}</tpl>',
'<tpl if="PublicationsConference_end"> - {PublicationsConference_end}</tpl>',
'<tpl if="PublicationsConference_url"><br>{PublicationsConference_url}</tpl>',
'<br>%s: {PublicationsConference_speaker}' % T('Speaker'),
'</tpl>',
'<tpl if="PublicationsReport_numbers"><br><br>',
'<tpl if="PublicationsId_reports &gt; 1">{ReportsType}, </tpl>',
'{PublicationsReport_numbers}',
'</tpl>',
'<br>Auteurs CPPM : {PublicationsAuthors_cppm}'
] ]
hidden = ['title', hidden = ['title',
...@@ -130,64 +143,21 @@ hidden = ['title', ...@@ -130,64 +143,21 @@ hidden = ['title',
'id_publishers', 'id_publishers',
'doi', 'doi',
'volume', 'volume',
# 'year',
'first_page', 'first_page',
'last_page', 'last_page',
'e_print'] 'e_print',
'conference_title',
pgm.customize_grid_with_template_column('publications', T('Publication'), tpl,
1,
hidden,
width=350)
# add a template column handling the conference information
tpl = ['<tpl if="PublicationsConference_title">{PublicationsConference_title}',
'<tpl if="PublicationsConference_town"><br>{PublicationsConference_town}',
'<tpl if="CountriesCountry">, {CountriesCountry}</tpl>',
'<tpl if="PublicationsConference_start"><br>{PublicationsConference_start}</tpl>',
'<tpl if="PublicationsConference_end"> - {PublicationsConference_end}</tpl>',
'<tpl if="PublicationsConference_url"><br>{PublicationsConference_url}</tpl>',
'<br>%s: {PublicationsConference_speaker}' % T('Speaker'),
'</tpl>']
hidden = ['conference_title',
'conference_url', 'conference_url',
'conference_start', 'conference_start',
'conference_end', 'conference_end',
'conference_town', 'conference_town',
'id_countries', 'id_countries',
'conference_speaker'] 'conference_speaker',
'report_numbers',
pgm.customize_grid_with_template_column('publications', T('Conference'), tpl, 'id_reports',
2, 'authors_cppm']
hidden,
width=350)
# add a template column handling the report information
tpl = ['<tpl if="PublicationsReport_numbers">{PublicationsReport_numbers}',
'<tpl if="PublicationsId_reports &gt; 1"><br>{ReportsType}',
'</tpl>']
hidden = ['report_numbers', 'id_reports'] pgm.customize_grid_with_template_column('publications', T('Publication'), tpl,
1,
pgm.customize_grid_with_template_column('publications', T('Report'), tpl, hidden,
3, width=700)
hidden,
width=300)
# add a template column handling CPPM information
tpl = ['{PublicationsAuthors_cppm}',
'<tpl if="PublicationsId_teams &gt; 1"><br>%s : {TeamsTeam}</tpl>' % T('Team'),
'<tpl if="PublicationsId_projects &gt; 1"><br>%s : {ProjectsProject}</tpl>' % T('Project'),
'<tpl if="PublicationsId_categories_aeres &gt; 1"><br>AERES : {Categories_aeresCode}</tpl>']
hidden = ['authors_cppm',
'id_teams',
'id_projects',
'id_categories_aeres']
pgm.customize_grid_with_template_column('publications', 'CPPM',
tpl,
4,
hidden,
width=200)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment