Skip to content

Commit

Permalink
add help text
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Jul 26, 2024
1 parent 8d5320a commit f0d31ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
<div class="item_show__header">
<h2 class="item_show__header-title">
<%= t(".title", component_name: translated_attribute(component.name)) %>
<a class="button button__sm button__secondary" href="<%= new_component_share_token_path %>"><%= icon "add-line" %><%= t("index.new_share_token_button", scope: "decidim.admin.share_tokens") %></a>
<a class="button button__sm button__secondary" href="<%= new_component_share_token_path %>"><%= icon "add-line" %><%= t(".new_share_token_button") %></a>
</h2>
</div>
<div class="mb-4">
<p class="help-text whitespace-pre-line"><%= t(".share_tokens_help", clipboard: icon("clipboard-line", class: "inline-block mb-1")).html_safe %></p>
</div>
<% if @share_tokens.any? %>
<div class="table-scroll">
<table class="table-list">
Expand Down Expand Up @@ -36,7 +39,7 @@
</table>
</div>
<% else %>
<p><%= t ".empty" %></p>
<p><%= t(".empty", new_token_link: link_to(t(".create_new_token"), new_component_share_token_path , class: "button button__text-secondary")).html_safe %></p>
<% end %>
</div>
<%= decidim_paginate @share_tokens %>
7 changes: 6 additions & 1 deletion decidim-admin/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0d31ea

Please sign in to comment.