Skip to content
Snippets Groups Projects
Commit 1b90e92a authored by pabois's avatar pabois
Browse files

Merge branch 'master' of github.com:noesya/osuny

parents 6f9f8fe6 9fc7a449
No related branches found
No related tags found
Loading
......@@ -40,8 +40,15 @@ class University::Person::Administrator < University::Person
def for_website?(website)
is_administration && website.about_school? && (
website.about.university_people_through_role_involvements.find_by(id: id).present? ||
website.programs.published.joins(:involvements_through_roles).where(university_person_involvements: { person_id: id }).any?
website.about
.university_people_through_role_involvements
.find_by(id: id)
.present? ||
website.programs
.published
.joins(:involvements_through_roles)
.where(university_person_involvements: { person_id: id })
.any?
)
end
end
......@@ -9,6 +9,8 @@ email: "<%= @person.email %>"
<% if @person.best_picture.attached? %>
image: "<%= @person.best_picture.blob.id %>"
<% end %>
description: >
<%= prepare_text_for_static @person.description %>
roles:
<% if @person.author.for_website?(@website) %>
- author
......
......@@ -8,4 +8,6 @@ first_name: >
last_name: >
<%= @administrator.last_name %>
slug: "<%= @administrator.slug %>"
description: >
<%= prepare_text_for_static @administrator.description %>
---
......@@ -8,4 +8,6 @@ first_name: >
last_name: >
<%= @author.last_name %>
slug: "<%= @author.slug %>"
description: >
<%= prepare_text_for_static @author.description %>
---
......@@ -8,4 +8,6 @@ first_name: >
last_name: >
<%= @researcher.last_name %>
slug: "<%= @researcher.slug %>"
description: >
<%= prepare_text_for_static @researcher.description %>
---
......@@ -8,4 +8,6 @@ first_name: >
last_name: >
<%= @teacher.last_name %>
slug: "<%= @teacher.slug %>"
description: >
<%= prepare_text_for_static @teacher.description %>
---
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