diff --git a/Gemfile b/Gemfile index 327f358c466fa70f93d266df4914a1fbe647b145..3965ec4501bc74ed118980561f109216a452ec8a 100644 --- a/Gemfile +++ b/Gemfile @@ -27,6 +27,8 @@ gem "font-awesome-sass" gem "front_matter_parser" gem "gdpr" gem "gitlab" +gem "hal_openscience", "~> 0.1" +# gem "hal_openscience", path: "../hal_openscience" gem "has_scope", "~> 0.8.0" gem "hash_dot" gem "image_processing" diff --git a/Gemfile.lock b/Gemfile.lock index fb1b1ce7973b280eb36202aa9e5c3c3468e1937c..2d5afe7f2c7fc9695c119d4085b58e1a736cc517 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -226,6 +226,10 @@ GEM terminal-table (>= 1.5.1) globalid (1.0.0) activesupport (>= 5.0) + hal_openscience (0.1.0) + json + net-http + open-uri has_scope (0.8.0) actionpack (>= 5.2) activesupport (>= 5.2) @@ -307,6 +311,8 @@ GEM mustermann (3.0.0) ruby2_keywords (~> 0.0.1) nesty (1.0.2) + net-http (0.3.2) + uri net-imap (0.3.4) date net-protocol @@ -343,6 +349,10 @@ GEM omniauth-saml (2.1.0) omniauth (~> 2.0) ruby-saml (~> 1.12) + open-uri (0.3.0) + stringio + time + uri orm_adapter (0.5.0) pexels (0.5.0) requests (~> 1.0.2) @@ -467,10 +477,13 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) + stringio (3.0.4) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) thor (1.2.1) tilt (2.0.11) + time (0.2.1) + date timeout (0.3.1) typhoeus (1.4.0) ethon (>= 0.9.0) @@ -485,6 +498,7 @@ GEM faraday-multipart (~> 1.0.4) httparty (~> 0.20) oauth2 (>= 2.0.8) + uri (0.12.0) vcr (6.1.0) version_gem (1.1.1) warden (1.2.9) @@ -546,6 +560,7 @@ DEPENDENCIES front_matter_parser gdpr gitlab + hal_openscience (~> 0.1) has_scope (~> 0.8.0) hash_dot image_processing diff --git a/app/controllers/admin/research/publications_controller.rb b/app/controllers/admin/research/publications_controller.rb new file mode 100644 index 0000000000000000000000000000000000000000..8f78f046d986c20aee6da2c0ce2ad2a05ad18db5 --- /dev/null +++ b/app/controllers/admin/research/publications_controller.rb @@ -0,0 +1,31 @@ +class Admin::Research::PublicationsController < Admin::Research::ApplicationController + before_action :load_publication, except: :index + + def index + @publications = Research::Publication.ordered.page(params[:page]) + breadcrumb + end + + def show + breadcrumb + end + + def static + @about = @publication + render layout: false + end + + protected + + def load_publication + @publication = Research::Publication.find params[:id] + end + + def breadcrumb + super + add_breadcrumb Research::Publication.model_name.human(count: 2), + admin_research_publications_path + breadcrumb_for @publication + end + +end diff --git a/app/controllers/admin/research/researchers_controller.rb b/app/controllers/admin/research/researchers_controller.rb index 3d5a8b239b92d8c99255f28f800b5956918d597e..a96265b0cf05169b47da7655f8e677c871546bfd 100644 --- a/app/controllers/admin/research/researchers_controller.rb +++ b/app/controllers/admin/research/researchers_controller.rb @@ -1,4 +1,5 @@ class Admin::Research::ResearchersController < Admin::Research::ApplicationController + before_action :load_researcher, except: :index has_scope :for_search_term @@ -13,18 +14,35 @@ class Admin::Research::ResearchersController < Admin::Research::ApplicationContr end def show - @researcher = current_university.people - .for_language_id(current_university.default_language_id) - .researchers - .accessible_by(current_ability) - .find(params[:id]) + @papers = @researcher.research_journal_papers.ordered.page(params[:page]) + @possible_hal_authors = @researcher.possible_hal_authors unless @researcher.hal_identity? @papers = @researcher.research_journal_papers.ordered.page(params[:page]) breadcrumb add_breadcrumb @researcher end + def update + [ + :hal_doc_identifier, + :hal_form_identifier, + :hal_person_identifier + ].each do |key| + @researcher.update_column key, params[key] if params.has_key?(key) + end + @researcher.import_research_publications_from_hal_without_delay! + redirect_to admin_research_researcher_path(@researcher) + end + protected + def load_researcher + @researcher = current_university.people + .for_language_id(current_university.default_language_id) + .researchers + .accessible_by(current_ability) + .find(params[:id]) + end + def breadcrumb super add_breadcrumb t('research.researchers', count: 2), admin_research_researchers_path diff --git a/app/controllers/admin/university/people_controller.rb b/app/controllers/admin/university/people_controller.rb index 70a88c18ee0b842a8abe9380540d6f0497eb6360..8df8bb77175192afcc4e18f1f758bc926cb0b251 100644 --- a/app/controllers/admin/university/people_controller.rb +++ b/app/controllers/admin/university/people_controller.rb @@ -94,7 +94,7 @@ class Admin::University::PeopleController < Admin::University::ApplicationContro :biography, :picture, :picture_delete, :picture_infos, :habilitation, :tenure, :url, :linkedin, :twitter, :mastodon, :is_researcher, :is_teacher, :is_administration, :is_alumnus, - :user_id + :hal_person_identifier, :hal_doc_identifier, :hal_form_identifier, :user_id ).merge(university_id: current_university.id) end end diff --git a/app/models/ability.rb b/app/models/ability.rb index b24bc2bb17794741a7af1f469bfa13790ef97723..c926276058f5f30fa4903246573c466c638918b4 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -18,12 +18,14 @@ class Ability can :read, Communication::Website, university_id: @user.university_id, id: managed_websites_ids can :manage, Communication::Website::Post, university_id: @user.university_id, communication_website_id: managed_websites_ids, author_id: @user.person&.id cannot :publish, Communication::Website::Post + can :manage, Research::Journal end def author managed_websites_ids = @user.websites_to_manage.pluck(:communication_website_id) can :read, Communication::Website, university_id: @user.university_id, id: managed_websites_ids can :manage, Communication::Website::Post, university_id: @user.university_id, communication_website_id: managed_websites_ids, author_id: @user.person&.id + can :manage, Research::Journal end def teacher @@ -34,6 +36,7 @@ class Ability can :manage, University::Person::Involvement, person_id: @user.person&.id can :read, University::Person::Involvement, university_id: @user.university_id can :manage, Communication::Block, university_id: @user.university_id, about_type: 'Education::Program', about_id: Education::Program.where(university_id: @user.university_id).pluck(:id) + can :manage, Research::Journal end def program_manager @@ -48,6 +51,7 @@ class Ability can :manage, Communication::Website::Post, university_id: @user.university_id can :manage, Communication::Block, university_id: @user.university_id, about_type: 'Education::Program', about_id: managed_programs_ids can :create, Communication::Block + can :manage, Research::Journal end def website_manager @@ -66,6 +70,7 @@ class Ability can :manage, Communication::Block, university_id: @user.university_id, about_type: 'Communication::Website::Page', about_id: managed_pages_ids can :manage, Communication::Block, university_id: @user.university_id, about_type: 'Communication::Website::Post', about_id: managed_posts_ids can :create, Communication::Block + can :manage, Research::Journal end def admin diff --git a/app/models/communication/website/permalink/researcher.rb b/app/models/communication/website/permalink/researcher.rb index 3de1e44b111d506e1db1b9f75e6fb574a44b3f1a..c0b045b8294fd5bb9f25e1859bb87c580eb0deb6 100644 --- a/app/models/communication/website/permalink/researcher.rb +++ b/app/models/communication/website/permalink/researcher.rb @@ -32,7 +32,7 @@ class Communication::Website::Permalink::Researcher < Communication::Website::Pe :researchers end - # /equipe/:slug/papers/ + # /equipe/:slug/publications/ # FIXME def self.pattern_in_website(website, language) "/#{website.special_page(Communication::Website::Page::Person, language: language).slug_with_ancestors}/:slug/papers/" diff --git a/app/models/research.rb b/app/models/research.rb index 5dff8b662c433a3f0c2b52352e95a4a2c311f73f..0c9050ee5598f8415c07587e3041291f8958a9fe 100644 --- a/app/models/research.rb +++ b/app/models/research.rb @@ -12,6 +12,7 @@ module Research [Research::Laboratory, :admin_research_laboratories_path], [Research::Thesis, :admin_research_theses_path], [Research::Journal, :admin_research_journals_path], + [Research::Publication, :admin_research_publications_path], ] end end diff --git a/app/models/research/publication.rb b/app/models/research/publication.rb new file mode 100644 index 0000000000000000000000000000000000000000..3fd2eaa29a0b8c495040f8e428a20a62b17b40dd --- /dev/null +++ b/app/models/research/publication.rb @@ -0,0 +1,81 @@ +# == Schema Information +# +# Table name: research_publications +# +# id :uuid not null, primary key +# data :jsonb +# docid :string indexed +# doi :string +# hal_url :string +# publication_date :date +# ref :string +# slug :string +# title :string +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# +# Indexes +# +# index_research_publications_on_docid (docid) +# +class Research::Publication < ApplicationRecord + include WithGit + include WithSlug + + DOI_PREFIX = 'http://dx.doi.org/'.freeze + + has_and_belongs_to_many :research_people, + class_name: 'University::Person', + foreign_key: 'university_person_id', + association_foreign_key: 'research_publication_id' + alias :researchers :research_people + + before_destroy { research_people.clear } + + validates_presence_of :docid + + scope :ordered, -> { order(publication_date: :desc)} + + def self.create_from(doc) + publication = where(docid: doc.docid).first_or_create + puts "pub-- #{where(docid: doc.docid).count}" + publication.title = doc.title_s.first + publication.ref = doc.attributes['citationRef_s'] + publication.hal_url = doc.attributes['uri_s'] + publication.doi = doc.attributes['doiId_s'] + publication.publication_date = doc.attributes['publicationDate_tdate'] + publication.url = doc.attributes['linkExtUrl_s'] + publication.save + publication + end + + def self.update_from_hal + University::Person::Researcher.with_hal_identifier.find_each do |researcher| + puts "Loading publications for #{researcher} (#{researcher.university})" + researcher.import_research_publications_from_hal! + end + end + + def template_static + "admin/research/publications/static" + end + + def doi_url + return unless doi.present? + "#{DOI_PREFIX}#{doi}" + end + + def to_s + "#{title}" + end + + protected + + def slug_unavailable?(slug) + self.class.unscoped + .where(slug: slug) + .where.not(id: self.id) + .exists? + end +end diff --git a/app/models/university/person.rb b/app/models/university/person.rb index 55a5bbfcbbe41b83b80522de8ee226a6658b8ef2..6a84914ad3c419103ca7ee7817b8f3548ff9e03f 100644 --- a/app/models/university/person.rb +++ b/app/models/university/person.rb @@ -2,41 +2,44 @@ # # Table name: university_people # -# id :uuid not null, primary key -# address :string -# biography :text -# birthdate :date -# city :string -# country :string -# email :string -# first_name :string -# gender :integer -# habilitation :boolean default(FALSE) -# is_administration :boolean -# is_alumnus :boolean default(FALSE) -# is_author :boolean -# is_researcher :boolean -# is_teacher :boolean -# last_name :string -# linkedin :string -# mastodon :string -# meta_description :text -# name :string -# phone_mobile :string -# phone_personal :string -# phone_professional :string -# slug :string -# summary :text -# tenure :boolean default(FALSE) -# twitter :string -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# language_id :uuid not null, indexed -# original_id :uuid indexed -# university_id :uuid not null, indexed -# user_id :uuid indexed +# id :uuid not null, primary key +# address :string +# biography :text +# birthdate :date +# city :string +# country :string +# email :string +# first_name :string +# gender :integer +# habilitation :boolean default(FALSE) +# hal_doc_identifier :string +# hal_form_identifier :string +# hal_person_identifier :string +# is_administration :boolean +# is_alumnus :boolean default(FALSE) +# is_author :boolean +# is_researcher :boolean +# is_teacher :boolean +# last_name :string +# linkedin :string +# mastodon :string +# meta_description :text +# name :string +# phone_mobile :string +# phone_personal :string +# phone_professional :string +# slug :string +# summary :text +# tenure :boolean default(FALSE) +# twitter :string +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# language_id :uuid not null, indexed +# original_id :uuid indexed +# university_id :uuid not null, indexed +# user_id :uuid indexed # # Indexes # @@ -64,6 +67,7 @@ class University::Person < ApplicationRecord include WithRoles include WithBlocks include WithPermalink + include WithResearch include WithTranslations LIST_OF_ROLES = [ diff --git a/app/models/university/person/administrator.rb b/app/models/university/person/administrator.rb index 0e2fcd0e1efbd1400755ce5eee1d88dbf43451c7..c0978fc99478aea49b40d70e86cd82845c2c2dcc 100644 --- a/app/models/university/person/administrator.rb +++ b/app/models/university/person/administrator.rb @@ -2,41 +2,44 @@ # # Table name: university_people # -# id :uuid not null, primary key -# address :string -# biography :text -# birthdate :date -# city :string -# country :string -# email :string -# first_name :string -# gender :integer -# habilitation :boolean default(FALSE) -# is_administration :boolean -# is_alumnus :boolean default(FALSE) -# is_author :boolean -# is_researcher :boolean -# is_teacher :boolean -# last_name :string -# linkedin :string -# mastodon :string -# meta_description :text -# name :string -# phone_mobile :string -# phone_personal :string -# phone_professional :string -# slug :string -# summary :text -# tenure :boolean default(FALSE) -# twitter :string -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# language_id :uuid not null, indexed -# original_id :uuid indexed -# university_id :uuid not null, indexed -# user_id :uuid indexed +# id :uuid not null, primary key +# address :string +# biography :text +# birthdate :date +# city :string +# country :string +# email :string +# first_name :string +# gender :integer +# habilitation :boolean default(FALSE) +# hal_doc_identifier :string +# hal_form_identifier :string +# hal_person_identifier :string +# is_administration :boolean +# is_alumnus :boolean default(FALSE) +# is_author :boolean +# is_researcher :boolean +# is_teacher :boolean +# last_name :string +# linkedin :string +# mastodon :string +# meta_description :text +# name :string +# phone_mobile :string +# phone_personal :string +# phone_professional :string +# slug :string +# summary :text +# tenure :boolean default(FALSE) +# twitter :string +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# language_id :uuid not null, indexed +# original_id :uuid indexed +# university_id :uuid not null, indexed +# user_id :uuid indexed # # Indexes # diff --git a/app/models/university/person/alumnus.rb b/app/models/university/person/alumnus.rb index 9d0679e9203a30413d4d9e7ebfbe9d0ac818494d..4bd99ef4673019367c3dca60ca436edc512faa85 100644 --- a/app/models/university/person/alumnus.rb +++ b/app/models/university/person/alumnus.rb @@ -2,41 +2,44 @@ # # Table name: university_people # -# id :uuid not null, primary key -# address :string -# biography :text -# birthdate :date -# city :string -# country :string -# email :string -# first_name :string -# gender :integer -# habilitation :boolean default(FALSE) -# is_administration :boolean -# is_alumnus :boolean default(FALSE) -# is_author :boolean -# is_researcher :boolean -# is_teacher :boolean -# last_name :string -# linkedin :string -# mastodon :string -# meta_description :text -# name :string -# phone_mobile :string -# phone_personal :string -# phone_professional :string -# slug :string -# summary :text -# tenure :boolean default(FALSE) -# twitter :string -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# language_id :uuid not null, indexed -# original_id :uuid indexed -# university_id :uuid not null, indexed -# user_id :uuid indexed +# id :uuid not null, primary key +# address :string +# biography :text +# birthdate :date +# city :string +# country :string +# email :string +# first_name :string +# gender :integer +# habilitation :boolean default(FALSE) +# hal_doc_identifier :string +# hal_form_identifier :string +# hal_person_identifier :string +# is_administration :boolean +# is_alumnus :boolean default(FALSE) +# is_author :boolean +# is_researcher :boolean +# is_teacher :boolean +# last_name :string +# linkedin :string +# mastodon :string +# meta_description :text +# name :string +# phone_mobile :string +# phone_personal :string +# phone_professional :string +# slug :string +# summary :text +# tenure :boolean default(FALSE) +# twitter :string +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# language_id :uuid not null, indexed +# original_id :uuid indexed +# university_id :uuid not null, indexed +# user_id :uuid indexed # # Indexes # diff --git a/app/models/university/person/author.rb b/app/models/university/person/author.rb index a19bc5d64fb2f6f6cadc4f7f19e8f6c10be85611..2abf6521682dbc795a30ef64c16fecc3f92b27f1 100644 --- a/app/models/university/person/author.rb +++ b/app/models/university/person/author.rb @@ -2,41 +2,44 @@ # # Table name: university_people # -# id :uuid not null, primary key -# address :string -# biography :text -# birthdate :date -# city :string -# country :string -# email :string -# first_name :string -# gender :integer -# habilitation :boolean default(FALSE) -# is_administration :boolean -# is_alumnus :boolean default(FALSE) -# is_author :boolean -# is_researcher :boolean -# is_teacher :boolean -# last_name :string -# linkedin :string -# mastodon :string -# meta_description :text -# name :string -# phone_mobile :string -# phone_personal :string -# phone_professional :string -# slug :string -# summary :text -# tenure :boolean default(FALSE) -# twitter :string -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# language_id :uuid not null, indexed -# original_id :uuid indexed -# university_id :uuid not null, indexed -# user_id :uuid indexed +# id :uuid not null, primary key +# address :string +# biography :text +# birthdate :date +# city :string +# country :string +# email :string +# first_name :string +# gender :integer +# habilitation :boolean default(FALSE) +# hal_doc_identifier :string +# hal_form_identifier :string +# hal_person_identifier :string +# is_administration :boolean +# is_alumnus :boolean default(FALSE) +# is_author :boolean +# is_researcher :boolean +# is_teacher :boolean +# last_name :string +# linkedin :string +# mastodon :string +# meta_description :text +# name :string +# phone_mobile :string +# phone_personal :string +# phone_professional :string +# slug :string +# summary :text +# tenure :boolean default(FALSE) +# twitter :string +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# language_id :uuid not null, indexed +# original_id :uuid indexed +# university_id :uuid not null, indexed +# user_id :uuid indexed # # Indexes # diff --git a/app/models/university/person/researcher.rb b/app/models/university/person/researcher.rb index 70847b670240e2ba561b80c85c23a265ad671cbe..ede0bf421f31f36a451762c44c1fcf5433759516 100644 --- a/app/models/university/person/researcher.rb +++ b/app/models/university/person/researcher.rb @@ -2,41 +2,44 @@ # # Table name: university_people # -# id :uuid not null, primary key -# address :string -# biography :text -# birthdate :date -# city :string -# country :string -# email :string -# first_name :string -# gender :integer -# habilitation :boolean default(FALSE) -# is_administration :boolean -# is_alumnus :boolean default(FALSE) -# is_author :boolean -# is_researcher :boolean -# is_teacher :boolean -# last_name :string -# linkedin :string -# mastodon :string -# meta_description :text -# name :string -# phone_mobile :string -# phone_personal :string -# phone_professional :string -# slug :string -# summary :text -# tenure :boolean default(FALSE) -# twitter :string -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# language_id :uuid not null, indexed -# original_id :uuid indexed -# university_id :uuid not null, indexed -# user_id :uuid indexed +# id :uuid not null, primary key +# address :string +# biography :text +# birthdate :date +# city :string +# country :string +# email :string +# first_name :string +# gender :integer +# habilitation :boolean default(FALSE) +# hal_doc_identifier :string +# hal_form_identifier :string +# hal_person_identifier :string +# is_administration :boolean +# is_alumnus :boolean default(FALSE) +# is_author :boolean +# is_researcher :boolean +# is_teacher :boolean +# last_name :string +# linkedin :string +# mastodon :string +# meta_description :text +# name :string +# phone_mobile :string +# phone_personal :string +# phone_professional :string +# slug :string +# summary :text +# tenure :boolean default(FALSE) +# twitter :string +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# language_id :uuid not null, indexed +# original_id :uuid indexed +# university_id :uuid not null, indexed +# user_id :uuid indexed # # Indexes # diff --git a/app/models/university/person/teacher.rb b/app/models/university/person/teacher.rb index 48cf9b6ad66ed27815450df7384f834d2a3d19a8..515a4f47e697bd4c04a30b1f9a2aaae2abad1f46 100644 --- a/app/models/university/person/teacher.rb +++ b/app/models/university/person/teacher.rb @@ -2,41 +2,44 @@ # # Table name: university_people # -# id :uuid not null, primary key -# address :string -# biography :text -# birthdate :date -# city :string -# country :string -# email :string -# first_name :string -# gender :integer -# habilitation :boolean default(FALSE) -# is_administration :boolean -# is_alumnus :boolean default(FALSE) -# is_author :boolean -# is_researcher :boolean -# is_teacher :boolean -# last_name :string -# linkedin :string -# mastodon :string -# meta_description :text -# name :string -# phone_mobile :string -# phone_personal :string -# phone_professional :string -# slug :string -# summary :text -# tenure :boolean default(FALSE) -# twitter :string -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# language_id :uuid not null, indexed -# original_id :uuid indexed -# university_id :uuid not null, indexed -# user_id :uuid indexed +# id :uuid not null, primary key +# address :string +# biography :text +# birthdate :date +# city :string +# country :string +# email :string +# first_name :string +# gender :integer +# habilitation :boolean default(FALSE) +# hal_doc_identifier :string +# hal_form_identifier :string +# hal_person_identifier :string +# is_administration :boolean +# is_alumnus :boolean default(FALSE) +# is_author :boolean +# is_researcher :boolean +# is_teacher :boolean +# last_name :string +# linkedin :string +# mastodon :string +# meta_description :text +# name :string +# phone_mobile :string +# phone_personal :string +# phone_professional :string +# slug :string +# summary :text +# tenure :boolean default(FALSE) +# twitter :string +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# language_id :uuid not null, indexed +# original_id :uuid indexed +# university_id :uuid not null, indexed +# user_id :uuid indexed # # Indexes # diff --git a/app/models/university/person/with_research.rb b/app/models/university/person/with_research.rb new file mode 100644 index 0000000000000000000000000000000000000000..8292f37dc842d16751e6d9c6e79a6b953ed4fc40 --- /dev/null +++ b/app/models/university/person/with_research.rb @@ -0,0 +1,34 @@ +module University::Person::WithResearch + extend ActiveSupport::Concern + + included do + has_and_belongs_to_many :research_publications, + class_name: 'Research::Publication', + foreign_key: 'research_publication_id', + association_foreign_key: 'university_person_id' + alias :publications :research_publications + + scope :with_hal_identifier, -> { where.not(hal_form_identifier: [nil,'']) } + end + + def hal_identity? + hal_form_identifier.present? + end + + def import_research_publications_from_hal! + return unless hal_identity? + response = HalOpenscience::Document.search "authIdForm_i:#{hal_form_identifier}", + fields: ["docid", "title_s", "citationRef_s", "uri_s", "*"], + limit: 1000 + response.results.each do |doc| + publication = Research::Publication.create_from doc + research_publications << publication unless publication.in?(research_publications) + end + end + handle_asynchronously :import_research_publications_from_hal! + + def possible_hal_authors + HalOpenscience::Author.search(to_s, fields: ['*']).results + end + +end diff --git a/app/services/icon.rb b/app/services/icon.rb index 74100a20907d4bd425e924476849d3b7c90a3820..02c54be4f52491027e467ed55c5f3f7fea286210 100644 --- a/app/services/icon.rb +++ b/app/services/icon.rb @@ -27,6 +27,7 @@ class Icon RESEARCH_JOURNAL = 'fas fa-newspaper' RESEARCH_LABORATORY = 'fas fa-flask' RESEARCH_RESEARCHER = 'fas fa-microscope' + RESEARCH_PUBLICATION = 'fas fa-book' RESEARCH_THESE = 'fas fa-scroll' RESEARCH_WATCH = 'fas fa-eye' UNIVERSITY_PERSON_RESEARCHER = RESEARCH_RESEARCHER diff --git a/app/views/admin/research/publications/_list.html.erb b/app/views/admin/research/publications/_list.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..b03ba32612477a128d8eacbfb6c8c99eecb23cb4 --- /dev/null +++ b/app/views/admin/research/publications/_list.html.erb @@ -0,0 +1,24 @@ +<div class="table-responsive"> + <table class="<%= table_classes %>"> + <thead> + <tr> + <th><%= Research::Publication.human_attribute_name('title') %></th> + <th><%= t('research.researchers', count: 2) %></th> + </tr> + </thead> + <tbody> + <% publications.each do |publication| %> + <tr> + <td><%= link_to publication, admin_research_publication_path(publication) %></td> + <td> + <% publication.researchers.each do |researcher| %> + <%= link_to_if researcher.university == current_university, + researcher, + admin_research_researcher_path(researcher) %> + <% end %> + </td> + </tr> + <% end %> + </tbody> + </table> +</div> \ No newline at end of file diff --git a/app/views/admin/research/publications/index.html.erb b/app/views/admin/research/publications/index.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..164e21085f11a8602afb7b338d85df671c9e0c7b --- /dev/null +++ b/app/views/admin/research/publications/index.html.erb @@ -0,0 +1,5 @@ +<% content_for :title, Research::Publication.model_name.human(count: 2) %> + +<%= render 'admin/research/publications/list', publications: @publications %> + +<%= paginate @publications, theme: 'bootstrap-5' %> diff --git a/app/views/admin/research/publications/show.html.erb b/app/views/admin/research/publications/show.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..9ca0010a81330855f533496fc4bb6cdb512a2724 --- /dev/null +++ b/app/views/admin/research/publications/show.html.erb @@ -0,0 +1,19 @@ +<% content_for :title, @publication %> + +<% @publication.research_people.each do |person| %> + <%= link_to person, admin_research_researcher_path(person) %> +<% end %> + +<p><%= @publication.docid %></p> + +<div><%= sanitize @publication.ref %></div> + +<%= link_to 'url', @publication.url, target: :_blank if @publication.url %> +<%= link_to 'HAL', @publication.hal_url, target: :_blank if @publication.hal_url %> +<%= link_to 'DOI', @publication.doi_url, target: :_blank if @publication.doi_url %> + +<% content_for :action_bar_left do %> + <%= link_to t('static'), + static_admin_research_publication_path(@publication), + class: button_classes('btn-light') if current_user.server_admin? %> +<% end %> diff --git a/app/views/admin/research/publications/static.html.erb b/app/views/admin/research/publications/static.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..5910efe141522de01b82ee8447c1558390ce224e --- /dev/null +++ b/app/views/admin/research/publications/static.html.erb @@ -0,0 +1,16 @@ +--- +title: "<%= @about.title %>" +date: "<%= @about.publication_date&.iso8601 %>" +slug: "<%= @about.slug %>" +docid: "<%= @about.docid %>" +ref: > + <%= sanitize @about.ref %> +url: + hal: "<%= @about.hal_url %>" + doi: "<%= @about.doi_url %>" + raw: "<%= @about.url %>" +researchers: +<% @about.researchers.each do |researcher| %> + - <%= researcher.slug %> +<% end %> +--- diff --git a/app/views/admin/research/researchers/index.html.erb b/app/views/admin/research/researchers/index.html.erb index 8dd753f09bf0841137a842ca90250c07d928aa80..6e6def800911a49aca69bc5b826ac3432eaa04d1 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 a0ce646b92bb51bba8173d3dfe3d80939fb24486..c4811e1bb07962219650f4ab2258f7387d33b9b0 100644 --- a/app/views/admin/research/researchers/show.html.erb +++ b/app/views/admin/research/researchers/show.html.erb @@ -9,6 +9,28 @@ <% end %> <% end %> +<%= osuny_panel Research::Publication.model_name.human(count: 2), action: @researcher.research_publications.count do %> + <% if @researcher.hal_identity? %> + <div class="table-responsive"> + <%= render 'admin/research/publications/list', publications: @researcher.research_publications.ordered %> + </div> + <% else %> + <p><%= t 'research.hal.select_identifier' %><p> + <ul class="list-unstyled"> + <% @possible_hal_authors.each do |author| %> + <li> + <%= link_to admin_research_researcher_path( @researcher, + hal_doc_identifier: author.docid, + hal_form_identifier: author.attributes['form_i'], + hal_person_identifier: author.attributes['person_i']), method: :put do %> + <%= author.fullName_s %> (<%= author.docid %>) + <% end %> + </li> + <% end %> + </ul> + <% end %> +<% end %> + <% content_for :action_bar_right do %> <%= edit_link @researcher %> <% end %> diff --git a/app/views/admin/university/people/_form.html.erb b/app/views/admin/university/people/_form.html.erb index 655df3b1316a5bfc2e2d21f68f0afa06dc5391cf..8080b66f100e303d4053bd68849e063339a13179 100644 --- a/app/views/admin/university/people/_form.html.erb +++ b/app/views/admin/university/people/_form.html.erb @@ -3,7 +3,7 @@ <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> <div class="row"> - <div class="col-md-8"> + <div class="col-lg-8"> <%= osuny_panel University::Person.human_attribute_name('essentials') do %> <div class="row pure__row--small"> <div class="col-xxl-6"> @@ -74,6 +74,19 @@ </div> </div> <% end %> + <%= osuny_panel t('research.hal.title') do %> + <div class="row"> + <div class="col-xxl-6"> + <%= f.input :hal_doc_identifier %> + </div> + <div class="col-xxl-6"> + <%= f.input :hal_person_identifier %> + </div> + <div class="col-xxl-6"> + <%= f.input :hal_form_identifier %> + </div> + </div> + <% 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"> @@ -89,7 +102,7 @@ </div> <% end %> </div> - <div class="col-md-4"> + <div class="col-lg-4"> <%= osuny_panel t('metadata') do %> <%= f.input :slug, as: :string, diff --git a/app/views/admin/university/people/static.html.erb b/app/views/admin/university/people/static.html.erb index 704e0df4a895bbc61dda4e4bb4808f30728f96b4..48da801d9bdcca6973bde9478edb075dadd419f7 100644 --- a/app/views/admin/university/people/static.html.erb +++ b/app/views/admin/university/people/static.html.erb @@ -74,6 +74,21 @@ administrative_missions: <%= target.current_permalink_in_website(@website)&.path if target.respond_to? :current_permalink_in_website %> <% end %> <% end %> +<% if @about.publications.any? %> +publications: +<% @about.publications.each do |publication| %> + - title: > + <%= prepare_text_for_static publication.title %> + ref: > + <%= prepare_html_for_static publication.ref, @website.university %> + url: > + <%= prepare_text_for_static publication.url %> + hal_url: > + <%= prepare_text_for_static publication.hal_url %> + doi_url: > + <%= prepare_text_for_static publication.doi_url %> +<% end %> +<% end %> <%= render 'admin/communication/blocks/static', about: @about %> --- <%= prepare_html_for_static @about.biography, @about.university %> diff --git a/config/admin_navigation.rb b/config/admin_navigation.rb index bbedb8f6afa221e367fecb08a512656a73e7bce4..f4e11299d9c6bcb52d99ce607a380cfa9a8ef7d6 100644 --- a/config/admin_navigation.rb +++ b/config/admin_navigation.rb @@ -27,7 +27,7 @@ SimpleNavigation::Configuration.run do |navigation| primary.item :education, 'Feedbacks', nil, { icon: Icon::EDUCATION_FEEDBACKS } end - if can?(:read, Research::Journal) || can?(:read, Research::Laboratory) + if can?(:read, Research::Journal) || can?(:read, Research::Publication) || can?(:read, Research::Laboratory) primary.item :research, Research.model_name.human, admin_research_root_path, { kind: :header, image: 'admin/research-thumb.jpg' } load_from_parts Research, primary primary.item :research_watch, 'Veille', nil, { icon: Icon::RESEARCH_WATCH } diff --git a/config/locales/research/en.yml b/config/locales/research/en.yml index 26577b2f1ffd753b091fb49770cf7e3b90683c02..1788650bb93ae6f41e6f8969055f29c7f074de09 100644 --- a/config/locales/research/en.yml +++ b/config/locales/research/en.yml @@ -25,6 +25,9 @@ en: research/laboratory/axis: one: Axis other: Axes + research/publication: + one: Publication + other: Publications research/thesis: one: Thesis other: Theses @@ -66,6 +69,9 @@ en: name: Name short_name: Short name text: Text + research/publication: + title: Title + description: Publications scientifiques importées automatiquement de HAL research/thesis: abstract: Abstract author: Author @@ -77,11 +83,13 @@ en: started_at: Started at title: Title research: - description: + 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 50d77a62e8605784e38c19161977c2efed64c085..793af9b89289294f1c6aa38ddeab5e667d40fbdf 100644 --- a/config/locales/research/fr.yml +++ b/config/locales/research/fr.yml @@ -25,6 +25,9 @@ fr: research/laboratory/axis: one: Axe other: Axes + research/publication: + one: Publication + other: Publications research/thesis: one: Thèse other: Thèses @@ -66,6 +69,9 @@ fr: name: Nom short_name: Nom court text: Texte + research/publication: + title: Titre + description: Publications scientifiques importées automatiquement de HAL research/thesis: abstract: Résumé author: Auteur·rice @@ -77,11 +83,13 @@ fr: started_at: Commencée le title: Titre research: - description: + 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 3166e83da27751f229ecd9ca11098c0649f0c347..e379782d10e5dcad662ac08e502acabb48e37bbc 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 2b35938e8ba4ee58d3a27b3158f606309942260c..e27af33f636acd2ce38a7bd662c4108628ab29a1 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 diff --git a/config/routes/admin/research.rb b/config/routes/admin/research.rb index 6dd73443e9b56f0d4fd94e58f00802c3ec9cc20d..521c188e84c99b471987b3fca4888931da4b623d 100644 --- a/config/routes/admin/research.rb +++ b/config/routes/admin/research.rb @@ -1,5 +1,10 @@ namespace :research do - resources :researchers, only: [:index, :show] + resources :researchers, only: [:index, :show, :update] + resources :publications, only: [:index, :show] do + member do + get :static + end + end resources :journals do resources :volumes, controller: 'journals/volumes' do member do diff --git a/db/migrate/20230113094502_add_hal_id_to_university_persons.rb b/db/migrate/20230113094502_add_hal_id_to_university_persons.rb new file mode 100644 index 0000000000000000000000000000000000000000..7f4762601759f93cd9a13f3c43ced00deb5fc70a --- /dev/null +++ b/db/migrate/20230113094502_add_hal_id_to_university_persons.rb @@ -0,0 +1,5 @@ +class AddHalIdToUniversityPersons < ActiveRecord::Migration[7.0] + def change + add_column :university_people, :hal_person_identifier, :string + end +end diff --git a/db/migrate/20230113132451_create_research_documents.rb b/db/migrate/20230113132451_create_research_documents.rb new file mode 100644 index 0000000000000000000000000000000000000000..e085910c2e2951926b3d35c0953b5aefd1398952 --- /dev/null +++ b/db/migrate/20230113132451_create_research_documents.rb @@ -0,0 +1,15 @@ +class CreateResearchDocuments < ActiveRecord::Migration[7.0] + def change + create_table :research_documents, id: :uuid do |t| + t.references :university, null: false, foreign_key: true, type: :uuid + t.references :university_person, null: false, foreign_key: true, type: :uuid + t.string :docid + t.jsonb :data + t.string :title + t.string :url + t.string :ref + + t.timestamps + end + end +end diff --git a/db/migrate/20230113180753_add_docid_and_form_id_to_university_people.rb b/db/migrate/20230113180753_add_docid_and_form_id_to_university_people.rb new file mode 100644 index 0000000000000000000000000000000000000000..be134eb4496463fb4173c100df088f3b9a8ee44b --- /dev/null +++ b/db/migrate/20230113180753_add_docid_and_form_id_to_university_people.rb @@ -0,0 +1,6 @@ +class AddDocidAndFormIdToUniversityPeople < ActiveRecord::Migration[7.0] + def change + add_column :university_people, :hal_doc_identifier, :string + add_column :university_people, :hal_form_identifier, :string + end +end diff --git a/db/migrate/20230114123255_add_hal_url_to_research_documents.rb b/db/migrate/20230114123255_add_hal_url_to_research_documents.rb new file mode 100644 index 0000000000000000000000000000000000000000..69fc66b82e6886d43883718900d0f3e78c5fa3b8 --- /dev/null +++ b/db/migrate/20230114123255_add_hal_url_to_research_documents.rb @@ -0,0 +1,5 @@ +class AddHalUrlToResearchDocuments < ActiveRecord::Migration[7.0] + def change + add_column :research_documents, :hal_url, :string + end +end diff --git a/db/migrate/20230114124148_add_hal_publication_date_to_research_documents.rb b/db/migrate/20230114124148_add_hal_publication_date_to_research_documents.rb new file mode 100644 index 0000000000000000000000000000000000000000..0a01bda4c5f2260b1ca41b36a87f370d2b7694b9 --- /dev/null +++ b/db/migrate/20230114124148_add_hal_publication_date_to_research_documents.rb @@ -0,0 +1,5 @@ +class AddHalPublicationDateToResearchDocuments < ActiveRecord::Migration[7.0] + def change + add_column :research_documents, :publication_date, :date + end +end diff --git a/db/migrate/20230114124308_add_doi_to_research_documents.rb b/db/migrate/20230114124308_add_doi_to_research_documents.rb new file mode 100644 index 0000000000000000000000000000000000000000..52a184aa7d7698d03cdd353a2e48dba2e54d1164 --- /dev/null +++ b/db/migrate/20230114124308_add_doi_to_research_documents.rb @@ -0,0 +1,5 @@ +class AddDoiToResearchDocuments < ActiveRecord::Migration[7.0] + def change + add_column :research_documents, :doi, :string + end +end diff --git a/db/migrate/20230115092626_rename_document_to_publication.rb b/db/migrate/20230115092626_rename_document_to_publication.rb new file mode 100644 index 0000000000000000000000000000000000000000..b5e43f7a923be2a749ce4561abf63685d82beb86 --- /dev/null +++ b/db/migrate/20230115092626_rename_document_to_publication.rb @@ -0,0 +1,18 @@ +class RenameDocumentToPublication < ActiveRecord::Migration[7.0] + def change + rename_table :research_documents, :research_publications + + remove_column :research_publications, :university_id, :uuid + remove_column :research_publications, :university_person_id, :uuid + + create_join_table :research_publications, :university_people, column_options: {type: :uuid} do |t| + t.index [:research_publication_id, :university_person_id], name: 'index_publication_person' + t.index [:university_person_id, :research_publication_id], name: 'index_person_publication' + end + + create_join_table :research_publications, :research_laboratories, column_options: {type: :uuid} do |t| + t.index [:research_publication_id, :research_laboratory_id], name: 'index_publication_laboratory' + t.index [:research_laboratory_id, :research_publication_id], name: 'index_laboratory_publication' + end + end +end diff --git a/db/migrate/20230115162644_add_slug_to_research_publications.rb b/db/migrate/20230115162644_add_slug_to_research_publications.rb new file mode 100644 index 0000000000000000000000000000000000000000..c9c4db47e9c5a4511fc631156c1231c6afc7a844 --- /dev/null +++ b/db/migrate/20230115162644_add_slug_to_research_publications.rb @@ -0,0 +1,5 @@ +class AddSlugToResearchPublications < ActiveRecord::Migration[7.0] + def change + add_column :research_publications, :slug, :string + end +end diff --git a/db/migrate/20230213083544_add_index_to_research_publications.rb b/db/migrate/20230213083544_add_index_to_research_publications.rb new file mode 100644 index 0000000000000000000000000000000000000000..128ec9d30953d07f12bfada249e44f8b905b3bab --- /dev/null +++ b/db/migrate/20230213083544_add_index_to_research_publications.rb @@ -0,0 +1,5 @@ +class AddIndexToResearchPublications < ActiveRecord::Migration[7.0] + def change + add_index :research_publications, :docid + end +end diff --git a/db/schema.rb b/db/schema.rb index 5dd66e4ab961188300ad8cbeacd30e9b9344d844..2d9fa7c66d988518c61ea961863f4bb96ea96ab0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_02_10_132818) do +ActiveRecord::Schema[7.0].define(version: 2023_02_13_083544) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -697,6 +697,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_02_10_132818) do t.date "publication_date" t.string "doi" t.string "slug" + t.index ["docid"], name: "index_research_publications_on_docid" end create_table "research_publications_university_people", id: false, force: :cascade do |t| diff --git a/lib/tasks/auto.rake b/lib/tasks/auto.rake new file mode 100644 index 0000000000000000000000000000000000000000..0c8b23305caf5813d3bcf4624d79f1aa47257b73 --- /dev/null +++ b/lib/tasks/auto.rake @@ -0,0 +1,6 @@ +namespace :auto do + desc 'Update publications from HAL for all researchers' + task update_publications_from_hal: :environment do + Research::Publication.update_from_hal + end +end \ No newline at end of file diff --git a/test/fixtures/research/publications.yml b/test/fixtures/research/publications.yml new file mode 100644 index 0000000000000000000000000000000000000000..2ccd47c2eaf77efc512b4bf3bfad8edabcd83838 --- /dev/null +++ b/test/fixtures/research/publications.yml @@ -0,0 +1,28 @@ +# == Schema Information +# +# Table name: research_publications +# +# id :uuid not null, primary key +# data :jsonb +# docid :string indexed +# doi :string +# hal_url :string +# publication_date :date +# ref :string +# slug :string +# title :string +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# +# Indexes +# +# index_research_publications_on_docid (docid) +# + +default_publication: + docid: MyString + data: + title: MyString + url: MyString + ref: MyString diff --git a/test/fixtures/university/people.yml b/test/fixtures/university/people.yml index c8c32545e279d6cfb5e84d066c31f4f3f6588c9b..877859d4d94742760c90f50e7b90ccbbb02a6b27 100644 --- a/test/fixtures/university/people.yml +++ b/test/fixtures/university/people.yml @@ -2,41 +2,44 @@ # # Table name: university_people # -# id :uuid not null, primary key -# address :string -# biography :text -# birthdate :date -# city :string -# country :string -# email :string -# first_name :string -# gender :integer -# habilitation :boolean default(FALSE) -# is_administration :boolean -# is_alumnus :boolean default(FALSE) -# is_author :boolean -# is_researcher :boolean -# is_teacher :boolean -# last_name :string -# linkedin :string -# mastodon :string -# meta_description :text -# name :string -# phone_mobile :string -# phone_personal :string -# phone_professional :string -# slug :string -# summary :text -# tenure :boolean default(FALSE) -# twitter :string -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# language_id :uuid not null, indexed -# original_id :uuid indexed -# university_id :uuid not null, indexed -# user_id :uuid indexed +# id :uuid not null, primary key +# address :string +# biography :text +# birthdate :date +# city :string +# country :string +# email :string +# first_name :string +# gender :integer +# habilitation :boolean default(FALSE) +# hal_doc_identifier :string +# hal_form_identifier :string +# hal_person_identifier :string +# is_administration :boolean +# is_alumnus :boolean default(FALSE) +# is_author :boolean +# is_researcher :boolean +# is_teacher :boolean +# last_name :string +# linkedin :string +# mastodon :string +# meta_description :text +# name :string +# phone_mobile :string +# phone_personal :string +# phone_professional :string +# slug :string +# summary :text +# tenure :boolean default(FALSE) +# twitter :string +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# language_id :uuid not null, indexed +# original_id :uuid indexed +# university_id :uuid not null, indexed +# user_id :uuid indexed # # Indexes #