From a51e35fb731d12cde92691d081f52669da4e7fb3 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Thu, 2 Feb 2023 12:36:58 +0100 Subject: [PATCH] Button --- app/views/admin/communication/blocks/_list.html.erb | 5 ++++- config/locales/communication/en.yml | 1 + config/locales/communication/fr.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/admin/communication/blocks/_list.html.erb b/app/views/admin/communication/blocks/_list.html.erb index e31d2ba01..3c60c886e 100644 --- a/app/views/admin/communication/blocks/_list.html.erb +++ b/app/views/admin/communication/blocks/_list.html.erb @@ -1,6 +1,6 @@ <% action = '' -action += link_to t('add'), +action += link_to t('admin.communication.blocks.add'), new_admin_communication_block_path(about_id: about.id, about_type: about.class.name), class: button_classes if can? :create, Communication::Block %> @@ -33,6 +33,9 @@ action += link_to t('add'), <% end %> </tbody> </table> + <% if about.blocks.count > 9 %> + <%= raw action %> + <% end %> </div> <% end %> <% end %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 7d36a67f1..5882e7ef8 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -152,6 +152,7 @@ en: admin: communication: blocks: + add: Add block alerts: file_is_too_big: File is too big! categories: diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 48d61f5d9..06742087e 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -152,6 +152,7 @@ fr: admin: communication: blocks: + add: Ajouter un bloc alerts: file_is_too_big: Le fichier est trop lourd ! categories: -- GitLab