forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ea816c
commit e8a4675
Showing
4 changed files
with
70 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 29 additions & 27 deletions
56
decidim-admin/app/views/decidim/admin/share_tokens/edit.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
<% add_decidim_page_title(t(".title")) %> | ||
<div class="item_show__header"> | ||
<h1 class="item_show__header-title"> | ||
<%= t ".title", name: resource_title %> | ||
<a class="button button__sm button__secondary" href="<%= share_tokens_path %>"><%= t("share_tokens.index.back_to_share_tokens", scope: "decidim.admin") %></a> | ||
</h1> | ||
</div> | ||
<div class="item__edit-form"> | ||
<%= decidim_form_for(@form, url: share_tokens_path(:update, id: current_token), html: { class: "form-defaults form edit_share_token" }) do |f| %> | ||
<div class="card"> | ||
<div class="card-section"> | ||
<div class="form__wrapper"> | ||
<div class="card pt-4"> | ||
<div class="row column"> | ||
<label for="share_token-token"><%= t("token", scope: "decidim.admin.models.share_token.fields") %></label> | ||
<div class="flex gap-4"> | ||
<%= text_field_tag :token, current_token.token, id: "share_token-token", aria: { label: t("token", scope: "decidim.admin.models.share_token.fields") }, disabled: true %> | ||
<button type="button" class="button button__sm button__secondary text-nowrap" data-clipboard-copy="#share_token-token" data-clipboard-content="<%= current_token.url %>" data-clipboard-copy-label="<%= t("copied", scope: "decidim.admin.share_tokens.index") %>" data-clipboard-copy-message="<%= t("copy_message", scope: "decidim.admin.share_tokens.index") %>"><%= t("actions.copy_link", scope: "decidim.admin.share_tokens") %></button> | ||
</div> | ||
</div> | ||
<%= render partial: "form", object: f %> | ||
</div> | ||
<%= decidim_form_for(@form, url: share_tokens_path(:update, id: current_token), html: { class: "form-defaults form edit_share_token" }) do |f| %> | ||
<div class="card"> | ||
<div class="card-divider"> | ||
<h2 class="card-title"> | ||
<div class="flex--sbc"> | ||
<%= t ".title", name: resource_title %> | ||
<%= link_to :back do %> | ||
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %> | ||
<%= t("share_tokens.index.back_to_share_tokens", scope: "decidim.admin") %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</h2> | ||
</div> | ||
<div class="item__edit-sticky"> | ||
<div class="item__edit-sticky-container"> | ||
<%= f.submit t(".update"), class: "button button__sm button__secondary" %> | ||
<div class="card-section"> | ||
<div class="row column"> | ||
<label for="share_token-token"><%= t("token", scope: "decidim.admin.models.share_token.fields") %></label> | ||
<div class="input-group"> | ||
<%= text_field_tag :token, current_token.token, id: "share_token-token", aria: { label: t("token", scope: "decidim.admin.models.share_token.fields") }, disabled: true, class: "input-group-field mb-none" %> | ||
<div class="input-group-button"> | ||
<button type="button" class="button" data-clipboard-copy="#share_token-token" data-clipboard-content="<%= current_token.url %>" data-clipboard-copy-label="<%= t("copied", scope: "decidim.admin.share_tokens.index") %>" data-clipboard-copy-message="<%= t("copy_message", scope: "decidim.admin.share_tokens.index") %>"> | ||
<%= t("actions.copy_link", scope: "decidim.admin.share_tokens") %> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
<%= render partial: "form", object: f %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
|
||
<div class="button--double form-general-submit"> | ||
<%= f.submit t(".update") %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters