Adding shipping methods partial to redone enterprise form

This commit is contained in:
Rob Harrington
2014-11-28 16:30:09 +11:00
parent bc32a053f7
commit 25e608d9fb
2 changed files with 37 additions and 0 deletions

View File

@@ -27,6 +27,10 @@
%legend Images
= render 'admin/enterprises/form/images', f: f
%fieldset.alpha.no-border-bottom{ ng: { show: "menu.selected.name=='Shipping Methods'" } }
%legend Shipping Methods
= render 'admin/enterprises/form/shipping_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 @shipping_methods.count > 0
%table
%thead
%tr
%th Name
%th Applies?
%th
- @shipping_methods.each do |shipping_method|
%tbody
%tr{ ng: { controller: 'shippingMethodCtrl', init: "findShippingMethodByID(#{shipping_method.id})" } }
%td= shipping_method.name
%td= f.check_box :shipping_method_ids, { :multiple => true, 'ng-model' => 'ShippingMethod.selected' }, shipping_method.id, nil
%td= link_to "Edit", edit_admin_shipping_method_path(shipping_method)
%br
.row
.six.columns.alpha
%a.button{ href: "#{admin_shipping_methods_path}"}
Manage Shipping Methods
%i.icon-arrow-right
.five.columns.omega.text-right
%a.button{ href: "#{new_admin_shipping_method_path}"}
Create New Shipping Method
%i.icon-plus
- else
%p.text-center
You don't have any shipping methods yet.
%br
.text-center
%a.button{ href: "#{new_admin_shipping_method_path}"}
Create One Now
%i.icon-arrow-right