Adding payment methods partial to new enterprirse edit screen

This commit is contained in:
Rob Harrington
2014-11-28 16:41:17 +11:00
parent 412b431f36
commit abdcdea1a2
2 changed files with 37 additions and 0 deletions

View File

@@ -31,6 +31,10 @@
%legend Shipping Methods
= render 'admin/enterprises/form/shipping_methods', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Payment Methods'" } }
%legend Payment Methods
= render 'admin/enterprises/form/payment_methods', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Enterprise Fees'" } }
%legend Enterprise Fees
= render 'admin/enterprises/form/enterprise_fees', f: f

View File

@@ -0,0 +1,33 @@
- if @payment_methods.count > 0
%table
%thead
%tr
%th Name
%th Applies?
%th
%tbody
- @payment_methods.each do |payment_method|
%tr{ ng: { controller: 'paymentMethodCtrl', init: "findPaymentMethodByID(#{payment_method.id})" } }
%td= payment_method.name
%td= f.check_box :payment_method_ids, { multiple: true, 'ng-model' => 'PaymentMethod.selected' }, payment_method.id, nil
%td= link_to "Edit", edit_admin_payment_method_path(payment_method)
%br
.row
.six.columns.alpha
%a.button{ href: "#{admin_payment_methods_path}"}
Manage Payment Methods
%i.icon-arrow-right
.five.columns.omega.text-right
%a.button{ href: "#{new_admin_payment_method_path}"}
Create New Payment Method
%i.icon-plus
- else
%p.text-center
You don't have any payment methods yet.
%br
.text-center
%a.button{ href: "#{new_admin_payment_method_path}"}
Create One Now
%i.icon-arrow-right