diff --git a/app/models/university/person.rb b/app/models/university/person.rb index 0b3977be360dd153f5bb7418367a74f50bc98725..8ff4a620267be62f95c37c61c1ce46048ac2b74e 100644 --- a/app/models/university/person.rb +++ b/app/models/university/person.rb @@ -137,12 +137,12 @@ class University::Person < ApplicationRecord before_validation :sanitize_email, :prepare_name - scope :ordered, -> { order(:last_name, :first_name) } - scope :administration, -> { where(is_administration: true) } - scope :teachers, -> { where(is_teacher: true) } - scope :researchers, -> { where(is_researcher: true) } - scope :alumni, -> { where(is_alumnus: true) } - scope :accredited, -> { where(habilitation: true) } + scope :ordered, -> { order(:last_name, :first_name) } + scope :administration, -> { where(is_administration: true) } + scope :teachers, -> { where(is_teacher: true) } + scope :researchers, -> { where(is_researcher: true) } + scope :alumni, -> { where(is_alumnus: true) } + scope :with_habilitation, -> { where(habilitation: true) } scope :for_role, -> (role) { where("is_#{role}": true) } scope :for_category, -> (category_id) { includes(:categories).where(categories: { id: category_id })} scope :for_program, -> (program_id) { diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index ae580906e87aa1f12295e035b30c5f031ada2ef4..9a9ca4675d7276ea67986c61d0775a104bd3109b 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -23,7 +23,7 @@ </div> </div> -<%= render 'admin/application/favorites/show' if current_user.favorites.any? %> +<%= render 'admin/application/favorites/show' %> <div class="row mt-5 pt-5"> <% @namespaces.each do |namespace| %> diff --git a/app/views/admin/research/theses/_form.html.erb b/app/views/admin/research/theses/_form.html.erb index 3b9e0d97c562d9d5393729176acd115089de5937..3d533dc00b1bccf0b28fe02801ebfb4b186dba67 100644 --- a/app/views/admin/research/theses/_form.html.erb +++ b/app/views/admin/research/theses/_form.html.erb @@ -21,7 +21,7 @@ <%= f.association :director, collection: current_university.people .for_language_id(current_university.default_language_id) - .accredited + .with_habilitation .ordered %> </div> </div>