app/views/decidim/admin/participatory_processes/index.html.erb in decidim-admin-0.4.0 vs app/views/decidim/admin/participatory_processes/index.html.erb in decidim-admin-0.4.1
- old
+ new
@@ -22,11 +22,19 @@
<% if process.promoted? %>
<span data-tooltip class="icon-state icon-highlight" aria-haspopup="true" data-disable-hover="false" title="<%= t("models.participatory_process.fields.promoted", scope: "decidim.admin") %>">
<%= icon "star" %>
</span>
<% end %>
- <%= link_to translated_attribute(process.title), edit_participatory_process_path(process) %><br />
+ <% if can? :update, process %>
+ <%= link_to translated_attribute(process.title), edit_participatory_process_path(process) %><br />
+ <% elsif can? :preview, process %>
+ <%= link_to translated_attribute(process.title), decidim.participatory_process_path(process) %><br />
+ <% elsif can? :read, Decidim::Moderation %>
+ <%= link_to translated_attribute(process.title), decidim_admin.participatory_process_moderations_path(process) %><br />
+ <% else %>
+ <%= translated_attribute(process.title) %>
+ <% end %>
</td>
<td>
<%= l process.created_at, format: :short %>
</td>
<td class="table-list__state">
@@ -35,10 +43,12 @@
<% else %>
<strong class="text-alert"><%= t('.not_published') %></strong>
<% end %>
</td>
<td class="table-list__actions">
+ <% if can? :create, process %>
<%= icon_link_to "clipboard", new_participatory_process_copy_path(process), t("actions.duplicate", scope: "decidim.admin"), class: "action-icon--copy" %>
+ <% end %>
<% if can? :update, process %>
<%= icon_link_to "pencil", edit_participatory_process_path(process), t("actions.configure", scope: "decidim.admin"), class: "action-icon--new" %>
<% end %>