<%= t ".title" %> <% if allowed_to? :create, :newsletter %> <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.newsletter.name", scope: "decidim.admin").downcase), ["new", "newsletter"], class: "button tiny button--title new" %> <% end %>

<% @newsletters.each do |newsletter| %> <% end %>
<%= t("models.newsletter.fields.subject", scope: "decidim.admin") %> <%= t("models.newsletter.fields.created_at", scope: "decidim.admin") %> <%= t("models.newsletter.fields.sent_at", scope: "decidim.admin") %> <%= t("models.newsletter.fields.progress", scope: "decidim.admin") %>
<%= translated_attribute newsletter.subject %> <%= l newsletter.created_at, format: :long if newsletter.created_at %> <%= l newsletter.sent_at, format: :long if newsletter.sent_at %> <% if newsletter.sent? %> <%= "#{newsletter.total_deliveries} / #{newsletter.total_recipients}" %> <% end %> <% if allowed_to?(:update, :newsletter, newsletter: newsletter) && !newsletter.sent? %> <%= icon_link_to "pencil", decidim_admin.edit_newsletter_path(newsletter), t("actions.edit", scope: "decidim.admin"), class: "edit" %> <% end %> <%= icon_link_to "eye", decidim_admin.newsletter_path(newsletter), t("actions.preview", scope: "decidim.admin"), class: "preview" %> <% if allowed_to?(:destroy, :newsletter, newsletter: newsletter) && !newsletter.sent? %> <%= icon_link_to "circle-x", decidim_admin.newsletter_path(newsletter), t("actions.destroy", scope: "decidim.admin"), method: :delete, data: { confirm: t(".confirm_delete") }, class: "action-icon--remove" %> <% end %>