diff --git a/Gemfile.lock b/Gemfile.lock index 3f61e9ea7bfff1919952e394e1a826bec34e72fc..1f847af67e1523cc17c4f9a0d3a8536727381b7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT GIT remote: https://github.com/noesya/two_factor_authentication.git - revision: 16b0a2120aed476c2321c074be553edd9c7dc4c0 + revision: 18a9b69da420d588cd997df20b1c91f6bd08c41f specs: two_factor_authentication (2.2.3) devise @@ -21,60 +21,60 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.1.6) - actionpack (= 6.1.6) - activesupport (= 6.1.6) + actioncable (6.1.6.1) + actionpack (= 6.1.6.1) + activesupport (= 6.1.6.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.6) - actionpack (= 6.1.6) - activejob (= 6.1.6) - activerecord (= 6.1.6) - activestorage (= 6.1.6) - activesupport (= 6.1.6) + actionmailbox (6.1.6.1) + actionpack (= 6.1.6.1) + activejob (= 6.1.6.1) + activerecord (= 6.1.6.1) + activestorage (= 6.1.6.1) + activesupport (= 6.1.6.1) mail (>= 2.7.1) - actionmailer (6.1.6) - actionpack (= 6.1.6) - actionview (= 6.1.6) - activejob (= 6.1.6) - activesupport (= 6.1.6) + actionmailer (6.1.6.1) + actionpack (= 6.1.6.1) + actionview (= 6.1.6.1) + activejob (= 6.1.6.1) + activesupport (= 6.1.6.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.6) - actionview (= 6.1.6) - activesupport (= 6.1.6) + actionpack (6.1.6.1) + actionview (= 6.1.6.1) + activesupport (= 6.1.6.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.6) - actionpack (= 6.1.6) - activerecord (= 6.1.6) - activestorage (= 6.1.6) - activesupport (= 6.1.6) + actiontext (6.1.6.1) + actionpack (= 6.1.6.1) + activerecord (= 6.1.6.1) + activestorage (= 6.1.6.1) + activesupport (= 6.1.6.1) nokogiri (>= 1.8.5) - actionview (6.1.6) - activesupport (= 6.1.6) + actionview (6.1.6.1) + activesupport (= 6.1.6.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.6) - activesupport (= 6.1.6) + activejob (6.1.6.1) + activesupport (= 6.1.6.1) globalid (>= 0.3.6) - activemodel (6.1.6) - activesupport (= 6.1.6) - activerecord (6.1.6) - activemodel (= 6.1.6) - activesupport (= 6.1.6) - activestorage (6.1.6) - actionpack (= 6.1.6) - activejob (= 6.1.6) - activerecord (= 6.1.6) - activesupport (= 6.1.6) + activemodel (6.1.6.1) + activesupport (= 6.1.6.1) + activerecord (6.1.6.1) + activemodel (= 6.1.6.1) + activesupport (= 6.1.6.1) + activestorage (6.1.6.1) + actionpack (= 6.1.6.1) + activejob (= 6.1.6.1) + activerecord (= 6.1.6.1) + activesupport (= 6.1.6.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.6) + activesupport (6.1.6.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -89,13 +89,13 @@ GEM autoprefixer-rails (10.4.7.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.601.0) - aws-sdk-core (3.131.2) + aws-partitions (1.608.0) + aws-sdk-core (3.131.3) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.57.0) + aws-sdk-kms (1.58.0) aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) aws-sdk-s3 (1.114.0) @@ -134,11 +134,10 @@ GEM childprocess (4.1.0) cocoon (1.2.15) concurrent-ruby (1.1.10) - countries (5.1.0) + countries (5.1.1) sixarm_ruby_unaccent (~> 1.1) - country_select (7.0.0) + country_select (8.0.0) countries (~> 5.0) - sort_alphabetical (~> 1.1) crack (0.4.5) rexml crass (1.0.6) @@ -173,9 +172,9 @@ GEM ethon (0.15.0) ffi (>= 1.15.0) execjs (2.8.1) - faceted_search (3.5.13) + faceted_search (3.5.15) font-awesome-sass - rails (>= 5.2.0, < 7) + rails (>= 5.2.0) faraday (1.10.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -219,8 +218,8 @@ GEM js_cookie_rails rails sassc-rails - gitlab (4.18.0) - httparty (~> 0.18) + gitlab (4.19.0) + httparty (~> 0.20) terminal-table (>= 1.5.1) globalid (1.0.0) activesupport (>= 5.0) @@ -236,7 +235,7 @@ GEM httparty (0.20.0) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) @@ -294,28 +293,28 @@ GEM mime-types-data (3.2022.0105) mini_magick (4.11.0) mini_mime (1.1.2) - minitest (5.16.1) - msgpack (1.5.2) + minitest (5.16.2) + msgpack (1.5.3) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.2.3) - mustermann (1.1.1) + mustermann (1.1.2) ruby2_keywords (~> 0.0.1) nesty (1.0.2) nio4r (2.5.8) - nokogiri (1.13.6-arm64-darwin) + nokogiri (1.13.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.6-x86_64-darwin) + nokogiri (1.13.7-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.6-x86_64-linux) + nokogiri (1.13.7-x86_64-linux) racc (~> 1.4) - oauth2 (1.4.9) + oauth2 (1.4.10) faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - octokit (4.25.0) + octokit (5.1.0) faraday (>= 1, < 3) sawyer (~> 0.9) omniauth (2.1.0) @@ -335,39 +334,39 @@ GEM puma (5.6.4) nio4r (~> 2.0) racc (1.6.0) - rack (2.2.3.1) + rack (2.2.4) rack-mini-profiler (2.3.4) rack (>= 1.2.0) - rack-protection (2.2.0) + rack-protection (2.2.1) rack - rack-test (2.0.0) + rack-test (2.0.2) rack (>= 1.3) - rails (6.1.6) - actioncable (= 6.1.6) - actionmailbox (= 6.1.6) - actionmailer (= 6.1.6) - actionpack (= 6.1.6) - actiontext (= 6.1.6) - actionview (= 6.1.6) - activejob (= 6.1.6) - activemodel (= 6.1.6) - activerecord (= 6.1.6) - activestorage (= 6.1.6) - activesupport (= 6.1.6) + rails (6.1.6.1) + actioncable (= 6.1.6.1) + actionmailbox (= 6.1.6.1) + actionmailer (= 6.1.6.1) + actionpack (= 6.1.6.1) + actiontext (= 6.1.6.1) + actionview (= 6.1.6.1) + activejob (= 6.1.6.1) + activemodel (= 6.1.6.1) + activerecord (= 6.1.6.1) + activestorage (= 6.1.6.1) + activesupport (= 6.1.6.1) bundler (>= 1.15.0) - railties (= 6.1.6) + railties (= 6.1.6.1) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.4.3) loofah (~> 2.3) - rails-i18n (7.0.3) + rails-i18n (7.0.5) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (6.1.6) - actionpack (= 6.1.6) - activesupport (= 6.1.6) + railties (6.1.6.1) + actionpack (= 6.1.6.1) + activesupport (= 6.1.6.1) method_source rake (>= 12.2) thor (~> 1.0) @@ -426,16 +425,14 @@ GEM simple_form_password_with_hints (0.0.6) rails simple_form - sinatra (2.2.0) + sinatra (2.2.1) mustermann (~> 1.0) rack (~> 2.2) - rack-protection (= 2.2.0) + rack-protection (= 2.2.1) tilt (~> 2.0) sixarm_ruby_unaccent (1.2.0) - sort_alphabetical (1.1.0) - unicode_utils (>= 1.2.2) spring (4.0.0) - sprockets (4.1.0) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) @@ -454,7 +451,6 @@ GEM unf_ext unf_ext (0.0.8.2) unicode-display_width (2.2.0) - unicode_utils (1.4.0) unsplash (2.1.0) httparty (~> 0.16) oauth2 (~> 1) @@ -552,4 +548,4 @@ RUBY VERSION ruby 2.7.6p219 BUNDLED WITH - 2.3.11 + 2.3.12 diff --git a/app/controllers/admin/communication/websites/pages_controller.rb b/app/controllers/admin/communication/websites/pages_controller.rb index b7c8e6a92b9c313266f33ed7f1a74eb749d8fce1..203ff4d27bb0921e38b8e0cdb96f270996323914 100644 --- a/app/controllers/admin/communication/websites/pages_controller.rb +++ b/app/controllers/admin/communication/websites/pages_controller.rb @@ -98,7 +98,7 @@ class Admin::Communication::Websites::PagesController < Admin::Communication::We params.require(:communication_website_page) .permit( :communication_website_id, :title, :breadcrumb_title, :bodyclass, - :description, :description_short, :header_text, :text, :slug, :published, + :description, :description_short, :header_text, :text, :slug, :published, :full_width, :featured_image, :featured_image_delete, :featured_image_infos, :featured_image_alt, :featured_image_credit, :parent_id, :language_id ) diff --git a/app/controllers/users/sessions_controller.rb b/app/controllers/users/sessions_controller.rb index 2e9ca5a51e4a81a89046a7db59cb262b5e7c66fa..719343815f218d7c8ca598bee06f39e1f321d4d1 100644 --- a/app/controllers/users/sessions_controller.rb +++ b/app/controllers/users/sessions_controller.rb @@ -1,3 +1,10 @@ class Users::SessionsController < Devise::SessionsController include Users::AddUniversityToRequestParams + + # DELETE /resource/sign_out + def destroy + current_user.invalidate_all_sessions! + super + end + end diff --git a/app/mailers/devise_mailer.rb b/app/mailers/devise_mailer.rb index 65afff9540a406ffd44a5db912821d7a9ebb5921..430eee58f6549df45103cc1bf97e6818bc454ecb 100644 --- a/app/mailers/devise_mailer.rb +++ b/app/mailers/devise_mailer.rb @@ -41,6 +41,7 @@ class DeviseMailer < Devise::Mailer def two_factor_authentication_code(record, code, opts = {}) opts = merge_with_university_infos(record.university, opts) @code = code + @duration = ActiveSupport::Duration.build(Rails.application.config.devise.direct_otp_valid_for).inspect I18n.with_locale(record.language.iso_code.to_sym) do devise_mail(record, :two_factor_authentication_code, opts) end diff --git a/app/models/administration/qualiopi/indicator.rb b/app/models/administration/qualiopi/indicator.rb index 300286f22c2b5b35c92568f4cde1b0c4b2bd6691..6e06a027333a734dbc6b5b039d18b1b21626969a 100644 --- a/app/models/administration/qualiopi/indicator.rb +++ b/app/models/administration/qualiopi/indicator.rb @@ -20,7 +20,7 @@ # # Foreign Keys # -# fk_rails_31f1a0a2c9 (criterion_id => administration_qualiopi_criterions.id) +# fk_rails_eed87f7acf (criterion_id => administration_qualiopi_criterions.id) # class Administration::Qualiopi::Indicator < ApplicationRecord include Sanitizable diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index 7f32cf185681e23ed00331f2f3965d38c16e1a1b..ec8ffed12ad4f46f3cac69fb9e2a8e1264d54b47 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -25,7 +25,7 @@ # # Foreign Keys # -# fk_rails_94b0abd85b (university_id => universities.id) +# fk_rails_bb6a496c08 (university_id => universities.id) # class Communication::Website < ApplicationRecord include WithUniversity diff --git a/app/models/communication/website/configs/base_url.rb b/app/models/communication/website/configs/base_url.rb index a28371ae484a8eea0cbfadf4b1c6a6f3d0a3b79e..2daeee8a29469d9f54419c721df481893f9f4e46 100644 --- a/app/models/communication/website/configs/base_url.rb +++ b/app/models/communication/website/configs/base_url.rb @@ -25,7 +25,7 @@ # # Foreign Keys # -# fk_rails_94b0abd85b (university_id => universities.id) +# fk_rails_bb6a496c08 (university_id => universities.id) # class Communication::Website::Configs::BaseUrl < Communication::Website diff --git a/app/models/communication/website/configs/permalinks.rb b/app/models/communication/website/configs/permalinks.rb index 7ba504bbb39f709ea6ef47af7825e4a2ad26d59f..df46d3c8fecc75aba6cf25a7418402a7e225dbca 100644 --- a/app/models/communication/website/configs/permalinks.rb +++ b/app/models/communication/website/configs/permalinks.rb @@ -25,7 +25,7 @@ # # Foreign Keys # -# fk_rails_94b0abd85b (university_id => universities.id) +# fk_rails_bb6a496c08 (university_id => universities.id) # class Communication::Website::Configs::Permalinks < Communication::Website diff --git a/app/models/communication/website/page.rb b/app/models/communication/website/page.rb index 85c2006d56dd76368a4f13c530897f78ceea8c49..5e1c7d1deb76eb827b8d56adaf3ac14fca818bbe 100644 --- a/app/models/communication/website/page.rb +++ b/app/models/communication/website/page.rb @@ -9,6 +9,7 @@ # description_short :text # featured_image_alt :string # featured_image_credit :text +# full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer @@ -149,7 +150,7 @@ class Communication::Website::Page < ApplicationRecord page = self.dup page.published = false page.save - blocks.each do |block| + blocks.ordered.each do |block| b = block.duplicate b.about = page b.save @@ -157,6 +158,11 @@ class Communication::Website::Page < ApplicationRecord page end + def full_width + kind_home? ? true + : attributes['full_width'] + end + def to_s "#{title}" end diff --git a/app/models/communication/website/with_style.rb b/app/models/communication/website/with_style.rb index 3d5172b77321c06f02baf1e992a2e370ebc53a0a..299621d5283d4b3e44f79afa8c48325db52abcf5 100644 --- a/app/models/communication/website/with_style.rb +++ b/app/models/communication/website/with_style.rb @@ -6,6 +6,10 @@ module Communication::Website::WithStyle style end + def has_style? + !url.blank? + end + protected def load_style diff --git a/app/models/education/program.rb b/app/models/education/program.rb index 8a9ebf684731b179be924b511517c6d1e4ee6620..6606cc0a800220c485453fdbf0551abdcb757c4c 100644 --- a/app/models/education/program.rb +++ b/app/models/education/program.rb @@ -45,7 +45,7 @@ # # Foreign Keys # -# fk_rails_6e16107511 (university_id => universities.id) +# fk_rails_08b351087c (university_id => universities.id) # fk_rails_ec1f16f607 (parent_id => education_programs.id) # class Education::Program < ApplicationRecord diff --git a/app/models/user/with_authentication.rb b/app/models/user/with_authentication.rb index 54de19f4f987d0ac67f895f2ba2dd4ba7ef3c8e7..586a347fe30c3035b8d0f69ff90ec07c45333caf 100644 --- a/app/models/user/with_authentication.rb +++ b/app/models/user/with_authentication.rb @@ -6,7 +6,6 @@ module User::WithAuthentication :timeoutable, :confirmable, :trackable, :lockable, :two_factor_authenticatable, :omniauthable, omniauth_providers: [:saml] # note : i do not use :validatable because of the non-uniqueness of the email. :validatable is replaced by the validation sequences below - has_one_time_password(encrypted: true) validates :role, presence: true diff --git a/app/services/sendinblue/sms_service.rb b/app/services/sendinblue/sms_service.rb index 5c650ce63a9b7a318f07a941e5ee9728cc82be64..123329dd8dcab2702269f910ea3181b78a9a1e29 100644 --- a/app/services/sendinblue/sms_service.rb +++ b/app/services/sendinblue/sms_service.rb @@ -4,7 +4,7 @@ module Sendinblue def self.send_mfa_code(user, code) duration = ActiveSupport::Duration.build(Rails.application.config.devise.direct_otp_valid_for).inspect - message = "#{code} est votre code d'authentification sur #{user.university} (valide #{duration})" + message = I18n.t('sms_code', code: code, university: user.university, duration: duration) self.send_message(user, message) end @@ -30,4 +30,4 @@ module Sendinblue end end end -end \ No newline at end of file +end diff --git a/app/views/admin/application/property/_text.html.erb b/app/views/admin/application/property/_text.html.erb index 0fd8acc44e27911923090811aba761d992ce50c5..42e023087a32681dcda45950a6ee4e6825d0d63b 100644 --- a/app/views/admin/application/property/_text.html.erb +++ b/app/views/admin/application/property/_text.html.erb @@ -17,6 +17,7 @@ end <p> <% if value.blank? %> <i class="fa fa-exclamation-circle text-danger"></i> + <%= t 'properties.text.missing' %> <% else %> <%= strip_tags(value).truncate(200).html_safe %> <% end %> diff --git a/app/views/admin/communication/blocks/_list.html.erb b/app/views/admin/communication/blocks/_list.html.erb index 4f407759b07e695e229ca57b0b80b846bf9db95f..41505a23d876e2b21c81a6532459af7f865c381e 100644 --- a/app/views/admin/communication/blocks/_list.html.erb +++ b/app/views/admin/communication/blocks/_list.html.erb @@ -10,36 +10,44 @@ </h2> </div> <% if about.blocks.any? %> - <table class="<%= table_classes %>"> - <thead> - <tr> - <% if can? :reorder, Communication::Block %> - <th width="20" class="ps-0"> </th> - <% end %> - <th><%= Communication::Block.human_attribute_name('title') %></th> - <th><%= Communication::Block.human_attribute_name('template') %></th> - <th><%= t 'accessibility.label' %></th> - <th></th> - </tr> - </thead> - <tbody data-sortable data-sort-url="<%= reorder_admin_communication_blocks_path %>"> - <% about.blocks.ordered.each do |block| %> - <tr data-id="<%= block.id %>" class="<%= 'draft' unless block.published? %>"> + <div class="table-responsive"> + <table class="<%= table_classes %>"> + <thead> + <tr> <% if can? :reorder, Communication::Block %> - <td><i class="fa fa-bars handle"></i></td> + <th width="20" class="ps-0"> </th> <% end %> - <td><%= block.to_s.truncate(50) %></td> - <td><%= block.template_kind_i18n %></td> - <td><%= render 'admin/application/a11y/status', about: block %></td> - <td class="text-end"> - <div class="btn-group"> - <%= duplicate_link block %> - <%= edit_link block %> - </div> - </td> + <th><%= Communication::Block.model_name.human %></th> + <th></th> + <th><%= t 'accessibility.label' %></th> + <th></th> </tr> - <% end %> - </tbody> - </table> + </thead> + <tbody data-sortable data-sort-url="<%= reorder_admin_communication_blocks_path %>"> + <% about.blocks.ordered.each do |block| %> + <tr data-id="<%= block.id %>" class="<%= 'draft' unless block.published? %>"> + <% if can? :reorder, Communication::Block %> + <td><i class="fa fa-bars handle"></i></td> + <% end %> + <td> + <%= block.to_s.truncate(50) %><br> + <span class="small"><%= block.template_kind_i18n %></span> + </td> + <td class="p-0"> + <%= image_tag "communication/blocks/templates/#{block.template_kind}.jpg", + height: "100px", alt: '', style:"max-height: 50px" %> + </td> + <td><%= render 'admin/application/a11y/status', about: block %></td> + <td class="text-end"> + <div class="btn-group"> + <%= duplicate_link block %> + <%= edit_link block %> + </div> + </td> + </tr> + <% end %> + </tbody> + </table> + </div> <% end %> </div> diff --git a/app/views/admin/communication/websites/pages/_form.html.erb b/app/views/admin/communication/websites/pages/_form.html.erb index 51d19dd142fd3f2c735520fc98425d40f37e6767..129062b21f7ded4da8a2b441914e05fd76247ed6 100644 --- a/app/views/admin/communication/websites/pages/_form.html.erb +++ b/app/views/admin/communication/websites/pages/_form.html.erb @@ -51,6 +51,7 @@ label_method: ->(p) { sanitize p[:label] }, value_method: ->(p) { p[:id] } unless page.kind_home? %> <%= f.input :bodyclass if can?(:edit, @website) %> + <%= f.input :full_width %> </div> </div> <% else %> diff --git a/app/views/admin/communication/websites/pages/show.html.erb b/app/views/admin/communication/websites/pages/show.html.erb index 641abd9c4ab89471a2796dbaf00c701bba52a119..52d79983c0ecc325ac88aba50985168e9d9cd7d3 100644 --- a/app/views/admin/communication/websites/pages/show.html.erb +++ b/app/views/admin/communication/websites/pages/show.html.erb @@ -79,6 +79,9 @@ </p> <% end %> + <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('full_width') %></h3> + <p><%= t @page.full_width %></p> + <% if @page.children.any? %> <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('children') %></h3> <ul class="list-unstyled mb-0"> diff --git a/app/views/admin/communication/websites/pages/static.html.erb b/app/views/admin/communication/websites/pages/static.html.erb index 8812dd9cf9187dad7c1f1988842661a05b0d41ca..bfc2c810316c2a3365b2d924c73e0e83c2494cf4 100644 --- a/app/views/admin/communication/websites/pages/static.html.erb +++ b/app/views/admin/communication/websites/pages/static.html.erb @@ -4,6 +4,7 @@ title: > breadcrumb_title: "<%= @about.breadcrumb_title.blank? ? @about.title : @about.breadcrumb_title %>" url: "<%= @about.path %>" position: <%= @about.position %> +full_width: <%= @about.full_width %> bodyclass: <%= @about.best_bodyclass %> <%= render 'admin/communication/unsplash/static' %> <% if @about.children.published.any? %> diff --git a/app/views/admin/communication/websites/posts/show.html.erb b/app/views/admin/communication/websites/posts/show.html.erb index 77aee23f876abb60567700e350f4bd07b91be64f..494c467914fed62b972215e97dfc0e7454c6eacf 100644 --- a/app/views/admin/communication/websites/posts/show.html.erb +++ b/app/views/admin/communication/websites/posts/show.html.erb @@ -9,7 +9,6 @@ </div> <div class="card-body"> <%= render 'admin/application/property/text', object: @post, property: :description_short %> - <%= render 'admin/application/property/text', object: @post, property: :text %> <%= render 'admin/application/property/summernote_embeds', object: @post, property: :medias %> </div> </div> diff --git a/app/views/admin/education/programs/_form.html.erb b/app/views/admin/education/programs/_form.html.erb index 457d085315c098c51f8c0f96fbd46ddb5b4362c3..af38dc28ad8c928ca2b431e71a790bb89a40775f 100644 --- a/app/views/admin/education/programs/_form.html.erb +++ b/app/views/admin/education/programs/_form.html.erb @@ -110,7 +110,7 @@ <%= render 'admin/education/programs/forms/input_with_inheritance', f: f, property: :prerequisites %> <%= render 'admin/education/programs/forms/input_with_inheritance', - f: f, property: :accessibility %> + f: f, property: :registration %> <%= render 'admin/education/programs/forms/input_with_inheritance', f: f, property: :other %> </div> @@ -118,7 +118,7 @@ <%= render 'admin/education/programs/forms/input_with_inheritance', f: f, property: :pricing %> <%= render 'admin/education/programs/forms/input_with_inheritance', - f: f, property: :registration %> + f: f, property: :accessibility %> <%= render 'admin/education/programs/forms/input_with_inheritance', f: f, property: :contacts %> </div> diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index 7c6c2659641c685fd2c61a792013a301489c99bc..7ae4601e87127f4c63b8bb3d8d2f3ce4a8c2c088 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -57,9 +57,7 @@ </div> </div> <% end %> - <%= render 'admin/education/programs/forms/part', - part: :presentation, - collapsed: true do %> + <%= render 'admin/education/programs/forms/part', part: :presentation, collapsed: true do %> <div class="row"> <div class="col-xxl-6"> <h3 class="h5"> @@ -68,75 +66,44 @@ <p><%= @program.presentation %></p> </div> <div class="col-xxl-6"> - <%= render 'admin/application/property/text', - object: @program, - property: :objectives %> + <%= render 'admin/application/property/text', object: @program, property: :objectives %> </div> </div> <% end %> <%= render 'admin/communication/blocks/list', about: @program %> - <%= render 'admin/education/programs/forms/part', - part: :pedagogy, - collapsed: true do %> + <%= render 'admin/education/programs/forms/part', part: :pedagogy, collapsed: true do %> <div class="row"> <div class="col-xxl-6"> - <%= render 'admin/application/property/text', - object: @program, - property: :content %> + <%= render 'admin/application/property/text', object: @program, property: :content %> </div> <div class="col-xxl-6"> - <%= render 'admin/application/property/text', - object: @program, - property: :pedagogy %> - <%= render 'admin/application/property/text', - object: @program, - property: :evaluation %> + <%= render 'admin/application/property/text', object: @program, property: :pedagogy %> + <%= render 'admin/application/property/text', object: @program, property: :evaluation %> </div> </div> - <%= render 'admin/education/programs/show/teachers', - involvements: @teacher_involvements %> + <%= render 'admin/education/programs/show/teachers', involvements: @teacher_involvements %> <% end %> - <%= render 'admin/education/programs/forms/part', - part: :results, - collapsed: true do %> + <%= render 'admin/education/programs/forms/part', part: :results, collapsed: true do %> <div class="row"> <div class="col-xxl-6"> - <%= render 'admin/application/property/text', - object: @program, - property: :opportunities %> + <%= render 'admin/application/property/text', object: @program, property: :opportunities %> </div> <div class="col-xxl-6"> - <%= render 'admin/application/property/text', - object: @program, - property: :results %> + <%= render 'admin/application/property/text', object: @program, property: :results %> </div> </div> <% end %> - <%= render 'admin/education/programs/forms/part', - part: :admission, - collapsed: true do %> + <%= render 'admin/education/programs/forms/part', part: :admission, collapsed: true do %> <div class="row"> <div class="col-xxl-6"> - <%= render 'admin/application/property/text', - object: @program, - property: :prerequisites %> - <%= render 'admin/application/property/text', - object: @program, - property: :accessibility %> - <%= render 'admin/application/property/text', - object: @program, - property: :other %> + <%= render 'admin/application/property/text', object: @program, property: :prerequisites %> + <%= render 'admin/application/property/text', object: @program, property: :registration %> + <%= render 'admin/application/property/text', object: @program, property: :other %> </div> <div class="col-xxl-6"> - <%= render 'admin/application/property/text', - object: @program, - property: :pricing %> - <%= render 'admin/application/property/text', - object: @program, - property: :registration %> - <%= render 'admin/application/property/text', - object: @program, - property: :contacts %> + <%= render 'admin/application/property/text', object: @program, property: :pricing %> + <%= render 'admin/application/property/text', object: @program, property: :accessibility %> + <%= render 'admin/application/property/text', object: @program, property: :contacts %> </div> </div> <%= render 'admin/education/programs/show/roles', roles: @roles %> diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 42f52103323ff08187afb679dd6130dcf77fc0d2..9f0f1443fd7633ae09c94557e9adda8528a8e304 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -49,6 +49,7 @@ roles: <% else %> roles: [] <% end %> +capacity: <%= @about.capacity %> continuing: <%= @about.continuing %> initial: <%= @about.initial %> apprenticeship: <%= @about.apprenticeship %> diff --git a/app/views/admin/layouts/preview.html.erb b/app/views/admin/layouts/preview.html.erb index 791854a7d1449b14f88d8accfbda64a904f7c50d..fb153506c8c2df22335b0ee815d402c437a7a391 100644 --- a/app/views/admin/layouts/preview.html.erb +++ b/app/views/admin/layouts/preview.html.erb @@ -4,7 +4,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title><%= yield :title %></title> - <% if @website %> + <% if @website && @website.has_style? %> <link rel="stylesheet" media="all" href="<%= style_admin_communication_website_path @website.id, website_id: nil %>" /> <% else %> <%= stylesheet_link_tag 'admin', media: 'all' %> diff --git a/app/views/devise/mailer/two_factor_authentication_code.html.erb b/app/views/devise/mailer/two_factor_authentication_code.html.erb index b36205a1edb1798b0019d77e467cbe5538216c97..2f9f3a3a90b3a45461cd64173aaffc5c7d86cd85 100644 --- a/app/views/devise/mailer/two_factor_authentication_code.html.erb +++ b/app/views/devise/mailer/two_factor_authentication_code.html.erb @@ -1 +1 @@ -<p><%= t('devise.mailer.two_factor_authentication_code.text_html', university: @university, code: @code) %></p> +<p><%= t('devise.mailer.two_factor_authentication_code.text_html', university: @university, code: @code, duration: @duration) %></p> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index bcf630102246690aa7a52c88b41161a1b381f613..c28642d8ddbee5c818c2cc315e97a55eb19dc9bb 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -97,6 +97,7 @@ en: description_short: Lead text featured_image: Featured image featured_image_alt: Alt text + full_width: Full width header_text: Title displayed in header parent: Parent page published: Published? @@ -637,5 +638,6 @@ en: communication_website_page: breadcrumb_title: If the field is empty, page title will be used in breadcrumbs. description: If this field is empty, the "lead text" field will be used. If also emty the main text's begining will be used. + full_width: On large screens, a full width page uses all available space for the content. This is good for landing pages, or to make them spectacular. If the page is not full width, the content column will be smaller to make reading easier. The unused space might be used for a table of contents. communication_website_post: description: If this field is empty, the "lead text" field will be used. If also emty the main text's begining will be used. diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 292af67bf47bc34ec376f345cd48434e0a188217..5017d765186c4fea73bc22609bafbd50e25ec416 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -97,6 +97,7 @@ fr: description_short: Chapô featured_image: Image à la une featured_image_alt: Texte alternatif + full_width: Pleine largeur header_text: Titre affiché dans le header parent: Page parente published: Publié ? @@ -641,5 +642,6 @@ fr: communication_website_page: breadcrumb_title: Si ce champ est vide le titre de la page sera utilisé dans le fil d'Ariane. description: Si ce champ est vide le "chapô" sera utilisé. Si il est également vide le début du texte principal sera utilisé. + full_width: Sur de grands écrans, la page en pleine largeur utilisera tout l'espace disponible, ce qui est pertinent pour événementialiser une page. Si la page n'est pas en pleine largeur, l'espace dédié au contenu sera réduit pour faciliter la lecture, et l'espace libre pourra être utilisé pour une table des matières facilitant la navigation. communication_website_post: description: Si ce champ est vide le "chapô" sera utilisé. Si il est également vide le début du texte principal sera utilisé. diff --git a/config/locales/en.yml b/config/locales/en.yml index 82bc9e24a232212eee5b800b5468d5fd2d2334e7..81d8721d041f8b765046598b0036baaf8552c619 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -5,6 +5,9 @@ en: zero: Congratulations, no accessibility problem detected! one: '1 error' other: '%{count} errors' + status: + true: Accessible + false: Not accessible warnings: one: '1 insight' other: '%{count} insights' @@ -30,7 +33,6 @@ en: transcription_missing: title: No transcription text_html: The HTML iframe has no text transcription for blind people, for people with low bandwidth or no javascript enabled. Please add a text transcription. - activerecord: attributes: import: @@ -126,7 +128,7 @@ en: mailer: two_factor_authentication_code: subject: "Two-factor authentication code" - text_html: "Your two-factor authentication code for %{university} is: <br><br><b>%{code}</b><br><br>It will expire in 5 minutes." + text_html: "Your two-factor authentication code for %{university} is: <br><br><b>%{code}</b><br><br>It will expire in %{duration}." omniauth_callbacks: failure: "Failed to sign in." sessions: @@ -184,7 +186,7 @@ en: privacy_policy: https://osuny.org/politique-de-confidentialite hello: "Hello %{name}!" home: Home - import: + imports: error_msg: "Line %{line}: %{error}" errors: Errors hint_html: "File must be an .xlsx excel file.<br>The first line must contain the headers.<br>The hearders are mandatory and must be strictly respected.<br>All characters must be encoded as UTF-8.<br>Fields marked with an asterisk are mandatory." @@ -234,6 +236,9 @@ en: desktop: Desktop privacy_policy: Privacy policy privacy_policy_url: https://osuny.org/politique-de-confidentialite + properties: + text: + missing: Missing text quit: Quit remove: Remove reset: Reset @@ -257,6 +262,7 @@ en: test_chars: "%{min_length} characters min." show: Show slug_error: can only contain downcase letters, numbers, and dashes. + sms_code: "%{code} is your authentication code on %{university} (valid %{duration})" static: Static file terms_of_service: Terms of service terms_of_service_url: https://osuny.org/conditions-d-utilisation diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 030f3878be8d70b313cf8cdd1626c5674a0f0ddc..d6ff7c7d58f7db7a2916ff779070495020bfb808 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -33,7 +33,6 @@ fr: transcription_missing: title: Pas de transcription text_html: Le cadre HTML n'est pas accompagné d'une transcription textuelle pour les personnes malvoyantes, ou pour les situations de faible débit qui empêcheraient la lecture. - activerecord: attributes: import: @@ -129,11 +128,11 @@ fr: mailer: two_factor_authentication_code: subject: "Code d'authentification à deux facteurs" - text_html: "Votre code d'authentification pour %{university} est :<br><br><b>%{code}</b><br><br>Il expirera dans 5 minutes." + text_html: "Votre code d'authentification pour %{university} est :<br><br><b>%{code}</b><br><br>Il expirera dans %{duration}." omniauth_callbacks: failure: "Échec de l'authentification." passwords: - new: + new: send_me_reset_password_instructions: Réinitialiser mon mot de passe sessions: signed_in: '' @@ -240,6 +239,9 @@ fr: desktop: Ordinateur de bureau privacy_policy: Politique de confidentialité privacy_policy_url: https://osuny.org/politique-de-confidentialite + properties: + text: + missing: Texte manquant quit: Quitter remove: Retirer reset: Réinitialiser @@ -263,6 +265,7 @@ fr: test_chars: "%{min_length} caractères min." show: Voir slug_error: ne peut contenir que des lettres minuscules, des chiffres et des traits d'union. + sms_code: "%{code} est votre code d'authentification sur %{university} (valide %{duration})" static: Fichier statique terms_of_service: Conditions d'utilisation terms_of_service_url: https://osuny.org/conditions-d-utilisation diff --git a/db/migrate/20220722103657_add_full_width_to_communication_website_page.rb b/db/migrate/20220722103657_add_full_width_to_communication_website_page.rb new file mode 100644 index 0000000000000000000000000000000000000000..fe39e1f418e1746cb82328703a118dab65c559a6 --- /dev/null +++ b/db/migrate/20220722103657_add_full_width_to_communication_website_page.rb @@ -0,0 +1,5 @@ +class AddFullWidthToCommunicationWebsitePage < ActiveRecord::Migration[6.1] + def change + add_column :communication_website_pages, :full_width, :boolean, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 3a8420e9472bf89d4c66b57b80fd563e0be2fd80..5bf91459823f0ccd00ef1d950ca51d75d29662c2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,14 +10,14 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_07_04_164321) do +ActiveRecord::Schema.define(version: 2022_07_22_103657) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" enable_extension "unaccent" - create_table "action_text_rich_texts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "action_text_rich_texts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.text "body" t.string "record_type", null: false @@ -27,7 +27,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true end - create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_attachments", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false t.uuid "record_id", null: false @@ -37,7 +37,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end - create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_blobs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "key", null: false t.string "filename", null: false t.string "content_type" @@ -51,13 +51,13 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_active_storage_blobs_on_university_id" end - create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_variant_records", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "blob_id", null: false t.string "variation_digest", null: false t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end - create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.integer "number" t.text "name" t.text "description" @@ -65,7 +65,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.datetime "updated_at", precision: 6, null: false end - create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "criterion_id", null: false t.integer "number" t.text "name" @@ -79,7 +79,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["criterion_id"], name: "index_administration_qualiopi_indicators_on_criterion_id" end - create_table "communication_blocks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_blocks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "about_type" t.uuid "about_id" @@ -94,7 +94,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_communication_blocks_on_university_id" end - create_table "communication_extranets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranets", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.uuid "university_id", null: false t.string "domain" @@ -106,7 +106,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_communication_extranets_on_university_id" end - create_table "communication_website_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "name" @@ -136,7 +136,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["communication_website_post_id", "communication_website_category_id"], name: "post_category" end - create_table "communication_website_git_files", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_git_files", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "previous_path" t.string "about_type", null: false t.uuid "about_id", null: false @@ -148,7 +148,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "index_communication_website_git_files_on_website_id" end - create_table "communication_website_imported_authors", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_authors", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "author_id" @@ -164,7 +164,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "idx_communication_website_imported_auth_on_website" end - create_table "communication_website_imported_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "category_id" @@ -182,7 +182,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "idx_communication_website_imported_cat_on_website" end - create_table "communication_website_imported_media", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_media", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "identifier" t.jsonb "data" t.text "file_url" @@ -197,7 +197,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "index_communication_website_imported_media_on_website_id" end - create_table "communication_website_imported_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "page_id" @@ -221,7 +221,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "index_communication_website_imported_pages_on_website_id" end - create_table "communication_website_imported_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "post_id" @@ -246,7 +246,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "index_communication_website_imported_posts_on_website_id" end - create_table "communication_website_imported_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.integer "status", default: 0 @@ -256,7 +256,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "index_communication_website_imported_websites_on_website_id" end - create_table "communication_website_menu_items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menu_items", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "menu_id", null: false @@ -276,7 +276,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["website_id"], name: "index_communication_website_menu_items_on_website_id" end - create_table "communication_website_menus", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menus", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -288,7 +288,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_communication_website_menus_on_university_id" end - create_table "communication_website_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -310,13 +310,14 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.string "bodyclass" t.uuid "language_id" t.text "featured_image_credit" + t.boolean "full_width", default: false t.index ["communication_website_id"], name: "index_communication_website_pages_on_communication_website_id" t.index ["language_id"], name: "index_communication_website_pages_on_language_id" t.index ["parent_id"], name: "index_communication_website_pages_on_parent_id" t.index ["university_id"], name: "index_communication_website_pages_on_university_id" end - create_table "communication_website_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -340,7 +341,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_communication_website_posts_on_university_id" end - create_table "communication_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "url" @@ -387,7 +388,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["priority", "run_at"], name: "delayed_jobs_priority" end - create_table "education_academic_years", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_academic_years", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.integer "year" t.datetime "created_at", precision: 6, null: false @@ -402,7 +403,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_person_id", "education_academic_year_id"], name: "index_person_academic_year" end - create_table "education_cohorts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_cohorts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "program_id", null: false t.uuid "academic_year_id", null: false @@ -421,7 +422,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_person_id", "education_cohort_id"], name: "index_person_cohort" end - create_table "education_diplomas", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_diplomas", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "short_name" t.integer "level", default: 0 @@ -434,7 +435,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_education_diplomas_on_university_id" end - create_table "education_programs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_programs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.integer "level" @@ -493,7 +494,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["education_program_id", "user_id"], name: "index_education_programs_users_on_program_id_and_user_id" end - create_table "education_schools", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_schools", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -508,7 +509,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_education_schools_on_university_id" end - create_table "imports", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "imports", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.integer "number_of_lines" t.jsonb "processing_errors" t.integer "kind" @@ -521,14 +522,14 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["user_id"], name: "index_imports_on_user_id" end - create_table "languages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "languages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "iso_code" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false end - create_table "research_journal_articles", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_articles", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "title" t.datetime "published_at" t.uuid "university_id", null: false @@ -558,7 +559,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["researcher_id"], name: "index_research_journal_articles_researchers_on_researcher_id" end - create_table "research_journal_volumes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_volumes", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_journal_id", null: false t.string "title" @@ -577,7 +578,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_research_journal_volumes_on_university_id" end - create_table "research_journals", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journals", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "title" t.text "description" @@ -589,7 +590,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_research_journals_on_university_id" end - create_table "research_laboratories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_laboratories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -601,7 +602,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_research_laboratories_on_university_id" end - create_table "research_laboratory_axes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_laboratory_axes", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_laboratory_id", null: false t.string "name" @@ -615,7 +616,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_research_laboratory_axes_on_university_id" end - create_table "research_theses", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_theses", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_laboratory_id", null: false t.uuid "author_id", null: false @@ -633,7 +634,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_research_theses_on_university_id" end - create_table "universities", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "universities", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "identifier" t.string "address" @@ -657,7 +658,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.jsonb "sso_mapping" end - create_table "university_organizations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_organizations", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "long_name" @@ -680,7 +681,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_university_organizations_on_university_id" end - create_table "university_people", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_people", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "user_id" t.string "last_name" @@ -716,7 +717,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["user_id"], name: "index_university_people_on_user_id" end - create_table "university_person_experiences", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_experiences", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.uuid "organization_id", null: false @@ -730,7 +731,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_university_person_experiences_on_university_id" end - create_table "university_person_involvements", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_involvements", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.integer "kind" @@ -745,7 +746,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_university_person_involvements_on_university_id" end - create_table "university_roles", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_roles", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "target_type" t.uuid "target_id" @@ -757,7 +758,7 @@ ActiveRecord::Schema.define(version: 2022_07_04_164321) do t.index ["university_id"], name: "index_university_roles_on_university_id" end - create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "users", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "first_name" t.string "last_name" diff --git a/test/fixtures/communication/websites.yml b/test/fixtures/communication/websites.yml index 6b436633f64b74d0481604586bfe3dd4e1ae18c3..78817fa75f2494d30e61980d680f224d40cc6ccb 100644 --- a/test/fixtures/communication/websites.yml +++ b/test/fixtures/communication/websites.yml @@ -25,7 +25,7 @@ # # Foreign Keys # -# fk_rails_94b0abd85b (university_id => universities.id) +# fk_rails_bb6a496c08 (university_id => universities.id) # website_with_github: university: default_university