Skip to content

Commit

Permalink
Blocs dans le footer (#2734)
Browse files Browse the repository at this point in the history
* Footer blocks

* dependencies + a11y

* text

---------

Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
  • Loading branch information
arnaudlevy and SebouChu authored Mar 3, 2025
1 parent 3750d53 commit ed88bc2
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 2 deletions.
9 changes: 8 additions & 1 deletion app/models/communication/website/localization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
#
class Communication::Website::Localization < ApplicationRecord
include AsLocalization
include Contentful
include Initials
include WithAccessibility
include WithOpenApi
include WithPublication
include WithUniversity
Expand All @@ -58,7 +60,8 @@ def exportable_to_git?

def dependencies
# 1 single file for all the languages
[website.config_default_languages]
[website.config_default_languages] +
contents_dependencies
end

def to_s
Expand All @@ -67,6 +70,10 @@ def to_s

protected

def check_accessibility
accessibility_merge_array blocks
end

def create_existing_menus_in_language
menus = website.menus.for_language_id(website.default_language_id)
menus.each do |menu|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@
</div>
<div class="col-lg-8">
<%= render 'admin/application/contact_details/edit', f: f, lf: lf, about: @website, l10n: @l10n %>
<%= osuny_separator %>
</div>
<div class="col-lg-6 col-xxl-4">
</div>
<div class="row">
<div class="offset-lg-4 col-lg-8 col-xxl-6">
<p><%= t('admin.communication.blocks.footer') %></p>
</div>
</div>
<%= render 'admin/communication/contents/editor', about: @l10n %>

<% content_for :action_bar_right do %>
<%= submit f %>
Expand Down
1 change: 1 addition & 0 deletions app/views/admin/communication/websites/static.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ default:
shared_image:
id: <%= @website.default_shared_image.blob&.id %>
<% end %>
<%= render 'admin/communication/contents/static', about: @l10n %>
1 change: 1 addition & 0 deletions config/locales/communication/contents/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ en:
close: Close block edition
title: Block edition
empty: This block is empty and will not appear
footer: The blocks here appear in the website footer, on each page.
templates:
agenda:
description: A list of upcoming events.
Expand Down
1 change: 1 addition & 0 deletions config/locales/communication/contents/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ fr:
close: Fermer l'édition du bloc
title: Édition de bloc
empty: Ce bloc est vide et n'apparaitra pas
footer: Les blocs ajoutés ici apparaissent dans le pied de page (footer) du site, sur chaque page.
templates:
agenda:
description: Une liste d'événements à venir.
Expand Down
110 changes: 110 additions & 0 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ed88bc2

Please sign in to comment.