From 3d07293cc4dd37703076a0b55228f7749d965cf4 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Fri, 24 Dec 2021 12:07:52 +0100
Subject: [PATCH] fix

---
 app/models/education/program.rb                  | 7 ++-----
 app/views/admin/education/programs/show.html.erb | 6 +++++-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/models/education/program.rb b/app/models/education/program.rb
index 115b08d0c..f6bddcdf3 100644
--- a/app/models/education/program.rb
+++ b/app/models/education/program.rb
@@ -32,6 +32,7 @@
 class Education::Program < ApplicationRecord
   include WithGithubFiles
   include WithMenuItemTarget
+  include WithSlug
   include WithTree
   include WithInheritance
   include Communication::Website::WithMedia
@@ -109,11 +110,7 @@ class Education::Program < ApplicationRecord
 
   # Override from WithGithubFiles
   def github_path_generated
-    "_programs/#{path}/index.html".gsub(/\/+/, '/')
-  end
-
-  def make_path
-    self.path = "#{parent&.path}/#{slug}".gsub(/\/+/, '/')
+    "content/programs/#{path}/_index.html".gsub(/\/+/, '/')
   end
 
   def update_children_paths
diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb
index fe12adf4d..c52a813cb 100644
--- a/app/views/admin/education/programs/show.html.erb
+++ b/app/views/admin/education/programs/show.html.erb
@@ -45,7 +45,11 @@
         <h5 class="card-title mb-0"><%= t('education.program.useful_informations') %></h5>
       </div>
       <div class="card-body">
-        <% ['description', 'registration', 'pricing', 'duration', 'contacts', 'accessibility', 'other'].each_with_index do |prop, index| %>
+        <h3 class="h5 mt-4">
+          <%= Education::Program.human_attribute_name('description') %>
+        </h3>
+        <p><% @program.description %></p>
+        <% ['registration', 'pricing', 'duration', 'contacts', 'accessibility', 'other'].each_with_index do |prop, index| %>
           <%
           best_prop_value = @program.public_send("best_#{prop}")
           best_prop_source = @program.public_send("best_#{prop}_source")
-- 
GitLab