Sha256: 247bc5fa5543c5e778f7033ab3bb8bbcd8b64a43b866d718936c7e51a848c749

Contents?: true

Size: 1.69 KB

Versions: 16

Compression:

Stored size: 1.69 KB

Contents

<% content_for :content_title_extra do %>
  <%= page_header_buttons do %>
    <%= link_to(icon_label(:new, 'New'), new_admin_newsletter_path, title: 'New Newsletter', class: "btn btn-xs btn-default") %>
  <% end %>
<% end %>

<% if false #using_mailchimp? %>
  <% content_for :sidebar do %>
    <%= link_to 'Sync with Mailchimp', admin_newsletters_synchronize_lists_path, class: "action-button greyish" %>
  <% end %>
<% end %>


<% content_for :content_title, 'Newsletter Dashboard' %>

<% @newsletters.in_groups_of(2, false) do |newsletter_row| %>
  <div class="row">
    <% for newsletter in newsletter_row  %>
      <div class="col-md-12">
        <% toolbar = toolbar_btn(newsletter.subscribed_count, admin_newsletter_path(newsletter), title: 'Number of subscriptions', class: 'label label-success pull-right') %>
        <%= panel title: link_to(newsletter.name, admin_newsletter_path(newsletter)), toolbar: toolbar do %>
          <ul class="statistics">
            <% total = newsletter.subscribed_count + newsletter.unsubscribed_count + newsletter.cleaned_count %>
            <li><%= stat_block_small label: 'subscribed', number: newsletter.subscribed_count, color_type: :success, percent: total == 0 ? 0 : (100 * newsletter.subscribed_count / total) %></li>
            <li><%= stat_block_small label: 'unsubscribed', number: newsletter.unsubscribed_count, color_type: :danger, percent: total == 0 ? 0 : (100 * newsletter.unsubscribed_count / total) %></li>
            <li><%= stat_block_small label: 'cleaned', number: newsletter.cleaned_count, color_type: :info, percent: total == 0 ? 0 : (100 * newsletter.cleaned_count / total) %></li>
          </ul>
        <% end %>
      </div>
    <% end %>
  </div>
<% end %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_newsletter-4.2.3.10 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.9 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.8 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.7 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.6 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.5 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.4 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.3 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.2 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3.1 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.3 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.2.3 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.2.2 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.2.1 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.2 app/views/dm_newsletter/admin/newsletters/index.html.erb
dm_newsletter-4.2.1.5 app/views/dm_newsletter/admin/newsletters/index.html.erb