diff --git a/Gemfile.lock b/Gemfile.lock index 1299adfc7f89b54a3958383f0a07096cd4d82dac..2dc460e488dc3dc424046748a85493d57b61d6ba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,11 +76,11 @@ GEM annotate (3.1.1) activerecord (>= 3.2, < 7.0) rake (>= 10.4, < 14.0) - autoprefixer-rails (10.4.0.0) + autoprefixer-rails (10.4.2.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.543.0) - aws-sdk-core (3.125.0) + aws-partitions (1.548.0) + aws-sdk-core (3.125.3) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) @@ -88,7 +88,7 @@ GEM aws-sdk-kms (1.53.0) aws-sdk-core (~> 3, >= 3.125.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.110.0) + aws-sdk-s3 (1.111.1) aws-sdk-core (~> 3, >= 3.125.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) @@ -96,7 +96,7 @@ GEM aws-eventstream (~> 1, >= 1.0.2) bcrypt (3.1.16) bindex (0.8.1) - bootsnap (1.9.3) + bootsnap (1.9.4) msgpack (~> 1.0) bootstrap (5.1.3) autoprefixer-rails (>= 9.1.0) @@ -123,7 +123,7 @@ GEM xpath (~> 3.2) childprocess (4.1.0) concurrent-ruby (1.1.9) - countries (4.1.3) + countries (4.2.1) i18n_data (~> 0.15.0) sixarm_ruby_unaccent (~> 1.1) country_select (6.0.0) @@ -154,22 +154,23 @@ GEM domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) encryptor (3.0.0) - enum_help (0.0.17) + enum_help (0.0.18) activesupport (>= 3.0.0) erubi (1.10.0) ethon (0.15.0) ffi (>= 1.15.0) execjs (2.8.1) - faraday (1.8.0) + faraday (1.9.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) + faraday-net_http_persistent (~> 1.0) faraday-patron (~> 1.0) faraday-rack (~> 1.0) - multipart-post (>= 1.2, < 3) + faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) @@ -182,14 +183,17 @@ GEM faraday-http-cache (2.2.0) faraday (>= 0.8) faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) + faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.6) - ffi (1.15.4) + ffi (1.15.5) figaro (1.2.0) thor (>= 0.14.0, < 2) front_matter_parser (1.0.1) @@ -211,7 +215,7 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jmespath (1.4.0) + jmespath (1.5.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -234,7 +238,7 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - listen (3.7.0) + listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.13.0) @@ -257,7 +261,7 @@ GEM method_source (1.0.0) mini_magick (4.11.0) mini_mime (1.1.2) - mini_portile2 (2.6.1) + mini_portile2 (2.7.1) minitest (5.15.0) msgpack (1.4.2) multipart-post (2.1.1) @@ -266,10 +270,10 @@ GEM nested_form (0.3.2) nesty (1.0.2) nio4r (2.5.8) - nokogiri (1.12.5) - mini_portile2 (~> 2.6.1) + nokogiri (1.13.1) + mini_portile2 (~> 2.7.0) racc (~> 1.4) - octokit (4.21.0) + octokit (4.22.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) orm_adapter (0.5.0) @@ -348,7 +352,8 @@ GEM childprocess (>= 0.5, < 5.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2) - sib-api-v3-sdk (7.5.0) + sib-api-v3-sdk (8.0.0) + addressable (~> 2.3, >= 2.3.0) json (~> 2.1, >= 2.1.0) typhoeus (~> 1.0, >= 1.0.1) simple-navigation (4.3.0) @@ -379,7 +384,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - thor (1.1.0) + thor (1.2.1) tilt (2.0.10) typhoeus (1.4.0) ethon (>= 0.9.0) diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index 54af5d9dfc22bdbab709616ff5c0f291e3c4f21c..99bd27a0e9cc62633547d714daa14247e092d1a8 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -73,7 +73,9 @@ class Admin::Communication::WebsitesController < Admin::Communication::Applicati def website_params params.require(:communication_website).permit( :name, :url, :repository, :access_token, :about_type, :about_id, - :authors_github_directory, :posts_github_directory, :programs_github_directory, :staff_github_directory + :authors_github_directory, :posts_github_directory, :programs_github_directory, + :research_articles_github_directory, :research_volumes_github_directory, + :staff_github_directory ) end end diff --git a/app/controllers/admin/university/people_controller.rb b/app/controllers/admin/university/people_controller.rb index 71a44e4ee9d0f93adbf4690de1a2b68d5ce9dde0..ec74ea1a624473d68651a748d402be27aae2c740 100644 --- a/app/controllers/admin/university/people_controller.rb +++ b/app/controllers/admin/university/people_controller.rb @@ -56,7 +56,7 @@ class Admin::University::PeopleController < Admin::University::ApplicationContro def person_params params.require(:university_person).permit( - :slug, :first_name, :last_name, :email, :phone, + :slug, :first_name, :last_name, :email, :phone, :description, :biography, :picture, :picture_delete, :picture_infos, :is_researcher, :is_teacher, :is_administration, :user_id ).merge(university_id: current_university.id) diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index 75c044ef5a65375f1e6eee8db7ce6733f81877b5..0d5fa3e254bfadee90e67b4416164848961f13b2 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -2,20 +2,22 @@ # # Table name: communication_websites # -# id :uuid not null, primary key -# about_type :string -# access_token :string -# authors_github_directory :string default("authors") -# name :string -# posts_github_directory :string default("posts") -# programs_github_directory :string default("programs") -# repository :string -# staff_github_directory :string default("staff") -# url :string -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid -# university_id :uuid not null +# id :uuid not null, primary key +# about_type :string +# access_token :string +# authors_github_directory :string default("authors") +# name :string +# posts_github_directory :string default("posts") +# programs_github_directory :string default("programs") +# repository :string +# research_articles_github_directory :string default("articles") +# research_volumes_github_directory :string default("volumes") +# staff_github_directory :string default("staff") +# url :string +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid +# university_id :uuid not null # # Indexes # diff --git a/app/models/communication/website/menu/item.rb b/app/models/communication/website/menu/item.rb index b8c1f9a79f47a0687f1b6ec45bfc1e43389db7cc..707c9f7bf940aa34ea0243e95fa70cebda540ff1 100644 --- a/app/models/communication/website/menu/item.rb +++ b/app/models/communication/website/menu/item.rb @@ -56,7 +56,11 @@ class Communication::Website::Menu::Item < ApplicationRecord news: 40, news_category: 41, news_article: 42, - staff: 50 + staff: 50, + research_volumes: 60, + research_volume: 61, + research_articles: 62, + research_article: 63 }, _prefix: :kind validates :title, presence: true @@ -69,23 +73,34 @@ class Communication::Website::Menu::Item < ApplicationRecord end def static_target - target = '' + target = nil case self.kind when 'url' target = url + when 'page', 'news_article' + target = about.path if about&.published_at when 'programs' - target = "/#{website.programs_github_directory}" + target = "/#{website.programs_github_directory}" if website.programs.any? when 'program' - target = "/#{website.programs_github_directory}#{about.path}" + target = "/#{website.programs_github_directory}#{about.path}" if website.about_school? when 'news' - target = "/#{website.posts_github_directory}" + target = "/#{website.posts_github_directory}" if website.posts.published.any? when 'staff' - target = "/#{website.staff_github_directory}" + target = "/#{website.staff_github_directory}" if website.people.any? + when 'research_volumes' + target = "/#{website.research_volumes_github_directory}" if website.research_volumes.published.any? + when 'research_volume' + target = "/#{website.research_volumes_github_directory}#{about.path}" if about&.published_at + when 'research_articles' + target = "/#{website.research_articles_github_directory}" if website.research_articles.published.any? + when 'research_article' + target = "/#{website.research_articles_github_directory}#{about.path}" if about&.published_at when 'blank' target = '' else target = about&.path end + return nil if target.nil? target.end_with?('/') ? target : "#{target}/" end @@ -100,17 +115,19 @@ class Communication::Website::Menu::Item < ApplicationRecord end def to_static_hash - return {} if kind_news_article? && !about.published + return nil if static_target.nil? { 'title' => title, 'target' => static_target, 'kind' => kind, - 'children' => children.ordered.map(&:to_static_hash) + 'children' => children.ordered.map(&:to_static_hash).compact } end def has_about? - kind_page? || kind_program? || kind_news_category? || kind_news_article? + kind_page? || kind_program? || + kind_news_category? || kind_news_article? || + kind_research_volume? || kind_research_article? end def sync_menu diff --git a/app/models/communication/website/with_abouts.rb b/app/models/communication/website/with_abouts.rb index c104183822667f6e0343362c5289bb1e50e5bac4..79bae2de7c73ba8329426f3b928024439fbbc74f 100644 --- a/app/models/communication/website/with_abouts.rb +++ b/app/models/communication/website/with_abouts.rb @@ -45,7 +45,11 @@ module Communication::Website::WithAbouts about_school? ? about.programs : Education::Program.none end - def articles + def research_volumes + about_journal? ? about.volumes : Research::Journal::Volume.none + end + + def research_articles about_journal? ? about.articles : Research::Journal::Article.none end @@ -58,8 +62,8 @@ module Communication::Website::WithAbouts people += about.university_people_through_administrators people += about.university_people_through_administrators.map(&:administrator) elsif about_journal? - people += articles.collect(&:researchers).flatten - people += articles.collect(&:researchers).flatten.map(&:researcher) + people += research_articles.collect(&:researchers).flatten + people += research_articles.collect(&:researchers).flatten.map(&:researcher) end end people.uniq.compact diff --git a/app/models/concerns/with_git.rb b/app/models/concerns/with_git.rb index a48d81818e7d0a1c4d4f32042d520922111cf25d..3b1771151fca2aa343243cfb6bfd2a4fae5cba50 100644 --- a/app/models/concerns/with_git.rb +++ b/app/models/concerns/with_git.rb @@ -44,7 +44,7 @@ module WithGit website.git_repository.sync! end end - handle_asynchronously :sync_with_git + handle_asynchronously :sync_with_git, queue: 'default' def destroy_from_git websites_for_self.each do |website| diff --git a/app/models/education/program/teacher.rb b/app/models/education/program/teacher.rb index bed1c1afdc241e79a9162d63a8ad020b85a7a695..ee27e125906adac518d821a451926a46c520ab5a 100644 --- a/app/models/education/program/teacher.rb +++ b/app/models/education/program/teacher.rb @@ -33,6 +33,10 @@ class Education::Program::Teacher < ApplicationRecord person.to_s end + def best_description + description.blank? ? person.description : description + end + protected def sync_program diff --git a/app/models/education/school/administrator.rb b/app/models/education/school/administrator.rb index 33a37caa29e7ab9f5db9fcd87102320092589362..6b9e5a69dcb76d99c0d9f55c30fd405b1102385d 100644 --- a/app/models/education/school/administrator.rb +++ b/app/models/education/school/administrator.rb @@ -33,6 +33,10 @@ class Education::School::Administrator < ApplicationRecord person.to_s end + def best_description + description.blank? ? person.description : description + end + protected def sync_school diff --git a/app/models/research/journal/article.rb b/app/models/research/journal/article.rb index ca553be57329cd12042f94c559510be3108e8e8c..ed1248780e9f4944ec70e318a77074d8371c1860 100644 --- a/app/models/research/journal/article.rb +++ b/app/models/research/journal/article.rb @@ -68,6 +68,10 @@ class Research::Journal::Article < ApplicationRecord "#{ title }" end + def path + "/#{slug}" + end + protected def last_ordered_element diff --git a/app/models/research/journal/volume.rb b/app/models/research/journal/volume.rb index 328ded75e988538c46d829ce930f25825a8b6060..c80b3af6bea8a47bfe72c462c384d3a439792c5e 100644 --- a/app/models/research/journal/volume.rb +++ b/app/models/research/journal/volume.rb @@ -60,7 +60,7 @@ class Research::Journal::Volume < ApplicationRecord end def path - "#{published_at&.year}/#{slug}" if published_at + "/#{published_at&.year}/#{slug}" if published_at end def to_s diff --git a/app/models/university/person.rb b/app/models/university/person.rb index 1012cf47ee3c92aa95ccbceefa9db26ab417fb89..d7e884d546a23c5e3165972ce2c2b2460e26c92e 100644 --- a/app/models/university/person.rb +++ b/app/models/university/person.rb @@ -3,6 +3,7 @@ # Table name: university_people # # id :uuid not null, primary key +# description :text # email :string # first_name :string # is_administration :boolean @@ -63,7 +64,7 @@ class University::Person < ApplicationRecord dependent: :nullify has_many :communication_website_imported_authors, - class_name: "Communiation::Website::Imported::Author", + class_name: "Communication::Website::Imported::Author", foreign_key: :author_id, dependent: :destroy diff --git a/app/models/university/person/administrator.rb b/app/models/university/person/administrator.rb index 2c16151fbd331d0ec0c4f518c124f68dc436d03a..0f55f1ace71fafcbdaf50b4021d1a41a97cf2862 100644 --- a/app/models/university/person/administrator.rb +++ b/app/models/university/person/administrator.rb @@ -3,6 +3,7 @@ # Table name: university_people # # id :uuid not null, primary key +# description :text # email :string # first_name :string # is_administration :boolean diff --git a/app/models/university/person/author.rb b/app/models/university/person/author.rb index be788bef945fd5bb828ae62e5d4c8d2f69ab12a7..084023056b2b5b261c05bcd7ed4a99d966994b30 100644 --- a/app/models/university/person/author.rb +++ b/app/models/university/person/author.rb @@ -3,6 +3,7 @@ # Table name: university_people # # id :uuid not null, primary key +# description :text # email :string # first_name :string # is_administration :boolean diff --git a/app/models/university/person/researcher.rb b/app/models/university/person/researcher.rb index f1b7341ad36fad9dcc90a6d001d2b45ee1eca4ab..048b79ed9a19e02f51d9af41d50acc422e51fa3a 100644 --- a/app/models/university/person/researcher.rb +++ b/app/models/university/person/researcher.rb @@ -3,6 +3,7 @@ # Table name: university_people # # id :uuid not null, primary key +# description :text # email :string # first_name :string # is_administration :boolean @@ -36,7 +37,7 @@ class University::Person::Researcher < University::Person end def for_website?(website) - is_researcher && website.about_journal? && website.articles + is_researcher && website.about_journal? && website.research_articles .joins(:researchers) .where(university_people: { id: id }) .any? diff --git a/app/models/university/person/teacher.rb b/app/models/university/person/teacher.rb index 6e5f3a761f1432afede463cc1c9b2b05bd110d7e..fd62b7ef4fa0a1a274301bd433bb9fea17baa848 100644 --- a/app/models/university/person/teacher.rb +++ b/app/models/university/person/teacher.rb @@ -3,6 +3,7 @@ # Table name: university_people # # id :uuid not null, primary key +# description :text # email :string # first_name :string # is_administration :boolean diff --git a/app/views/admin/communication/website/menu/items/_form.html.erb b/app/views/admin/communication/website/menu/items/_form.html.erb index 44ccf48546d8c00069d35301ad181c62dc048a14..0e9e61ee6e563fee968cc1150fd0802e5785b929 100644 --- a/app/views/admin/communication/website/menu/items/_form.html.erb +++ b/app/views/admin/communication/website/menu/items/_form.html.erb @@ -28,6 +28,10 @@ about_collection = collection_tree(@website.categories) elsif item.kind_news_article? about_collection = @website.posts.ordered.map { |e| { label: e.to_s, id: e.id } } + elsif item.kind_research_volume? + about_collection = @website.research_volumes.ordered.map { |e| { label: e.to_s, id: e.id } } + elsif item.kind_research_article? + about_collection = @website.research_articles.ordered.map { |e| { label: e.to_s, id: e.id } } end else about_collection = [] diff --git a/app/views/admin/communication/website/menu/items/kind_switch.js.erb b/app/views/admin/communication/website/menu/items/kind_switch.js.erb index e883ff32bdcc7dc7ea174b8527d257b46aec8161..9632dd52f7a6eda8535dc27f91792aa0541377f2 100644 --- a/app/views/admin/communication/website/menu/items/kind_switch.js.erb +++ b/app/views/admin/communication/website/menu/items/kind_switch.js.erb @@ -44,6 +44,22 @@ function hideAbout() { end %> displayAbout('Communication::Website::Post', "<%= j(raw(options.join(''))) %>"); +<% elsif @kind == 'research_volume' %> + <% + options = ['<option value="" label=" "></option>'] + @website.research_volumes.ordered.each do |volume| + options << "<option value=\"#{volume.id}\">#{volume.to_s}</option>" + end + %> + displayAbout('Research::Journal::Volume', "<%= j(raw(options.join(''))) %>"); +<% elsif @kind == 'research_article' %> + <% + options = ['<option value="" label=" "></option>'] + @website.research_articles.ordered.each do |article| + options << "<option value=\"#{article.id}\">#{article.to_s}</option>" + end + %> + displayAbout('Research::Journal::Article', "<%= j(raw(options.join(''))) %>"); <% else %> $('.js-url-field').addClass('d-none'); hideAbout(); diff --git a/app/views/admin/communication/website/menus/static.html.erb b/app/views/admin/communication/website/menus/static.html.erb index 035a94b4a3a9e6728b0935912c0ee4d6b17e15ff..8e9ef0627777b377da62295cad320fea0514c1e1 100644 --- a/app/views/admin/communication/website/menus/static.html.erb +++ b/app/views/admin/communication/website/menus/static.html.erb @@ -2,4 +2,5 @@ .root .ordered .map(&:to_static_hash) + .compact .to_yaml %> diff --git a/app/views/admin/communication/websites/_form.html.erb b/app/views/admin/communication/websites/_form.html.erb index 9643dfbfe94c1db36d9453928a31228b9677c11b..0b2a65e53b3727248e894c8551de8edfd3eb858b 100644 --- a/app/views/admin/communication/websites/_form.html.erb +++ b/app/views/admin/communication/websites/_form.html.erb @@ -40,6 +40,8 @@ <%= f.input :authors_github_directory %> <%= f.input :posts_github_directory %> <%= f.input :programs_github_directory %> + <%= f.input :research_articles_github_directory %> + <%= f.input :research_volumes_github_directory %> <%= f.input :staff_github_directory %> </div> </div> diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 74fd771a4dd11959c7faf09d8fd0e33a318d465a..393b09bbb103755fb7ef18da45524c6e434578b2 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -17,7 +17,7 @@ teachers: teachers_description: <% @program.teachers.includes(:person).ordered.each do |teacher| %> "<%= teacher.person.slug %>": > - <%= teacher.description.blank? ? teacher.person.biography.to_plain_text : teacher.description %> + <%= teacher.best_description %> <% end %> roles: <% @program.roles.ordered.each do |role| %> diff --git a/app/views/admin/education/schools/static.html.erb b/app/views/admin/education/schools/static.html.erb index 60fcb4a93f1a5b8d950b41746ac1962bf53b711d..800d8c5b1c974e925f1adff080b1b4a7a612fbbe 100644 --- a/app/views/admin/education/schools/static.html.erb +++ b/app/views/admin/education/schools/static.html.erb @@ -18,6 +18,6 @@ administrators: administrators_description: <% @school.administrators.includes(:person).ordered.each do |administrator| %> "<%= administrator.person.slug %>": > - <%= administrator.description.blank? ? administrator.person.biography.to_plain_text : administrator.description %> + <%= administrator.best_description %> <% end %> --- diff --git a/app/views/admin/university/people/_form.html.erb b/app/views/admin/university/people/_form.html.erb index 63a54605764ad8a163aeb05b6a8fadf8a432709b..498d3415064421a7f3e8db884bcdc71e9390019d 100644 --- a/app/views/admin/university/people/_form.html.erb +++ b/app/views/admin/university/people/_form.html.erb @@ -22,6 +22,7 @@ <%= f.input :phone %> </div> </div> + <%= f.input :description %> <%= f.input :biography, as: :rich_text_area %> </div> </div> diff --git a/app/views/admin/university/people/_main_infos.html.erb b/app/views/admin/university/people/_main_infos.html.erb index 0ac59b529258ba56980a0c747f139de6e14bccec..bf82980bdcb3f4331af572bb2d1b47a0f2e24071 100644 --- a/app/views/admin/university/people/_main_infos.html.erb +++ b/app/views/admin/university/people/_main_infos.html.erb @@ -13,6 +13,8 @@ <h3 class="h5"><%= University::Person.human_attribute_name('phone') %></h3> <p><%= link_to person.phone, "tel:#{person.phone}", target: '_blank' %></p> <% end %> + <h3 class="h5"><%= University::Person.human_attribute_name('description') %></h3> + <%= simple_format person.description %> <h3 class="h5"><%= University::Person.human_attribute_name('biography') %></h3> <%= person.biography %> </div> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 7c289b1bd6d6fb0c0b189f7e533e0374dccd8365..a79392d8f92f56e20742ddcd08cb4d2631e00350 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -45,6 +45,8 @@ en: name: Name posts_github_directory: Posts' GitHub directory programs_github_directory: Programs' GitHub directory + research_articles_github_directory: Research articles' GitHub directory + research_volumes_github_directory: Research volumes' GitHub directory staff_github_directory: Staff's GitHub directory url: URL communication/website/author: @@ -141,5 +143,9 @@ en: page: Specific Page program: Specific program programs: Programs index + research_article: Specific research article + research_articles: Research articles index + research_volume: Specific research volume + research_volumes: Research volumes index staff: Staff url: URL diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 0309086e178160ac68e72fc5425032971cd09a9a..9204e1a67c961b231d9003ede7a7fcf4aa23a0b7 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -42,6 +42,8 @@ fr: name: Nom posts_github_directory: Dossier GitHub des actualités programs_github_directory: Dossier GitHub des formations + research_articles_github_directory: Dossier GitHub des articles de recherche + research_volumes_github_directory: Dossier GitHub des volumes de recherche staff_github_directory: Dossier GitHub de l'équipe url: URL communication/website/category: @@ -131,5 +133,9 @@ fr: page: Page spécifique program: Formation spécifique programs: Index des formations + research_article: Article de recherche spécifique + research_articles: Index des articles de recherche + research_volume: Volume de recherche spécifique + research_volumes: Index des volumes de recherche staff: Équipe url: URL diff --git a/config/locales/university/en.yml b/config/locales/university/en.yml index edcf48f2b0441d6ef1be9bca74f8327d39d39df6..37ccdd3e3e9b5feb07f4dc2da280ee90561a973d 100644 --- a/config/locales/university/en.yml +++ b/config/locales/university/en.yml @@ -18,6 +18,7 @@ en: abilities: Abilities biography: Biography communication_website_posts: Posts + description: Description education_programs: Programs email: Email first_name: First name diff --git a/config/locales/university/fr.yml b/config/locales/university/fr.yml index 8434dd1ed9612721b113833fedf0ee89ae4f22f9..fbc1d8faf31f834f6cd2d3bcdd49731fe62dcb5c 100644 --- a/config/locales/university/fr.yml +++ b/config/locales/university/fr.yml @@ -18,6 +18,7 @@ fr: abilities: Responsabilités biography: Biographie communication_website_posts: Actualités + description: Description education_programs: Formations email: Email first_name: Prénom diff --git a/db/migrate/20220113155300_add_research_github_directories_to_communication_websites.rb b/db/migrate/20220113155300_add_research_github_directories_to_communication_websites.rb new file mode 100644 index 0000000000000000000000000000000000000000..3534251f1929313478088130eed88d6ccdd79d06 --- /dev/null +++ b/db/migrate/20220113155300_add_research_github_directories_to_communication_websites.rb @@ -0,0 +1,6 @@ +class AddResearchGithubDirectoriesToCommunicationWebsites < ActiveRecord::Migration[6.1] + def change + add_column :communication_websites, :research_volumes_github_directory, :string, default: 'volumes' + add_column :communication_websites, :research_articles_github_directory, :string, default: 'articles' + end +end diff --git a/db/migrate/20220114130021_add_description_to_university_people.rb b/db/migrate/20220114130021_add_description_to_university_people.rb new file mode 100644 index 0000000000000000000000000000000000000000..42715fcbea069757a4a9f836d69f8884c5b52712 --- /dev/null +++ b/db/migrate/20220114130021_add_description_to_university_people.rb @@ -0,0 +1,5 @@ +class AddDescriptionToUniversityPeople < ActiveRecord::Migration[6.1] + def change + add_column :university_people, :description, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 44cbf87b63419edbf53d97ac4f855275e7f098b5..f9248b9d7a507eec6089cc85cf08e9c4d2cfc23a 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.define(version: 2022_01_12_085221) do +ActiveRecord::Schema.define(version: 2022_01_14_130021) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -327,6 +327,8 @@ ActiveRecord::Schema.define(version: 2022_01_12_085221) do t.string "posts_github_directory", default: "posts" t.string "programs_github_directory", default: "programs" t.string "staff_github_directory", default: "staff" + t.string "research_volumes_github_directory", default: "volumes" + t.string "research_articles_github_directory", default: "articles" t.index ["about_type", "about_id"], name: "index_communication_websites_on_about" t.index ["university_id"], name: "index_communication_websites_on_university_id" end @@ -522,6 +524,7 @@ ActiveRecord::Schema.define(version: 2022_01_12_085221) do t.datetime "updated_at", precision: 6, null: false t.string "phone" t.string "email" + t.text "description" t.index ["university_id"], name: "index_university_people_on_university_id" t.index ["user_id"], name: "index_university_people_on_user_id" end