Sha256: 8f4698e5feb2895c6b2c03f219350613b185e2b09b78c971eff884924e4589d7

Contents?: true

Size: 1.91 KB

Versions: 15

Compression:

Stored size: 1.91 KB

Contents

- right_column

- content_for :main do
  %h1{:style=>"margin-bottom: 20px;"} Newsletter Details

  = link_to "Back to Newsletters", "/admin/newsletters"

  %h3
    Newsletter:
    = "\"#{@newsletter.name}\""

  Send: 
  = button_to "To #{current_user.email}", "/admin/newsletters/email/#{@newsletter.id}", :confirm=>"Are you sure?", :disable_with=>"Sending..."
  = button_to "To Testers", "/admin/newsletters/send/#{@newsletter.id}?test=1", :confirm=>"Are you sure?", :disable_with=>"Sending..."
  = link_to "Show Testers", "/admin/newsletters/#{@newsletter.id}?check=1&test=1"
  = button_to "To Subscribers", "/admin/newsletters/send/#{@newsletter.id}", :confirm=>"You are about to send this newsletter to real users.  Are you sure?", :disable_with=>"Sending..."
  = link_to "Show Subscribers", "/admin/newsletters/#{@newsletter.id}?check=1"

  %br
  %table{:border=>"1", :cellpadding=>"5", :cellspacing=>"0"}
    %tr
      %th
        Sent At
      %th
        Type
      %th
        Recipients
    - @newsletter.newsletter_sends.order("created_at desc").each do |sends|
      %tr
        %td
          = sends.sent_at.to_s(:db)
        %td
          = sends.is_test? ? "Test" : "Subscibers"
        %td
          = link_to "Show Recipients", "/admin/newsletters/#{@newsletter.id}?recips=#{sends.id}"
  - if @send
    %h3 
      Recipients for send at
      = @send.sent_at.to_s(:db)

  - if params[:check]
    %h3
      = "Recipients for #{params[:test] ? 'Test' : 'Subscriber'} Mode"

  - if @recipients
    = paginate @recipients
    %ul
      - @recipients.each do |recip|
        %li
          = receiver(recip).email 
          - if recip.instance_of?(NewsletterSent)
            = recip.updated_at.to_s(:db)
            = "[ #{recip.status} ]" 
          = pluralize(receiver(recip).email_failures, "fail")  if receiver(recip).email_failures > 0
    = paginate @recipients
  %br
  %br
  = link_to "Back to Newsletters", "/admin/newsletters"

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kit_cms-2.3.22 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.20 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.19 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.18 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.17 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.16 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.15 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.14 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.13 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.11 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.10 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.9 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.8 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.7 app/views/admin/newsletter/history.html.haml
kit_cms-2.3.6 app/views/admin/newsletter/history.html.haml