forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/0.27-stable' of github.com:AjuntamentdeBarcelon…
…a/decidim into release/0.27-stable-bcn
- Loading branch information
Showing
125 changed files
with
1,458 additions
and
354 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
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
43 changes: 43 additions & 0 deletions
43
decidim-admin/app/views/decidim/admin/components/_actions.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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<% if component.manifest.admin_engine %> | ||
<%= icon_link_to "pencil", manage_component_path(component), t("actions.manage", scope: "decidim.admin"), class: "action-icon--manage" %> | ||
<% 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 %> | ||
<% else %> | ||
<%= icon_link_to "check", url_for(action: :publish, id: component, controller: "components"), t("actions.publish", scope: "decidim.admin"), class: "action-icon--publish", method: :put %> | ||
<% end %> | ||
<% else %> | ||
<span class="action-space icon"></span> | ||
<% end %> | ||
|
||
<% if allowed_to? :update, :component, component: component %> | ||
<%= icon_link_to "cog", url_for(action: :edit, id: component, controller: "components"), t("actions.configure", scope: "decidim.admin"), class: "action-icon--configure" %> | ||
<% else %> | ||
<span class="action-space icon"></span> | ||
<% end %> | ||
|
||
<% if allowed_to? :update, :component, component: component %> | ||
<% if component.manifest.actions.empty? %> | ||
<%= icon "key", class: "action-icon action-icon--disabled" %> | ||
<% else %> | ||
<%= icon_link_to "key", url_for(action: :edit, component_id: component, controller: "component_permissions"), t("actions.permissions", scope: "decidim.admin"), class: "action-icon--permissions" %> | ||
<% end %> | ||
<% else %> | ||
<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 %> | ||
<span class="action-space icon"></span> | ||
<% 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
Oops, something went wrong.