From a8b8d3d927bd7834626065a1b1af967291e0ab4f Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Fri, 10 Feb 2023 18:19:33 +0100 Subject: [PATCH] fix --- .../admin/research/researchers/index.html.erb | 16 ++++++++++------ .../admin/research/researchers/show.html.erb | 2 +- app/views/admin/university/people/_form.html.erb | 4 ++-- config/locales/research/en.yml | 4 +++- config/locales/research/fr.yml | 4 +++- config/locales/university/en.yml | 3 +++ config/locales/university/fr.yml | 3 +++ 7 files changed, 25 insertions(+), 11 deletions(-) diff --git a/app/views/admin/research/researchers/index.html.erb b/app/views/admin/research/researchers/index.html.erb index 8dd753f09..dbb4ad373 100644 --- a/app/views/admin/research/researchers/index.html.erb +++ b/app/views/admin/research/researchers/index.html.erb @@ -8,8 +8,10 @@ <tr> <th><%= University::Person.human_attribute_name('name') %></th> <th><%= University::Person.human_attribute_name('first_name') %></th> - <th></th> - <th><%= t('research.number_of_papers') %></th> + <th><%= University::Person.human_attribute_name('picture') %></th> + <th><%= Research::Publication.model_name.human(count: 2) %></th> + <th><%= Research::Journal::Paper.model_name.human(count: 2) %></th> + <th width="160"></th> </tr> </thead> @@ -18,11 +20,14 @@ <tr> <td><%= link_to researcher.last_name, admin_research_researcher_path(researcher) %></td> <td><%= link_to researcher.first_name, admin_research_researcher_path(researcher) %></td> - <td class="p-0"> - <%= kamifusen_tag researcher.best_picture, - width: 40 if researcher.best_picture.attached? %> + <td> + <% if researcher.best_picture.attached? #&& researcher.best_picture.variable? %> + <%= kamifusen_tag researcher.best_picture, width: 60 %> + <% end %> </td> + <td><%= researcher.research_publications.count %></td> <td><%= researcher.research_journal_papers.count %></td> + <td></td> </tr> <% end %> </tbody> @@ -31,7 +36,6 @@ <%= paginate @researchers, theme: 'bootstrap-5' %> - <% content_for :action_bar_right do %> <%= link_to t('research.manage_researchers'), admin_university_people_path, class: button_classes if can?(:read, University::Person) %> <% end %> diff --git a/app/views/admin/research/researchers/show.html.erb b/app/views/admin/research/researchers/show.html.erb index c0182f974..c4811e1bb 100644 --- a/app/views/admin/research/researchers/show.html.erb +++ b/app/views/admin/research/researchers/show.html.erb @@ -15,7 +15,7 @@ <%= render 'admin/research/publications/list', publications: @researcher.research_publications.ordered %> </div> <% else %> - <p>Vous n'avez pas d'identifiant HAL. Est-ce l'une des possibilités suivantes ?<p> + <p><%= t 'research.hal.select_identifier' %><p> <ul class="list-unstyled"> <% @possible_hal_authors.each do |author| %> <li> diff --git a/app/views/admin/university/people/_form.html.erb b/app/views/admin/university/people/_form.html.erb index f471a9c08..8080b66f1 100644 --- a/app/views/admin/university/people/_form.html.erb +++ b/app/views/admin/university/people/_form.html.erb @@ -74,7 +74,7 @@ </div> </div> <% end %> - <%= osuny_panel 'HAL' do %> + <%= osuny_panel t('research.hal.title') do %> <div class="row"> <div class="col-xxl-6"> <%= f.input :hal_doc_identifier %> @@ -86,7 +86,7 @@ <%= f.input :hal_form_identifier %> </div> </div> - <% end %> + <% end if person.is_researcher? %> <%= osuny_panel University::Person.human_attribute_name('abilities') do %> <div class="row pure__row--small"> <div class="col-xxl-6"> diff --git a/config/locales/research/en.yml b/config/locales/research/en.yml index 35b8979cb..ad911f488 100644 --- a/config/locales/research/en.yml +++ b/config/locales/research/en.yml @@ -85,8 +85,10 @@ en: description: text: La recherche scientifique est, à la fois, une démarche créatrice de connaissances motivée par la curiosité pure et une activité génératrice d’innovations qui augmentent les moyens d’action et de diagnostic sur la nature, l’homme et la société. Ces deux aspects de la recherche, le fondamental et l’appliqué, loin de s’opposer, sont complémentaires l’un de l’autre. La recherche fondamentale crée le socle de connaissances à partir duquel naissent les applications et, inversement, les avancées technologiques procurent les outils d’investigation de plus en plus perfectionnés qui conduisent à approfondir nos connaissances fondamentales. source: Serge Haroche, Prix Nobel de physique 2012 + hal: + title: HAL + select_identifier: You have no HAL identifier yet. Is it one of these possibilities? If there are several, please choose the most complete one (without -0 at the end). manage_researchers: Managege researchers - number_of_papers: Number of papers researchers: one: Researcher other: Researchers diff --git a/config/locales/research/fr.yml b/config/locales/research/fr.yml index 09b50c565..dc0a44e65 100644 --- a/config/locales/research/fr.yml +++ b/config/locales/research/fr.yml @@ -85,8 +85,10 @@ fr: description: text: La recherche scientifique est, à la fois, une démarche créatrice de connaissances motivée par la curiosité pure et une activité génératrice d’innovations qui augmentent les moyens d’action et de diagnostic sur la nature, l’homme et la société. Ces deux aspects de la recherche, le fondamental et l’appliqué, loin de s’opposer, sont complémentaires l’un de l’autre. La recherche fondamentale crée le socle de connaissances à partir duquel naissent les applications et, inversement, les avancées technologiques procurent les outils d’investigation de plus en plus perfectionnés qui conduisent à approfondir nos connaissances fondamentales. source: Serge Haroche, Prix Nobel de physique 2012 + hal: + title: HAL + select_identifier: Vous n'avez pas d'identifiant HAL. Est-ce l'une des possibilités suivantes ? S'il y a plusieurs possibilités, choisissez l'identifiant le plus complet (sans 0 à la fin). manage_researchers: Gérer les chercheur·e·s - number_of_papers: Nombre de papiers researchers: one: Chercheur·e other: Chercheur·e·s diff --git a/config/locales/university/en.yml b/config/locales/university/en.yml index 4441cc810..55a848dbc 100644 --- a/config/locales/university/en.yml +++ b/config/locales/university/en.yml @@ -46,6 +46,9 @@ en: male: Male non_binary: Non binary habilitation: Can direct research? + hal_doc_identifier: Doc identifier + hal_form_identifier: Form identifier + hal_person_identifier: Person identifier is_administration: Administrative staff is_alumnus: Alumnus is_author: Author diff --git a/config/locales/university/fr.yml b/config/locales/university/fr.yml index 9afa52af0..9f07ec6b2 100644 --- a/config/locales/university/fr.yml +++ b/config/locales/university/fr.yml @@ -46,6 +46,9 @@ fr: male: Masculin non_binary: Non binaire habilitation: Peut diriger des recherches ? + hal_doc_identifier: Identifiant doc + hal_form_identifier: Identifiant form + hal_person_identifier: Identifiant person is_administration: Personnel administratif is_alumnus: Alumnus is_author: Auteur·rice -- GitLab