diff --git a/app/controllers/extranet/academic_years_controller.rb b/app/controllers/extranet/academic_years_controller.rb index 822020505aefc4632416f284104aaa56e217ff34..8fe001a2b8684c27851afe89d915e84562c7a42d 100644 --- a/app/controllers/extranet/academic_years_controller.rb +++ b/app/controllers/extranet/academic_years_controller.rb @@ -1,10 +1,10 @@ class Extranet::AcademicYearsController < Extranet::ApplicationController load_and_authorize_resource class: Education::AcademicYear, - through: :current_university, - through_association: :academic_years + through: :about, + through_association: :education_academic_years def index - @academic_years = about&.academic_years + @academic_years = about&.education_academic_years .ordered .page(params[:page]) .per(20) diff --git a/app/controllers/extranet/cohorts_controller.rb b/app/controllers/extranet/cohorts_controller.rb index 62ee6a5603936fffa448914a12e76101c50a75b5..b249e48a3a5073f7da8537cedfa599240000ee24 100644 --- a/app/controllers/extranet/cohorts_controller.rb +++ b/app/controllers/extranet/cohorts_controller.rb @@ -1,11 +1,11 @@ class Extranet::CohortsController < Extranet::ApplicationController load_and_authorize_resource class: Education::Cohort, - through: :current_university, + through: :about, through_association: :education_cohorts def index @facets = Education::Cohort::Facets.new params[:facets], { - model: about.cohorts, + model: about.education_cohorts, about: about } @cohorts = @facets.results diff --git a/app/controllers/extranet/home_controller.rb b/app/controllers/extranet/home_controller.rb index 41f0e8a1988fa589601f394d52f3ec9c05179938..2fd1bc392397c974ead90cb20610ac81fabaa5df 100644 --- a/app/controllers/extranet/home_controller.rb +++ b/app/controllers/extranet/home_controller.rb @@ -1,7 +1,7 @@ class Extranet::HomeController < Extranet::ApplicationController def index return redirect_to admin_root_path unless current_extranet - @cohorts = about&.cohorts.ordered.limit(5) - @experiences = about&.experiences.ordered.limit(10) + @cohorts = about&.education_cohorts.ordered.limit(5) + @experiences = about&.university_person_experiences.ordered.limit(10) end end diff --git a/app/controllers/extranet/organizations_controller.rb b/app/controllers/extranet/organizations_controller.rb index 1f8e867b1cda98c5fbc04ed8fa091f10f7da284c..ec718d441227937335a651247c3c12cdb6530ea3 100644 --- a/app/controllers/extranet/organizations_controller.rb +++ b/app/controllers/extranet/organizations_controller.rb @@ -1,11 +1,11 @@ class Extranet::OrganizationsController < Extranet::ApplicationController load_and_authorize_resource class: University::Organization, - through: :current_university, - through_association: :organizations + through: :about, + through_association: :university_person_alumni_organizations def index @facets = University::Organization::Facets.new params[:facets], { - model: about&.alumni_organizations, + model: about&.university_person_alumni_organizations, about: about } @organizations = @facets.results diff --git a/app/controllers/extranet/persons_controller.rb b/app/controllers/extranet/persons_controller.rb index 866a2e30cdf38d4a1f0a0bca1c9e1ccd371f8fd3..62ab54deec37d01caa9d5893baac57fc00a9d4af 100644 --- a/app/controllers/extranet/persons_controller.rb +++ b/app/controllers/extranet/persons_controller.rb @@ -1,12 +1,12 @@ class Extranet::PersonsController < Extranet::ApplicationController load_and_authorize_resource class: University::Person::Alumnus, through: :current_university, - through_association: :people + through_association: :university_person_alumni def index @facets = University::Person::Alumnus::Facets.new params[:facets], { - model: about&.alumni, - about: current_extranet.about + model: about&.university_person_alumni, + about: about } @people = @facets.results .ordered diff --git a/app/models/university/person/alumnus/import.rb b/app/models/university/person/alumnus/import.rb index d20bb55ea706dbba6ecad79822f23ac4bf44c31c..3eec650f8591f7a706b724f900346b7aa0363c1d 100644 --- a/app/models/university/person/alumnus/import.rb +++ b/app/models/university/person/alumnus/import.rb @@ -146,17 +146,23 @@ class University::Person::Alumnus::Import < ApplicationRecord # substitute local data for testing substitutes = { # Arnaud - 'c6b78fac-0a5f-4c44-ad22-4ee68ed382bb' => '23279cab-8bc1-4c75-bcd8-1fccaa03ad55', # DUT MMI - 'ae3e067a-63b4-4c3f-ba9c-468ade0e4182' => '863b8c9c-1ed1-4af7-b92c-7264dfb6b4da', # MASTER IJBA - 'f4d4a92f-8b8f-4778-a127-9293684666be' => '8dfaee2a-c876-4b1c-8e4e-8380d720c71f', # DU_BILINGUE - '6df53074-195c-4299-8b49-bbc9d7cad41a' => 'be3cb0b2-7f66-4c5f-b8d7-6a39a0480c46', # DU_JRI - '0d81d3a2-a12c-4326-a395-fd0df4a3ea4f' => '56a50383-3ef7-43f6-8e98-daf279e86802' # DUT_JOURNALISME + # 'c6b78fac-0a5f-4c44-ad22-4ee68ed382bb' => '23279cab-8bc1-4c75-bcd8-1fccaa03ad55', # DUT MMI + # 'ae3e067a-63b4-4c3f-ba9c-468ade0e4182' => '863b8c9c-1ed1-4af7-b92c-7264dfb6b4da', # MASTER IJBA + # 'f4d4a92f-8b8f-4778-a127-9293684666be' => '8dfaee2a-c876-4b1c-8e4e-8380d720c71f', # DU_BILINGUE + # '6df53074-195c-4299-8b49-bbc9d7cad41a' => 'be3cb0b2-7f66-4c5f-b8d7-6a39a0480c46', # DU_JRI + # '0d81d3a2-a12c-4326-a395-fd0df4a3ea4f' => '56a50383-3ef7-43f6-8e98-daf279e86802' # DUT_JOURNALISME # Alex # 'c6b78fac-0a5f-4c44-ad22-4ee68ed382bb' => '02e6f703-d15b-4841-ac95-3c47d88e21b5', # DUT MMI # 'ae3e067a-63b4-4c3f-ba9c-468ade0e4182' => '8fdfafb7-11fd-456c-9f47-7fd76dddb373', # MASTER IJBA # 'f4d4a92f-8b8f-4778-a127-9293684666be' => 'fab9b86c-8872-4df5-9a97-0e30b104a837', # DU_BILINGUE # '6df53074-195c-4299-8b49-bbc9d7cad41a' => 'cb1a26b9-fe5c-4ad1-9715-71cec4642910', # DU_JRI # '0d81d3a2-a12c-4326-a395-fd0df4a3ea4f' => '91c44fd2-f0a4-4189-a3f5-311322b7b472' # DUT_JOURNALISME + # Sebou + 'c6b78fac-0a5f-4c44-ad22-4ee68ed382bb' => 'ea5d32be-b86a-4257-984a-4d84717dd1d6', # DUT MMI + 'ae3e067a-63b4-4c3f-ba9c-468ade0e4182' => '701c3a4f-3585-4152-b866-da17f4e80e77', # MASTER IJBA + 'f4d4a92f-8b8f-4778-a127-9293684666be' => '0c05b690-ebd1-4efa-862c-81ea0978fb0b', # DU_BILINGUE + '6df53074-195c-4299-8b49-bbc9d7cad41a' => '4ded6dfa-2fab-4e77-b58d-0d97344a04d1', # DU_JRI + '0d81d3a2-a12c-4326-a395-fd0df4a3ea4f' => '4edac5cd-6564-4e47-a18c-960d3e5de54e' # DUT_JOURNALISME } id = substitutes[id] if substitutes.has_key? id end