diff --git a/app/controllers/admin/communication/websites/agenda/events_controller.rb b/app/controllers/admin/communication/websites/agenda/events_controller.rb
index 17ad3b8d5..67097b1b1 100644
--- a/app/controllers/admin/communication/websites/agenda/events_controller.rb
+++ b/app/controllers/admin/communication/websites/agenda/events_controller.rb
@@ -30,6 +30,10 @@ def show
breadcrumb
end
+ def preview
+ render layout: 'admin/layouts/preview'
+ end
+
def new
@event.parent = @website.events.find(params[:parent_id]) if params.has_key?(:parent_id)
@categories = categories
diff --git a/app/controllers/admin/education/programs_controller.rb b/app/controllers/admin/education/programs_controller.rb
index c06dd64c2..0308e4687 100644
--- a/app/controllers/admin/education/programs_controller.rb
+++ b/app/controllers/admin/education/programs_controller.rb
@@ -3,6 +3,7 @@ class Admin::Education::ProgramsController < Admin::Education::Programs::Applica
before_action :load_teacher_people, only: [:new, :edit, :create, :update]
+ include Admin::HasPreview
include Admin::HasStaticAction
include Admin::Localizable
@@ -36,7 +37,6 @@ def show
end
def preview
- @website = @program.websites&.first
render layout: 'admin/layouts/preview'
end
@@ -90,6 +90,11 @@ def restore
protected
+ def prepare_preview
+ super
+ @body_class += ' offcanvas-toc'
+ end
+
def load_part
part_from_params = params.dig('education_program', 'part')
@part = part_from_params if ['admission', 'certification', 'pedagogy', 'presentation', 'results'].include?(part_from_params)
diff --git a/app/controllers/admin/university/organizations_controller.rb b/app/controllers/admin/university/organizations_controller.rb
index d8bbbb48c..a471c8773 100644
--- a/app/controllers/admin/university/organizations_controller.rb
+++ b/app/controllers/admin/university/organizations_controller.rb
@@ -4,6 +4,7 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio
through_association: :organizations,
except: :restore
+ include Admin::HasPreview
include Admin::HasStaticAction
include Admin::Localizable
@@ -36,6 +37,10 @@ def show
breadcrumb
end
+ def preview
+ render layout: 'admin/layouts/preview'
+ end
+
def new
@categories = categories
breadcrumb
@@ -87,6 +92,11 @@ def restore
protected
+ def prepare_preview
+ super
+ @body_class += ' full-width'
+ end
+
def breadcrumb
super
add_breadcrumb University::Organization.model_name.human(count: 2),
diff --git a/app/controllers/admin/university/people_controller.rb b/app/controllers/admin/university/people_controller.rb
index dce9bac1f..a03c5fb6a 100644
--- a/app/controllers/admin/university/people_controller.rb
+++ b/app/controllers/admin/university/people_controller.rb
@@ -4,6 +4,7 @@ class Admin::University::PeopleController < Admin::University::ApplicationContro
through_association: :people,
except: :restore
+ include Admin::HasPreview
include Admin::HasStaticAction
include Admin::Localizable
@@ -43,6 +44,10 @@ def show
breadcrumb
end
+ def preview
+ render layout: 'admin/layouts/preview'
+ end
+
def new
@categories = categories
breadcrumb
@@ -95,6 +100,11 @@ def restore
protected
+ def prepare_preview
+ super
+ @body_class += ' full-width'
+ end
+
def breadcrumb
super
add_breadcrumb University::Person.model_name.human(count: 2),
diff --git a/app/controllers/concerns/admin/has_preview.rb b/app/controllers/concerns/admin/has_preview.rb
index c5df386d1..9a885f3d3 100644
--- a/app/controllers/concerns/admin/has_preview.rb
+++ b/app/controllers/concerns/admin/has_preview.rb
@@ -3,6 +3,7 @@ module Admin::HasPreview
included do
before_action :set_preview, only: :show
+ before_action :prepare_preview, only: :preview
end
def preview
@@ -11,9 +12,15 @@ def preview
end
protected
-
+
def set_preview
@preview = true
end
+
+ def prepare_preview
+ @website ||= resource.websites&.first || current_university.websites.first
+ @body_class = resource.hugo_body_class
+ @body_class += ' full-width' if resource.try(:full_width)
+ end
end
\ No newline at end of file
diff --git a/app/models/communication/website/agenda/event.rb b/app/models/communication/website/agenda/event.rb
index acc47560e..ce4869980 100644
--- a/app/models/communication/website/agenda/event.rb
+++ b/app/models/communication/website/agenda/event.rb
@@ -143,6 +143,10 @@ def sorting_time
from_day.in_time_zone.to_time
end
+ def hugo_body_class
+ 'events__page'
+ end
+
protected
# Methods for Communication::Website::Agenda::Period::InPeriod
diff --git a/app/models/communication/website/agenda/exhibition.rb b/app/models/communication/website/agenda/exhibition.rb
index 6a1567c07..9eb69c170 100644
--- a/app/models/communication/website/agenda/exhibition.rb
+++ b/app/models/communication/website/agenda/exhibition.rb
@@ -108,6 +108,10 @@ def references
menus
end
+ def hugo_body_class
+ 'exhibitions__page'
+ end
+
protected
def list_blocks_template_kind
diff --git a/app/models/communication/website/jobboard/job.rb b/app/models/communication/website/jobboard/job.rb
index a454fdc4b..6fb5b6ef3 100644
--- a/app/models/communication/website/jobboard/job.rb
+++ b/app/models/communication/website/jobboard/job.rb
@@ -79,4 +79,8 @@ def current?
from_day <= Date.current && (to_day.nil? || Date.current <= to_day)
end
+ def hugo_body_class
+ 'jobs__page'
+ end
+
end
diff --git a/app/models/communication/website/page.rb b/app/models/communication/website/page.rb
index 2bbcb54bf..ec18eb4ed 100644
--- a/app/models/communication/website/page.rb
+++ b/app/models/communication/website/page.rb
@@ -128,6 +128,10 @@ def self.direct_connection_permitted_about_class
nil
end
+ def hugo_body_class
+ 'pages__section'
+ end
+
protected
def last_ordered_element
diff --git a/app/models/communication/website/page/administration_location.rb b/app/models/communication/website/page/administration_location.rb
index 61476157d..6a2af257f 100644
--- a/app/models/communication/website/page/administration_location.rb
+++ b/app/models/communication/website/page/administration_location.rb
@@ -29,4 +29,8 @@ def dependencies
def git_path_relative
'locations/_index.html'
end
+
+ def hugo_body_class
+ 'locations__taxonomy'
+ end
end
diff --git a/app/models/communication/website/page/communication_agenda.rb b/app/models/communication/website/page/communication_agenda.rb
index cf620635f..2fa391da6 100644
--- a/app/models/communication/website/page/communication_agenda.rb
+++ b/app/models/communication/website/page/communication_agenda.rb
@@ -29,4 +29,8 @@ def git_path_relative
def special_page_categories
website.agenda_categories
end
+
+ def hugo_body_class
+ 'events__section'
+ end
end
diff --git a/app/models/communication/website/page/communication_agenda_exhibition.rb b/app/models/communication/website/page/communication_agenda_exhibition.rb
index ddd9cd92a..494faadc5 100644
--- a/app/models/communication/website/page/communication_agenda_exhibition.rb
+++ b/app/models/communication/website/page/communication_agenda_exhibition.rb
@@ -29,4 +29,8 @@ def git_path_relative
def special_page_categories
website.agenda_categories
end
+
+ def hugo_body_class
+ 'exhibitions__section'
+ end
end
diff --git a/app/models/communication/website/page/communication_jobboard.rb b/app/models/communication/website/page/communication_jobboard.rb
index 3d7249322..097bd4d81 100644
--- a/app/models/communication/website/page/communication_jobboard.rb
+++ b/app/models/communication/website/page/communication_jobboard.rb
@@ -29,4 +29,8 @@ def git_path_relative
def special_page_categories
website.jobboard_categories
end
+
+ def hugo_body_class
+ 'jobs__section'
+ end
end
diff --git a/app/models/communication/website/page/communication_portfolio.rb b/app/models/communication/website/page/communication_portfolio.rb
index 2fea410f6..6cc117ac4 100644
--- a/app/models/communication/website/page/communication_portfolio.rb
+++ b/app/models/communication/website/page/communication_portfolio.rb
@@ -29,4 +29,8 @@ def git_path_relative
def special_page_categories
website.portfolio_categories
end
+
+ def hugo_body_class
+ 'projects__section'
+ end
end
diff --git a/app/models/communication/website/page/communication_post.rb b/app/models/communication/website/page/communication_post.rb
index 0d3153848..fd417d754 100644
--- a/app/models/communication/website/page/communication_post.rb
+++ b/app/models/communication/website/page/communication_post.rb
@@ -30,4 +30,8 @@ def git_path_relative
def special_page_categories
website.post_categories
end
+
+ def hugo_body_class
+ 'posts__section'
+ end
end
diff --git a/app/models/communication/website/page/education_diploma.rb b/app/models/communication/website/page/education_diploma.rb
index 52c01e047..9ad0d5217 100644
--- a/app/models/communication/website/page/education_diploma.rb
+++ b/app/models/communication/website/page/education_diploma.rb
@@ -29,4 +29,8 @@ def dependencies
def git_path_relative
'diplomas/_index.html'
end
+
+ def hugo_body_class
+ 'diplomas__taxonomy'
+ end
end
diff --git a/app/models/communication/website/page/education_program.rb b/app/models/communication/website/page/education_program.rb
index 980c2db8e..5b726159a 100644
--- a/app/models/communication/website/page/education_program.rb
+++ b/app/models/communication/website/page/education_program.rb
@@ -33,4 +33,8 @@ def git_path_relative
def special_page_categories
university.education_program_categories
end
+
+ def hugo_body_class
+ 'programs__section'
+ end
end
diff --git a/app/models/communication/website/page/education_school.rb b/app/models/communication/website/page/education_school.rb
index 11f9de40a..6fd27a30e 100644
--- a/app/models/communication/website/page/education_school.rb
+++ b/app/models/communication/website/page/education_school.rb
@@ -29,4 +29,8 @@ def dependencies
def git_path_relative
'schools/_index.html'
end
+
+ def hugo_body_class
+ 'schools__section'
+ end
end
diff --git a/app/models/communication/website/page/home.rb b/app/models/communication/website/page/home.rb
index f0a5e50dd..ac42035ca 100644
--- a/app/models/communication/website/page/home.rb
+++ b/app/models/communication/website/page/home.rb
@@ -15,4 +15,8 @@ def git_path_relative
def default_parent
nil
end
+
+ def hugo_body_class
+ 'page__home'
+ end
end
diff --git a/app/models/communication/website/page/person.rb b/app/models/communication/website/page/person.rb
index fca16c9e0..d24df83f0 100644
--- a/app/models/communication/website/page/person.rb
+++ b/app/models/communication/website/page/person.rb
@@ -37,4 +37,8 @@ def git_path_relative
def special_page_categories
university.person_categories
end
+
+ def hugo_body_class
+ 'persons__section'
+ end
end
diff --git a/app/models/communication/website/portfolio/project.rb b/app/models/communication/website/portfolio/project.rb
index 21056124e..299e6382a 100644
--- a/app/models/communication/website/portfolio/project.rb
+++ b/app/models/communication/website/portfolio/project.rb
@@ -91,6 +91,10 @@ def references
menus
end
+ def hugo_body_class
+ 'projects__page'
+ end
+
protected
def list_blocks_template_kind
diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb
index 8654f1958..c11f20e4f 100644
--- a/app/models/communication/website/post.rb
+++ b/app/models/communication/website/post.rb
@@ -109,6 +109,10 @@ def published_at_in(language)
localization_for(language).try(:published_at)
end
+ def hugo_body_class
+ 'posts__page'
+ end
+
protected
def update_authors_status_if_necessary!
diff --git a/app/models/education/program.rb b/app/models/education/program.rb
index f5942fbf0..0a59f8e43 100644
--- a/app/models/education/program.rb
+++ b/app/models/education/program.rb
@@ -144,6 +144,10 @@ def programs
Education::Program.where(id: id)
end
+ def hugo_body_class
+ 'programs__section'
+ end
+
protected
def check_accessibility
diff --git a/app/models/university/organization.rb b/app/models/university/organization.rb
index d466068a8..333b6371b 100644
--- a/app/models/university/organization.rb
+++ b/app/models/university/organization.rb
@@ -99,6 +99,10 @@ def references
mentions_by_blocks
end
+ def hugo_body_class
+ 'organizations__page'
+ end
+
protected
def blocks_mentioning_self
diff --git a/app/models/university/person.rb b/app/models/university/person.rb
index 21651a624..f688de57b 100644
--- a/app/models/university/person.rb
+++ b/app/models/university/person.rb
@@ -174,6 +174,10 @@ def full_street_address
[address, "#{zipcode} #{city} #{country}".strip].join(', ')
end
+ def hugo_body_class
+ 'persons__page'
+ end
+
def to_s_with_mail_in(language)
best_localization_for(language).to_s_with_mail
end
diff --git a/app/views/admin/application/preview/_featured_image.html.erb b/app/views/admin/application/preview/_featured_image.html.erb
new file mode 100644
index 000000000..64288f964
--- /dev/null
+++ b/app/views/admin/application/preview/_featured_image.html.erb
@@ -0,0 +1,15 @@
+<%
+if l10n.featured_image.present? && l10n.featured_image.attached?
+ format = ActiveStorage::Utils.format(l10n.featured_image)
+%>
+
+ <%= kamifusen_tag l10n.featured_image, alt: l10n.featured_image_alt %>
+ <% if l10n.featured_image_credit.present? %>
+
+
+ <%= sanitize l10n.featured_image_credit %>
+
+
+ <% end %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/application/preview/_hero.html.erb b/app/views/admin/application/preview/_hero.html.erb
index 23f3fecc9..519e0f990 100644
--- a/app/views/admin/application/preview/_hero.html.erb
+++ b/app/views/admin/application/preview/_hero.html.erb
@@ -2,11 +2,10 @@
@title = @l10n.title
@subtitle = @l10n.try(:subtitle)
@summary = @l10n.summary
-@image = @l10n.featured_image
hero_classes = "hero"
-if @image.present? && @image.attached?
- format = ActiveStorage::Utils.format(@image)
+if @l10n.featured_image.present? && @l10n.featured_image.attached?
+ format = ActiveStorage::Utils.format(@l10n.featured_image)
hero_classes += " hero--with-image hero--image-#{format}" if format.present?
end
%>
@@ -30,9 +29,7 @@ end
<%= @title %>
<% end %>
-
- <%= kamifusen_tag @image if @image.present? && @image.attached? %>
-
+ <%= render 'admin/application/preview/featured_image', l10n: @l10n %>
diff --git a/app/views/admin/application/preview/preview.html.erb b/app/views/admin/application/preview/preview.html.erb
index 882ec3804..2c1ca96e6 100644
--- a/app/views/admin/application/preview/preview.html.erb
+++ b/app/views/admin/application/preview/preview.html.erb
@@ -2,9 +2,7 @@
<%= render 'admin/application/preview/hero' %>
- <%= render 'admin/communication/contents/show',
- about: @l10n,
- strip_javascript: true %>
+ <%= render 'admin/communication/contents/show', about: @l10n, strip_javascript: true %>
diff --git a/app/views/admin/communication/websites/agenda/events/preview.html.erb b/app/views/admin/communication/websites/agenda/events/preview.html.erb
new file mode 100644
index 000000000..f82b4988b
--- /dev/null
+++ b/app/views/admin/communication/websites/agenda/events/preview.html.erb
@@ -0,0 +1,242 @@
+<%
+hero_classes = "hero"
+if @l10n.featured_image.present? && @l10n.featured_image.attached?
+ format = ActiveStorage::Utils.format(@l10n.featured_image)
+ hero_classes += " hero--with-image hero--image-#{format}" if format.present?
+end
+%>
+
+
+
+
+
+ <% if @l10n.subtitle.present? %>
+
class="has-lead"<% end %>>
+
+ <%= @l10n.title %>
+ <% if @l10n.subtitle.present? %>
+ <%= @l10n.subtitle %>
+ <% end %>
+
+
+ <% else %>
+
<%= @l10n.title %>
+ <% end %>
+ <% if @event.categories.any? %>
+
+ <% end %>
+
+ <%= render 'admin/application/preview/featured_image', l10n: @l10n %>
+
+
+
+
+
+ <% if @l10n.text.present? || @l10n.notes.present? %>
+
+
Informations pratiques
+
+ <%= sanitize @l10n.text %>
+
+ <%= sanitize @l10n.notes %>
+
+
+ <% if @l10n.header_cta %>
+
+ <%= @l10n.header_cta_label %>
+
+ <% end %>
+
+ <% end %>
+
+
Dates
+
+
+ <%= date_range_i18n @event.from_day,
+ @event.to_day,
+ format: :long,
+ layout: :one_line,
+ locale: @l10n.language.iso_code %>
+
+
+ <% if @event.kind_recurring? %>
+
Événement régulier
+ <% end %>
+ <% unless @event.archive? %>
+
+
+ Ajouter à mon agenda
+
+
+ <% end %>
+
+ <% if @event.time_slots.any? %>
+
+ <% end%>
+
+
+
+
+ <% if @l10n.summary.present? %>
+
+
+
+
+ <%= sanitize @l10n.summary %>
+
+
+
+
+ <% end %>
+
+ <%= render 'admin/communication/contents/show', about: @l10n, strip_javascript: true %>
+
+
+ <% if @event.kind_parent? %>
+
+
+
+ <%
+ @event.days.ordered.each do |day|
+ events = day.events.ordered
+ next if events.none?
+ %>
+
+
+ <%= l day.date, format: :long %>
+
+
+ <%
+ events.each do |event|
+ event_l10n = event.localization_for(@l10n.language)
+ %>
+
+
+
+ <% if event_l10n.subtitle.present? %>
+
+
+ <%= event_l10n.subtitle %>
+
+ <% else %>
+
+ <% end %>
+ <%
+ if event.time_slots.one?
+ time_slot = event.time_slots.first
+ time_slot_l10n = time_slot.localization_for(@l10n.language)
+ %>
+
+
+ <%= l time_slot_l10n.from_hour, format: "%Hh%M" %>
+ <% if time_slot_l10n.to_hour %>
+ <%= l time_slot_l10n.to_hour, format: "%Hh%M" %>
+ <% end %>
+
+
+ <% end %>
+ <% if event_l10n.summary.present? %>
+
+ <%= sanitize event_l10n.summary %>
+
+ <% end %>
+ <% if event.categories.any? %>
+
+ <% end %>
+
+
+ <%= kamifusen_tag event_l10n.featured_image, width: 1280 %>
+
+
+
+ <% end %>
+
+
+ <% end %>
+
+
+
+ <% end %>
+ <%
+ if @event.kind_child?
+ parent = @event.parent
+ parent_l10n = parent.localization_for(@l10n.language)
+ %>
+
+
Cet événement fait partie de
+
+
+
+
+ <%= parent_l10n.subtitle %>
+
+
<%= sanitize parent_l10n.summary %>
+
En savoir plus
+
+ <% if parent_l10n.featured_image.attached? %>
+
+ <%= kamifusen_tag parent_l10n.featured_image %>
+
+ <% end %>
+
+
+ <% end %>
+
+
+<%= render 'admin/application/preview/lightbox' %>
\ No newline at end of file
diff --git a/app/views/admin/education/programs/preview.html.erb b/app/views/admin/education/programs/preview.html.erb
index a921f0732..c49f242a0 100644
--- a/app/views/admin/education/programs/preview.html.erb
+++ b/app/views/admin/education/programs/preview.html.erb
@@ -1,161 +1,258 @@
-<%
-@title = @l10n.name
-@image = @l10n.best_featured_image
-%>
-
-
- <%= sanitize @l10n.presentation %>
-
-
-
-
-
-
-
<%= Education::Program::Localization.human_attribute_name('presentation') %>
-
-
-
- <%= sanitize @l10n.objectives %>
-
-
-
Informations administratives
-
-
- Informations administratives
-
- <% if @program.diploma %>
-
- Crédits ECTS
- <%= @program.diploma.ects %>
-
- <% end %>
-
- <%= Education::Program::Localization.human_attribute_name('initial') %>
- <%= t @program.initial %>
-
-
- <%= Education::Program::Localization.human_attribute_name('continuing') %>
- <%= t @program.continuing %>
-
-
- <%= Education::Program::Localization.human_attribute_name('apprenticeship') %>
- <%= t @program.apprenticeship %>
-
-
-
-
+
+
+
+
+
+
+ <%= @l10n.name %>
+ <%= sanitize @l10n.summary %>
+
+
-
-
-
-
- <%= render 'admin/communication/contents/show', about: @l10n, strip_javascript: true %>
-
-
-
-
-
-
-
Pédagogie
+
+
+
+ <% if @program.diploma %>
+ <%= Education::Program.human_attribute_name(:diploma) %>
+ <%= @program.diploma.to_s_in(current_language) %>
+ <%= Education::Diploma.human_attribute_name(:level) %>
+ <%= @program.diploma.level_i18n %>
+ <% end %>
+ <% if @l10n.duration %>
+ <%= Education::Program::Localization.human_attribute_name(:duration) %>
+ <%= @l10n.duration %>
+ <% end %>
+ <% if @program.locations.any? %>
+ <%= Education::Program.human_attribute_name('locations') %>
+
+ <% @program.locations.ordered(current_language).each do |location| %>
+ <%= location.to_s_in(current_language) %>
+ <% end %>
+
+ <% end %>
+
-
-
-
<%= Education::Program::Localization.human_attribute_name('content') %>
- <%= sanitize @l10n.content %>
-
-
-
<%= Education::Program::Localization.human_attribute_name('pedagogy') %>
- <%= sanitize @l10n.pedagogy %>
-
-
-
<%= Education::Program::Localization.human_attribute_name('evaluation') %>
- <%= sanitize @l10n.evaluation %>
-
-
-
Enseignants·es
-
-
- Enseignants·es
-
- <% @program.university_person_involvements.each do |involvement| %>
- <% involvement_l10n = involvement.best_localization_for(@l10n.language) %>
+
+
+
+
+
+
+
+
Présentation
+
+ <%= render 'admin/application/preview/featured_image', l10n: @l10n %>
+ <% if @l10n.presentation %>
+
+ <%= Education::Program::Localization.human_attribute_name(:presentation) %>
+ <%= sanitize @l10n.presentation %>
+
+ <% end %>
+ <% if @l10n.best_objectives %>
+
+ <%= Education::Program::Localization.human_attribute_name(:objectives) %>
+ <%= sanitize @l10n.best_objectives %>
+
+ <% end %>
+
+ <% if @l10n.blocks.published.any? %>
+
+ <%= render 'admin/communication/contents/show', about: @l10n, strip_javascript: true %>
+
+ <% end %>
+
+
+ Informations administratives
+
+ Informations administratives
+
+ <% if @program.diploma %>
+
+ <%= Education::Diploma.human_attribute_name('ects') %>
+ <%= @program.diploma.ects %>
+
+ <% end %>
- <%= involvement.to_s_in(@l10n.language) %>
- <%= involvement_l10n.description %>
+ <%= Education::Program.human_attribute_name('initial') %>
+ <%= t @program.initial %>
- <% end %>
-
-
+
+ <%= Education::Program.human_attribute_name('continuing') %>
+ <%= t @program.continuing %>
+
+
+ <%= Education::Program.human_attribute_name('apprenticeship') %>
+ <%= t @program.apprenticeship %>
+
+
+ <%= Education::Program.human_attribute_name('capacity') %>
+ <%= @program.capacity %>
+
+
+
+
-
-
-
+
-
-
-
-
-
Après la formation
+
+
+
+
Pédagogie
+
+ <% if @l10n.best_content %>
+
+ <%= Education::Program::Localization.human_attribute_name('content') %>
+ <%= sanitize @l10n.best_content %>
+
+ <% end %>
+ <% if @l10n.best_pedagogy %>
+
+ <%= Education::Program::Localization.human_attribute_name('pedagogy') %>
+ <%= sanitize @l10n.best_pedagogy %>
+
+ <% end %>
+ <% if @l10n.best_evaluation %>
+
+ <%= Education::Program::Localization.human_attribute_name('evaluation') %>
+ <%= sanitize @l10n.best_evaluation %>
+
+ <% end %>
+ <% if @program.university_person_involvements.any? %>
+
+ <% end %>
+
+
-
-
-
<%= Education::Program::Localization.human_attribute_name('opportunities') %>
- <%= sanitize @l10n.opportunities %>
- <%= Education::Program::Localization.human_attribute_name('results') %>
- <%= sanitize @l10n.results %>
-
-
-
+
-
-
-
-
-
Admission
-
-
-
-
<%= Education::Program::Localization.human_attribute_name('prerequisites') %>
- <%= sanitize @l10n.prerequisites %>
-
-
-
<%= Education::Program::Localization.human_attribute_name('pricing') %>
- <%= sanitize @l10n.pricing %>
-
-
-
<%= Education::Program::Localization.human_attribute_name('registration') %>
- <%= sanitize @l10n.registration %>
-
-
-
<%= Education::Program::Localization.human_attribute_name('accessibility') %>
- <%= sanitize @l10n.accessibility %>
-
-
-
<%= Education::Program::Localization.human_attribute_name('other') %>
- <%= sanitize @l10n.other %>
-
-
-
Rôles
- <% @program.university_roles.each do |role| %>
- <% role_l10n = role.best_localization_for(@l10n.language) %>
-
- <%= role_l10n.description %>
- <% role.people.each do |person| %>
- <%= person.to_s_in(@l10n.language) %>
- <%= person.email %>
- <% end %>
-
- <% end %>
+
+
+ <% if @program.qualiopi_certified %>
+
+
+
+
Certification
+
+
+
+ <%= sanitize @l10n.qualiopi_text %>
+
+
+
+
+
+ <% end %>
-
+
\ No newline at end of file
diff --git a/app/views/admin/layouts/preview.html.erb b/app/views/admin/layouts/preview.html.erb
index 723c35d0e..c94ba4eef 100644
--- a/app/views/admin/layouts/preview.html.erb
+++ b/app/views/admin/layouts/preview.html.erb
@@ -26,7 +26,7 @@
<%= javascript_include_tag 'leaflet' %>
<% end %>
-
+
<%= yield %>
diff --git a/app/views/admin/university/organizations/preview.html.erb b/app/views/admin/university/organizations/preview.html.erb
new file mode 100644
index 000000000..198c4fee0
--- /dev/null
+++ b/app/views/admin/university/organizations/preview.html.erb
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ <%= @l10n.to_s %>
+ <%= sanitize @l10n.summary %>
+
+
+
+
+
+
+
+ <%= render 'admin/communication/contents/show',
+ about: @l10n,
+ strip_javascript: true %>
+
+
+
+<%= render 'admin/application/preview/lightbox' %>
\ No newline at end of file
diff --git a/app/views/admin/university/organizations/show.html.erb b/app/views/admin/university/organizations/show.html.erb
index a2d61bb8d..f27213f0f 100644
--- a/app/views/admin/university/organizations/show.html.erb
+++ b/app/views/admin/university/organizations/show.html.erb
@@ -4,6 +4,7 @@
<%= button_advanced do %>
<%= destroy_link @organization %>
<% end %>
+ <%= preview_link %>
<%= edit_link @organization %>
<% end %>
diff --git a/app/views/admin/university/people/preview.html.erb b/app/views/admin/university/people/preview.html.erb
new file mode 100644
index 000000000..756bf4aeb
--- /dev/null
+++ b/app/views/admin/university/people/preview.html.erb
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+ <%= @l10n.to_s %>
+ <%= sanitize @l10n.summary %>
+
+
+
+ <%= kamifusen_tag @person.featured_image if @person.featured_image.present? && @person.featured_image.attached? %>
+
+
+
+
+
+
+
+ <%= render 'admin/communication/contents/show',
+ about: @l10n,
+ strip_javascript: true %>
+
+
+
+<%= render 'admin/application/preview/lightbox' %>
\ No newline at end of file
diff --git a/app/views/admin/university/people/show.html.erb b/app/views/admin/university/people/show.html.erb
index 86c0b9e03..4b636703b 100644
--- a/app/views/admin/university/people/show.html.erb
+++ b/app/views/admin/university/people/show.html.erb
@@ -5,6 +5,7 @@
<%= destroy_link @person %>
<%= static_link static_admin_university_person_path(@person) %>
<% end %>
+ <%= preview_link %>
<%= edit_link @person %>
<% end %>
diff --git a/config/routes/admin/university.rb b/config/routes/admin/university.rb
index f86e00a8f..5510e689b 100644
--- a/config/routes/admin/university.rb
+++ b/config/routes/admin/university.rb
@@ -27,6 +27,7 @@
end
member do
get :static
+ get :preview
get 'administrator/static' => 'people/administrators#static', as: 'static_administrator'
get 'author/static' => 'people/authors#static', as: 'static_author'
get 'experiences' => 'people/experiences#edit'
@@ -50,6 +51,7 @@
end
member do
get :static
+ get :preview
post :restore
end
end