diff --git a/models/db_widgets.py b/models/db_widgets.py index 763bcd41c3a7b640668a8ea6ab5e406b61f21183..4be76325c99d6cb42976ed8d7f1eff4cea82e9f2 100644 --- a/models/db_widgets.py +++ b/models/db_widgets.py @@ -122,6 +122,19 @@ tpl = ['{PublicationsTitle}<br>', '<tpl if="PublicationsLast_page">-{PublicationsLast_page}</tpl>', '</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 > 1">{ReportsType}, </tpl>', + '{PublicationsReport_numbers}', + '</tpl>', + '<br>Auteurs CPPM : {PublicationsAuthors_cppm}' ] hidden = ['title', @@ -130,64 +143,21 @@ hidden = ['title', 'id_publishers', 'doi', 'volume', -# 'year', 'first_page', 'last_page', - 'e_print'] - -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', + 'e_print', + 'conference_title', 'conference_url', 'conference_start', 'conference_end', 'conference_town', 'id_countries', - 'conference_speaker'] - -pgm.customize_grid_with_template_column('publications', T('Conference'), tpl, - 2, - hidden, - width=350) - -# add a template column handling the report information -tpl = ['<tpl if="PublicationsReport_numbers">{PublicationsReport_numbers}', - '<tpl if="PublicationsId_reports > 1"><br>{ReportsType}', - '</tpl>'] + 'conference_speaker', + 'report_numbers', + 'id_reports', + 'authors_cppm'] -hidden = ['report_numbers', 'id_reports'] - -pgm.customize_grid_with_template_column('publications', T('Report'), tpl, - 3, - hidden, - width=300) - -# add a template column handling CPPM information -tpl = ['{PublicationsAuthors_cppm}', - '<tpl if="PublicationsId_teams > 1"><br>%s : {TeamsTeam}</tpl>' % T('Team'), - '<tpl if="PublicationsId_projects > 1"><br>%s : {ProjectsProject}</tpl>' % T('Project'), - '<tpl if="PublicationsId_categories_aeres > 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) +pgm.customize_grid_with_template_column('publications', T('Publication'), tpl, + 1, + hidden, + width=700)