Skip to content
Snippets Groups Projects
Commit 0fc18934 authored by pabois's avatar pabois
Browse files

cleanup

parent 9557b9e5
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,11 @@ class Admin::Communication::Website::IndexPagesController < Admin::Communication
def index
breadcrumb
@kinds = Communication::Website::IndexPage.kinds_global
if @website.about_school?
# if @website.about_school?
@kinds += Communication::Website::IndexPage.kinds_school
elsif @website.about_journal?
# elsif @website.about_journal?
@kinds += Communication::Website::IndexPage.kinds_journal
end
# end
end
def edit
......
......@@ -45,7 +45,7 @@ class University::Person::Administrator < University::Person
end
def for_website?(website)
is_administration && website.about_school? && (
is_administration && website.has_administrators? && (
website.about
.university_people_through_role_involvements
.find_by(id: id)
......
......@@ -45,7 +45,7 @@ class University::Person::Researcher < University::Person
end
def for_website?(website)
is_researcher && website.about_journal? && website.research_articles
is_researcher && website.has_researchers? && website.research_articles
.joins(:people)
.where(university_people: { id: id })
.any?
......
......@@ -45,7 +45,7 @@ class University::Person::Teacher < University::Person
end
def for_website?(website)
is_teacher && website.about_school? && website.education_programs
is_teacher && website.has_teachers? && website.education_programs
.published
.joins(:university_person_involvements)
.where(university_person_involvements: { person_id: id })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment