From 69d608358923b031068b882d6f6efed9ba84b51d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com>
Date: Wed, 6 Jul 2022 17:21:38 +0200
Subject: [PATCH] extranet footer

---
 .../extranet/application/_footer.html.erb     | 20 ++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/app/views/extranet/application/_footer.html.erb b/app/views/extranet/application/_footer.html.erb
index e198e5f38..0ea2da91e 100644
--- a/app/views/extranet/application/_footer.html.erb
+++ b/app/views/extranet/application/_footer.html.erb
@@ -4,14 +4,20 @@
       <%= render 'logo' %>
     </div>
     <div class="row justify-space-between">
-      <address class="col-md-6" itemscope itemtype="https://schema.org/CollegeOrUniversity">
-        <span itemprop="name">Institut de Journalisme Bordeaux Aquitaine</span>
-        <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
-          <span itemprop="streetAddress">1 rue Jacques Ellul</span><br>
-          <span itemprop="postalCode">33000</span>
-          <span itemprop="addressLocality">Bordeaux</span><br>
+      <% if current_extranet.about.is_a?(Education::School) %>
+        <address class="col-md-6" itemscope itemtype="https://schema.org/CollegeOrUniversity">
+          <span itemprop="name"><%= current_extranet.about.name %></span>
+          <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
+            <span itemprop="streetAddress"><%= current_extranet.about.address %></span><br>
+            <span itemprop="postalCode"><%= current_extranet.about.zipcode %></span>
+            <span itemprop="addressLocality"><%= current_extranet.about.city %></span><br>
+          </div>
+        </address>
+      <% elsif current_extranet.about.is_a?(Education::Program) %>
+        <div class="col-md-6" itemscope itemtype="https://schema.org/EducationalOccupationalCredential">
+          <span itemprop="name"><%= current_extranet.about.name %></span>
         </div>
-      </address>
+      <% end %>
 
       <nav class="text-md-end col-md-6">
         <%= link_to t('terms_of_service'),
-- 
GitLab