app/views/people/show.html.haml in artfully_ose-1.2.0.pre.27 vs app/views/people/show.html.haml in artfully_ose-1.2.0
- old
+ new
@@ -66,22 +66,22 @@
= form.label :do_not_email, :class => "checkbox" do
= form.check_box :do_not_email
%span Do Not Email
= form.submit "Save", :class => 'btn btn-primary hidden'
- %h5 Email Lists
- %section#subscription-listing
- = form_for @person do |form|
- - if @person.organization.kits.mailchimp
+ - with_kit(:mailchimp) do
+ %h5 Email Lists
+ %section#subscription-listing
+ = form_for @person do |form|
.mailchimp-list
- mailchimp_kit = @person.organization.kits.mailchimp
= hidden_field_tag "person[subscribed_lists][]", nil, :id => "person_subscribed_lists_empty"
- mailchimp_kit.attached_lists.each do |list|
= label_tag "", :class => "checkbox" do
= check_box_tag "person[subscribed_lists][]", list[:list_id], @person.subscribed_lists.include?(list[:list_id]), :class => "mail-chimp-list", :disabled => @person.do_not_email
%span= list[:list_name]
- = form.submit "Save", :class => 'btn btn-primary hidden'
+ = form.submit "Save", :class => 'btn btn-primary hidden'
.span8
#notes
.row-fluid
.span3
@@ -144,15 +144,16 @@
%div{"ng-controller" => "EditPersonCtrl"}
= render 'edit_modal', :header => "Edit #{@person.possessive} Info"
= render 'convert_to_company_modal'
#edit-order-popup.modal
-- if current_user.current_organization.kits.mailchimp
- .modal#subscribe-modal(role="dialog")
- .modal-header
- %button(type="button" class="close" data-dismiss="modal" aria-hidden="true") ×
- %h3 MailChimp List Subscription
- .modal-body
- %p #{@person} will receive an email from MailChimp confirming their addition to this list
- .modal-footer
- %button(class="btn" data-dismiss="modal" aria-hidden="true") Cancel
- %button(class="btn btn-primary") OK
+-with_kit(:mailchimp) do
+ - if current_user.current_organization.kits.mailchimp
+ .modal#subscribe-modal(role="dialog")
+ .modal-header
+ %button(type="button" class="close" data-dismiss="modal" aria-hidden="true") ×
+ %h3 MailChimp List Subscription
+ .modal-body
+ %p #{@person} will receive an email from MailChimp confirming their addition to this list
+ .modal-footer
+ %button(class="btn" data-dismiss="modal" aria-hidden="true") Cancel
+ %button(class="btn btn-primary") OK