From f0d31ead8f0d7f3e3fb1988913f8a4c0f9afc340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Verg=C3=A9s?= Date: Fri, 26 Jul 2024 10:51:12 +0200 Subject: [PATCH] add help text --- .../app/views/decidim/admin/share_tokens/index.html.erb | 7 +++++-- decidim-admin/config/locales/en.yml | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/decidim-admin/app/views/decidim/admin/share_tokens/index.html.erb b/decidim-admin/app/views/decidim/admin/share_tokens/index.html.erb index 4bf473cd9adf2..0fa51db781e9d 100644 --- a/decidim-admin/app/views/decidim/admin/share_tokens/index.html.erb +++ b/decidim-admin/app/views/decidim/admin/share_tokens/index.html.erb @@ -2,9 +2,12 @@

<%= t(".title", component_name: translated_attribute(component.name)) %> - <%= icon "add-line" %><%= t("index.new_share_token_button", scope: "decidim.admin.share_tokens") %> + <%= icon "add-line" %><%= t(".new_share_token_button") %>

+
+

<%= t(".share_tokens_help", clipboard: icon("clipboard-line", class: "inline-block mb-1")).html_safe %>

+
<% if @share_tokens.any? %>
@@ -36,7 +39,7 @@
<% else %> -

<%= t ".empty" %>

+

<%= t(".empty", new_token_link: link_to(t(".create_new_token"), new_component_share_token_path , class: "button button__text-secondary")).html_safe %>

<% end %> <%= decidim_paginate @share_tokens %> diff --git a/decidim-admin/config/locales/en.yml b/decidim-admin/config/locales/en.yml index 4317b5de43d40..9a7055113080b 100644 --- a/decidim-admin/config/locales/en.yml +++ b/decidim-admin/config/locales/en.yml @@ -983,9 +983,14 @@ en: back_to_share_tokens: Back to share tokens copied: Copied! copy_message: The text was successfully copied to clipboard. - empty: There are no active tokens. + create_new_token: Create your first token! + empty: There are no active tokens. %{new_token_link} never: Never new_share_token_button: New token + share_tokens_help: | + Share tokens are a way to allow access to an unpublished component for non-admin users. + Tokens can be valid for registered users only or have and expiration date if necessary. + To share a new token with someone, create it and then copy the link using the "%{clipboard} clipboard" action icon. title: 'Sharing tokens for component: %{component_name}' new: create: Create