diff --git a/app/assets/images/communication/blocks/templates/locations/map.png b/app/assets/images/communication/blocks/templates/locations/map.png new file mode 100644 index 0000000000000000000000000000000000000000..6dc5e0cc4fd49b0b01b86552aa574349cf799857 Binary files /dev/null and b/app/assets/images/communication/blocks/templates/locations/map.png differ diff --git a/app/helpers/admin/osuny_helper.rb b/app/helpers/admin/osuny_helper.rb index 163d3427d01b313714ba0a45b3dded9b2a7134be..505c098eb03cd4012d3faa45ad800a550e05a5ee 100644 --- a/app/helpers/admin/osuny_helper.rb +++ b/app/helpers/admin/osuny_helper.rb @@ -84,7 +84,7 @@ module Admin::OsunyHelper classes += ' text-muted fst-italic' alert = t('localization.creation_alert') end - link_to name, path, class: classes.strip, data: { confirm: alert } + link_to name.truncate(45), path, class: classes.strip, data: { confirm: alert } end def osuny_link_localized_if(condition, object, path, label_method: :to_s, classes: '') @@ -97,7 +97,7 @@ module Admin::OsunyHelper classes += 'text-muted fst-italic' alert = t('localization.creation_alert') end - link_to_if condition, name, path, class: classes.strip, data: { confirm: alert } + link_to_if condition, name.truncate(45), path, class: classes.strip, data: { confirm: alert } end def osuny_card_classes(horizontal: false) diff --git a/app/models/communication/block/template/location.rb b/app/models/communication/block/template/location.rb index c6a3a5fe5c889ef135d2b8474e4e68b463b7df84..d68379df8b379fe3c0048c9e2bd8dcb16576593c 100644 --- a/app/models/communication/block/template/location.rb +++ b/app/models/communication/block/template/location.rb @@ -3,7 +3,8 @@ class Communication::Block::Template::Location < Communication::Block::Template: has_elements has_layouts [ :grid, - :list + :list, + :map ] has_component :option_image, :boolean, default: true diff --git a/app/views/admin/communication/blocks/edit.html.erb b/app/views/admin/communication/blocks/edit.html.erb index c4e0a81f4b9d57b3e7f3c84e2b6fa0a30982a763..10134c3b6d1452e5ee50433e9a4051cb2bf85ba1 100644 --- a/app/views/admin/communication/blocks/edit.html.erb +++ b/app/views/admin/communication/blocks/edit.html.erb @@ -71,10 +71,8 @@ <textarea name="communication_block[data]" rows="20" cols="200" class="d-none"> {{ JSON.stringify(data) }} </textarea> - <% content_for :action_bar_left do %> - <%= render 'admin/application/l10n/libre_translate_button', l10n: @block.about %> - <% end %> <% content_for :action_bar_right do %> + <%= render 'admin/application/l10n/libre_translate_button', l10n: @block.about %> <%= submit f %> <% end %> <% end %> diff --git a/app/views/admin/communication/websites/agenda/events/_form.html.erb b/app/views/admin/communication/websites/agenda/events/_form.html.erb index 3ca8ba8eeb93e02b963eba091dc59deefbd78cf1..03ccadaceb2d7f1859b1cc4372c0d3b3162ade1c 100644 --- a/app/views/admin/communication/websites/agenda/events/_form.html.erb +++ b/app/views/admin/communication/websites/agenda/events/_form.html.erb @@ -51,11 +51,8 @@ </div> </div> - <% content_for :action_bar_left do %> - <%= render 'admin/application/l10n/libre_translate_button', l10n: l10n %> - <% end %> - <% content_for :action_bar_right do %> + <%= render 'admin/application/l10n/libre_translate_button', l10n: l10n %> <%= submit f %> <% end %> <% end %> diff --git a/app/views/admin/communication/websites/pages/_form.html.erb b/app/views/admin/communication/websites/pages/_form.html.erb index 884c4e5f4d8448d65d189193f1a211be5967b028..6a3e513234db0a4c5c20000663b6b03d31dc4435 100644 --- a/app/views/admin/communication/websites/pages/_form.html.erb +++ b/app/views/admin/communication/websites/pages/_form.html.erb @@ -50,11 +50,8 @@ url = page.new_record? ? admin_communication_website_pages_path </div> </div> - <% content_for :action_bar_left do %> - <%= render 'admin/application/l10n/libre_translate_button', l10n: @l10n %> - <% end %> - <% content_for :action_bar_right do %> + <%= render 'admin/application/l10n/libre_translate_button', l10n: @l10n %> <%= submit f %> <% end %> <% end %> diff --git a/app/views/admin/communication/websites/portfolio/projects/_form.html.erb b/app/views/admin/communication/websites/portfolio/projects/_form.html.erb index 8d5db630d034ceb939ee5bf21d6b43c54a5db2fd..d3cbe252004ad3d447a04746c7f1f1f38651d971 100644 --- a/app/views/admin/communication/websites/portfolio/projects/_form.html.erb +++ b/app/views/admin/communication/websites/portfolio/projects/_form.html.erb @@ -29,11 +29,8 @@ </div> </div> - <% content_for :action_bar_left do %> - <%= render 'admin/application/l10n/libre_translate_button', l10n: l10n %> - <% end %> - <% content_for :action_bar_right do %> + <%= render 'admin/application/l10n/libre_translate_button', l10n: l10n %> <%= submit f %> <% end %> <% end %> diff --git a/app/views/admin/communication/websites/posts/_form.html.erb b/app/views/admin/communication/websites/posts/_form.html.erb index 55b798a9a7ff99438497588617ccfe57b910ee20..1bd1396f005e1184f02ff87be611393dd61b58c1 100644 --- a/app/views/admin/communication/websites/posts/_form.html.erb +++ b/app/views/admin/communication/websites/posts/_form.html.erb @@ -49,11 +49,8 @@ </div> </div> - <% content_for :action_bar_left do %> - <%= render 'admin/application/l10n/libre_translate_button', l10n: @l10n %> - <% end %> - <% content_for :action_bar_right do %> + <%= render 'admin/application/l10n/libre_translate_button', l10n: @l10n %> <%= submit f %> <% end %> <% end %> diff --git a/app/views/admin/communication/websites/show.html.erb b/app/views/admin/communication/websites/show.html.erb index dfe504acf28466836287544ac870fad29eb825a1..10c83a7ae03897728ebab4ce702a9a1da7e8c9a5 100644 --- a/app/views/admin/communication/websites/show.html.erb +++ b/app/views/admin/communication/websites/show.html.erb @@ -17,23 +17,23 @@ number_of_panels = 0 <div class="row gx-5"> <% if @website.feature_posts && @posts.any? && can?(:read, Communication::Website::Post) %> <% number_of_panels += 1 %> - <div class="col-lg-6"> + <div class="col-xl-6"> <%= render 'admin/communication/websites/show/posts' %> </div> <% end %> <% if @website.feature_agenda && @events.any? && can?(:read, Communication::Website::Agenda::Event) %> <% number_of_panels += 1 %> - <div class="col-lg-6"> + <div class="col-xl-6"> <%= render 'admin/communication/websites/show/events' %> </div> <% end %> <% if @website.feature_portfolio && @projects.any? && can?(:read, Communication::Website::Portfolio::Project) %> <% number_of_panels += 1 %> - <div class="col-lg-6"> + <div class="col-xl-6"> <%= render 'admin/communication/websites/show/projects' %> </div> <% end %> - <div class="col-lg-<%= number_of_panels.even? ? 12 : 6 %>"> + <div class="col-xl-<%= number_of_panels.even? ? 12 : 6 %>"> <%= render 'admin/communication/websites/show/pages', large: number_of_panels.even? if can?(:read, Communication::Website::Page) %> </div> </div> diff --git a/config/locales/communication/contents/en.yml b/config/locales/communication/contents/en.yml index fd0e3d65df206e06d9fb8572fcd9beabd53adb19..044549382bcaae2c4a004e2117e69678ff8f053c 100644 --- a/config/locales/communication/contents/en.yml +++ b/config/locales/communication/contents/en.yml @@ -399,6 +399,9 @@ en: list: description: Locations are shown as a list, with images on the left and summary on the right. label: List + map: + description: A geographic map, with a pin for every location with a known address. + label: Map organizations: description: A list of organizations with logo, name and website. edit: diff --git a/config/locales/communication/contents/fr.yml b/config/locales/communication/contents/fr.yml index 57b19913534f089a71bfcd596798185e87dfa98c..9769e8b9bc6912b7cb7c6fce586114e10c03365a 100644 --- a/config/locales/communication/contents/fr.yml +++ b/config/locales/communication/contents/fr.yml @@ -399,6 +399,9 @@ fr: list: description: Les sites sont présentés en liste, avec une image à gauche et le résumé à droite. label: Liste + map: + description: Une carte géographique avec un repère pour chaque site dont l'adresse est connue. + label: Carte organizations: description: Une liste d'organisations, avec leur logo, leur site et leur nom. edit: