From bd2bb21400bbf3e19eb6476051966fc8f7627d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Fri, 2 Dec 2022 17:02:27 +0100 Subject: [PATCH] static --- .../websites/categories/static.html.erb | 6 ++++++ .../communication/websites/pages/static.html.erb | 6 ++++++ .../communication/websites/posts/static.html.erb | 6 ++++++ app/views/admin/university/people/static.html.erb | 14 ++++++++++---- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app/views/admin/communication/websites/categories/static.html.erb b/app/views/admin/communication/websites/categories/static.html.erb index ab0f75fe9..892e1e383 100644 --- a/app/views/admin/communication/websites/categories/static.html.erb +++ b/app/views/admin/communication/websites/categories/static.html.erb @@ -4,6 +4,12 @@ slug: "<%= @about.path %>" <% if @about.parent %> parent: "<%= @about.parent.path %>" <% end %> +<% if @about.previous_links.any? %> +aliases: +<% @about.previous_links.each do |previous_link| %> + - <%= previous_link.link %> +<% end %> +<% end %> position: <%= @about.position %> <%= render 'admin/communication/unsplash/static' %> description: > diff --git a/app/views/admin/communication/websites/pages/static.html.erb b/app/views/admin/communication/websites/pages/static.html.erb index bfc2c8103..4bb59ed1a 100644 --- a/app/views/admin/communication/websites/pages/static.html.erb +++ b/app/views/admin/communication/websites/pages/static.html.erb @@ -3,6 +3,12 @@ title: > <%= @about.title %> breadcrumb_title: "<%= @about.breadcrumb_title.blank? ? @about.title : @about.breadcrumb_title %>" url: "<%= @about.path %>" +<% if @about.previous_links.any? %> +aliases: +<% @about.previous_links.each do |previous_link| %> + - <%= previous_link.link %> +<% end %> +<% end %> position: <%= @about.position %> full_width: <%= @about.full_width %> bodyclass: <%= @about.best_bodyclass %> diff --git a/app/views/admin/communication/websites/posts/static.html.erb b/app/views/admin/communication/websites/posts/static.html.erb index 3ef5da6c0..c9d01ca0c 100644 --- a/app/views/admin/communication/websites/posts/static.html.erb +++ b/app/views/admin/communication/websites/posts/static.html.erb @@ -2,6 +2,12 @@ title: "<%= @about.title %>" date: "<%= @about.published_at.iso8601 %>" slug: "<%= @about.slug %>" +<% if @about.previous_links.any? %> +aliases: +<% @about.previous_links.each do |previous_link| %> + - <%= previous_link.link %> +<% end %> +<% end %> <% if @about.pinned %> weight: 1 <% end %> diff --git a/app/views/admin/university/people/static.html.erb b/app/views/admin/university/people/static.html.erb index a49e305b5..17df81673 100644 --- a/app/views/admin/university/people/static.html.erb +++ b/app/views/admin/university/people/static.html.erb @@ -2,6 +2,12 @@ title: > <%= @about.to_s %> slug: "<%= @about.slug %>" +<% if @about.previous_links.any? %> +aliases: +<% @about.previous_links.each do |previous_link| %> + - <%= previous_link.link %> +<% end %> +<% end %> first_name: > <%= @about.first_name %> last_name: > @@ -38,12 +44,12 @@ roles: <% end %> <% if @about.involvements_as_teacher.any? %> teachings: -<% @about.involvements_as_teacher.each do |involvement| +<% @about.involvements_as_teacher.each do |involvement| target = involvement.target %> - description: > <%= involvement.description %> - program: + program: title: > <%= target.to_s %> url: > @@ -52,11 +58,11 @@ teachings: <% end %> <% if @about.roles_as_administrator.any? %> administrative_missions: -<% @about.roles_as_administrator.each do |role| +<% @about.roles_as_administrator.each do |role| target = role.target %> - description: > <%= role.to_s %> - target: + target: title: > <%= target.to_s %> url: > -- GitLab