Skip to content

Commit

Permalink
more small ch-ch-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Neufeld committed Aug 4, 2009
1 parent 5802964 commit e8aaec8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/bulk_action_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def bulk_create_campaign
@campaign = @session_user.active_campaign || FreemailerCampaign.new(:sender => @session_user, :title => params[:title])
if @campaign.valid?
new_contacts = @session_user.active_contact_cart.contacts + Contact.find_all_by_id(params[:contact_ids]) - @campaign.contacts
@campaign.contacts << new_contacts
@campaign.contacts << new_contacts.uniq
@campaign.save
@session_user.active_campaign = @campaign
@session_user.save
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/freemailer_campaigns_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def send_campaign
def statuses
statuses = FreemailerCampaignContact.paginate(:page => params[:page], :order => 'created_at DESC')
render :partial => 'statuses', :locals => { :statuses => statuses,
:campaign => @freemailer_campaign }
:campaign => @freemailer_campaign, :per_page => 10 }
end

# ############## Restful Actions ##############################
Expand Down
2 changes: 1 addition & 1 deletion app/views/contact_carts/_contacts.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
- form_tag(contact_cart_remove_contact_path(cart), :class => 'contact-cart-remove-contact') do
= hidden_field_tag 'contact_to_remove_id', contact.id
= hidden_field_tag 'return_to', url_for(sanitized_url_params)
= icon_submit_tag (:vcard_delete, "Remove", :class => 'contact-cart-remove-submit')
= icon_submit_tag(:vcard_delete, "Remove", :class => 'contact-cart-remove-submit')
5 changes: 3 additions & 2 deletions app/views/contact_carts/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
= render :partial => 'carts', :locals => {:contact_carts => @global_contact_carts ||[]}
- if !@my_contact_carts and !@global_contact_carts and !@session_user.active_contact_cart
%h3
Create a contact cart on the
= link_to 'Contact Page', :controller => '/admin/dashboard', :action => :contacts
You have none. Create a contact cart on the
= link_to 'Contact Page', :controller => '/admin/dashboard', :action => :contacts
= '.'
2 changes: 1 addition & 1 deletion app/views/freemailer_campaigns/_campaign.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- if freemailer_campaign.sent
Sent
- totals = "(#{freemailer_campaign.successfully_sent}/#{freemailer_campaign.contacts.count})"
= link_to_function(totals, "Modalbox.show('#{freemailer_campaign_statuses_path(freemailer_campaign)}',{title: 'Mailing Statuses for \"#{freemailer_campaign.title}\"', width: '400'})")
= link_to_function(totals, "Modalbox.show('#{freemailer_campaign_statuses_path(freemailer_campaign)}',{title: 'Mailing Statuses for \"#{freemailer_campaign.title}\"', width: '450'})")
- else
Unsent.
= link_to 'Send?', freemailer_campaign_send_campaign_path(freemailer_campaign)
Expand Down
2 changes: 1 addition & 1 deletion app/views/freemailer_campaigns/_statuses.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
%tr
%td= status.contact.name_for_display
%td= status.contact.primary_email
%td= status.delivery_status || "No Delivery Attempted"
%td= status.delivery_status || "Pending"
= will_paginate(statuses)
25 changes: 16 additions & 9 deletions app/views/freemailer_campaigns/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@
%br
= text_area_tag 'Preview', @session_user.active_campaign.preview, :disabled => true, :cols => 40
= will_paginate @freemailer_campaigns
%table
%tr
%th Title
%th Subject
%th Contacts
%th From
%th Status
- @freemailer_campaigns.each do |freemailer_campaign|
= render :partial => 'campaign', :locals => {:freemailer_campaign => freemailer_campaign}
- if !@freemailer_campaigns.empty?
%table
%tr
%th Title
%th Subject
%th Contacts
%th From
%th Status
- @freemailer_campaigns.each do |freemailer_campaign|
= render :partial => 'campaign', :locals => {:freemailer_campaign => freemailer_campaign}
- else
%h3
You have none. Create one on the
= link_to('Contact Page', :controller => '/admin/dashboard', :action => :contacts) + '.'

= will_paginate @freemailer_campaigns

0 comments on commit e8aaec8

Please sign in to comment.