Skip to content

Commit

Permalink
fix surveys component actions
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Sep 16, 2024
1 parent 0f51d17 commit 85ced36
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
<span class="action-space icon"></span>
<% end %>
<% if component.manifest.admin_engine && allowed_to?(:share, :component, component: component) %>
<%= icon_link_to "share", component_share_tokens_path(component_id: component), t("actions.share", scope: "decidim.admin"), class: "action-icon--share" %>
<% else %>
<span class="action-space icon"></span>
<% end %>
<% if allowed_to?(:update, :component, component: component) %>
<% if component.published? %>
<%= icon_link_to "x", url_for(action: :unpublish, id: component, controller: "components"), t("actions.unpublish", scope: "decidim.admin"), class: "action-icon--unpublish", method: :put %>
Expand All @@ -30,12 +36,6 @@
<span class="action-space icon"></span>
<% end %>
<% if allowed_to? :share, :component, component: component %>
<%= icon_link_to "share", url_for(action: :share, id: component, controller: "components"), t("actions.share", scope: "decidim.admin"), class: "action-icon--share", target: "_blank" %>
<% else %>
<span class="action-space icon"></span>
<% end %>
<% if allowed_to? :destroy, :component, component: component %>
<%= icon_link_to "circle-x", url_for(action: :destroy, id: component, controller: "components"), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete %>
<% else %>
Expand Down

0 comments on commit 85ced36

Please sign in to comment.