rails_trade 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +165 -0
- data/README.md +47 -0
- data/Rakefile +37 -0
- data/app/assets/config/rails_trade_manifest.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/buyers/index.js +15 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/buyers/overdue.js +15 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/cart_items/create.js +3 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/cart_items/index.js +80 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/cart_items/only.js +45 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/orders/new.js +29 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/edit.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/new.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payment_methods/unverified.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payments/index.js +0 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/payments/new.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promote_buyers/edit.js +31 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promote_buyers/new.js +31 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promote_goods/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/edit.js +2 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/promotes/new.js +2 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/edit.js +2 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/index.js +1 -0
- data/app/assets/javascripts/controllers/rails_trade_admin/serves/new.js +4 -0
- data/app/assets/javascripts/controllers/rails_trade_my/cart_items/create.js +3 -0
- data/app/assets/javascripts/controllers/rails_trade_my/cart_items/index.js +65 -0
- data/app/controllers/areas_controller.rb +18 -0
- data/app/controllers/buyers_controller.rb +8 -0
- data/app/controllers/concerns/controller_order_types.rb +92 -0
- data/app/controllers/goods_controller.rb +90 -0
- data/app/controllers/payments_controller.rb +50 -0
- data/app/controllers/providers_controller.rb +8 -0
- data/app/controllers/the_trade_admin/addresses_controller.rb +75 -0
- data/app/controllers/the_trade_admin/areas_controller.rb +50 -0
- data/app/controllers/the_trade_admin/base_controller.rb +5 -0
- data/app/controllers/the_trade_admin/buyers_controller.rb +37 -0
- data/app/controllers/the_trade_admin/cart_item_serves_controller.rb +63 -0
- data/app/controllers/the_trade_admin/cart_items_controller.rb +123 -0
- data/app/controllers/the_trade_admin/order_payments_controller.rb +52 -0
- data/app/controllers/the_trade_admin/orders_controller.rb +103 -0
- data/app/controllers/the_trade_admin/payment_methods_controller.rb +111 -0
- data/app/controllers/the_trade_admin/payment_orders_controller.rb +56 -0
- data/app/controllers/the_trade_admin/payment_references_controller.rb +54 -0
- data/app/controllers/the_trade_admin/payment_strategies_controller.rb +50 -0
- data/app/controllers/the_trade_admin/payments_controller.rb +89 -0
- data/app/controllers/the_trade_admin/produces_controller.rb +66 -0
- data/app/controllers/the_trade_admin/promote_buyers_controller.rb +39 -0
- data/app/controllers/the_trade_admin/promote_charges_controller.rb +62 -0
- data/app/controllers/the_trade_admin/promote_goods_controller.rb +50 -0
- data/app/controllers/the_trade_admin/promotes_controller.rb +105 -0
- data/app/controllers/the_trade_admin/providers_controller.rb +121 -0
- data/app/controllers/the_trade_admin/refunds_controller.rb +60 -0
- data/app/controllers/the_trade_admin/serve_charges_controller.rb +67 -0
- data/app/controllers/the_trade_admin/serves_controller.rb +107 -0
- data/app/controllers/the_trade_my/addresses_controller.rb +50 -0
- data/app/controllers/the_trade_my/base_controller.rb +13 -0
- data/app/controllers/the_trade_my/buyers_controller.rb +35 -0
- data/app/controllers/the_trade_my/cart_items_controller.rb +71 -0
- data/app/controllers/the_trade_my/order_items_controller.rb +49 -0
- data/app/controllers/the_trade_my/orders_controller.rb +161 -0
- data/app/controllers/the_trade_my/payment_methods_controller.rb +76 -0
- data/app/controllers/the_trade_my/providers_controller.rb +44 -0
- data/app/models/rails_trade/address.rb +14 -0
- data/app/models/rails_trade/area.rb +65 -0
- data/app/models/rails_trade/cart_item.rb +185 -0
- data/app/models/rails_trade/cart_item_serve.rb +16 -0
- data/app/models/rails_trade/concerns/good_able.rb +63 -0
- data/app/models/rails_trade/concerns/order_able.rb +48 -0
- data/app/models/rails_trade/concerns/promote_fee.rb +54 -0
- data/app/models/rails_trade/concerns/serve_fee.rb +41 -0
- data/app/models/rails_trade/concerns/summary_service.rb +67 -0
- data/app/models/rails_trade/concerns/the_payment.rb +88 -0
- data/app/models/rails_trade/concerns/the_refund.rb +36 -0
- data/app/models/rails_trade/concerns/the_trade_buyer.rb +50 -0
- data/app/models/rails_trade/concerns/the_trade_user.rb +23 -0
- data/app/models/rails_trade/good_partner.rb +8 -0
- data/app/models/rails_trade/good_produce.rb +14 -0
- data/app/models/rails_trade/order.rb +111 -0
- data/app/models/rails_trade/order_item.rb +88 -0
- data/app/models/rails_trade/order_promote.rb +23 -0
- data/app/models/rails_trade/order_serve.rb +23 -0
- data/app/models/rails_trade/order_shipment.rb +10 -0
- data/app/models/rails_trade/payment.rb +135 -0
- data/app/models/rails_trade/payment_interface/payment_interface_base.rb +8 -0
- data/app/models/rails_trade/payment_interface/the_alipay.rb +49 -0
- data/app/models/rails_trade/payment_interface/the_paypal.rb +103 -0
- data/app/models/rails_trade/payment_interface/the_stripe.rb +73 -0
- data/app/models/rails_trade/payment_interface/the_wxpay.rb +56 -0
- data/app/models/rails_trade/payment_method.rb +57 -0
- data/app/models/rails_trade/payment_methods/alipay_method.rb +7 -0
- data/app/models/rails_trade/payment_methods/bank_method.rb +7 -0
- data/app/models/rails_trade/payment_methods/stripe_method.rb +57 -0
- data/app/models/rails_trade/payment_order.rb +75 -0
- data/app/models/rails_trade/payment_reference.rb +15 -0
- data/app/models/rails_trade/payment_strategy.rb +16 -0
- data/app/models/rails_trade/payments/alipay_payment.rb +12 -0
- data/app/models/rails_trade/payments/bank_payment.rb +15 -0
- data/app/models/rails_trade/payments/hand_payment.rb +13 -0
- data/app/models/rails_trade/payments/paypal_payment.rb +8 -0
- data/app/models/rails_trade/payments/stripe_payment.rb +7 -0
- data/app/models/rails_trade/payments/wxpay_payment.rb +14 -0
- data/app/models/rails_trade/produce.rb +18 -0
- data/app/models/rails_trade/promote.rb +40 -0
- data/app/models/rails_trade/promote_buyer.rb +9 -0
- data/app/models/rails_trade/promote_charge.rb +17 -0
- data/app/models/rails_trade/promote_charges/single_promote_charge.rb +7 -0
- data/app/models/rails_trade/promote_charges/total_promote_charge.rb +7 -0
- data/app/models/rails_trade/promote_good.rb +9 -0
- data/app/models/rails_trade/promotes/amount_promote.rb +4 -0
- data/app/models/rails_trade/promotes/number_promote.rb +4 -0
- data/app/models/rails_trade/provider.rb +25 -0
- data/app/models/rails_trade/refund.rb +63 -0
- data/app/models/rails_trade/refunds/alipay_refund.rb +33 -0
- data/app/models/rails_trade/refunds/bank_refund.rb +5 -0
- data/app/models/rails_trade/refunds/hand_refund.rb +5 -0
- data/app/models/rails_trade/refunds/paypal_refund.rb +32 -0
- data/app/models/rails_trade/refunds/stripe_refund.rb +26 -0
- data/app/models/rails_trade/refunds/wxpay_refund.rb +40 -0
- data/app/models/rails_trade/serve.rb +44 -0
- data/app/models/rails_trade/serve_charge.rb +37 -0
- data/app/models/rails_trade/serve_charges/single_serve_charge.rb +7 -0
- data/app/models/rails_trade/serve_charges/total_serve_charge.rb +7 -0
- data/app/models/rails_trade/serve_good.rb +9 -0
- data/app/models/rails_trade/serves/number_serve.rb +4 -0
- data/app/models/rails_trade/serves/quantity_serve.rb +4 -0
- data/app/models/rails_trade/shipment.rb +8 -0
- data/app/views/buyers/_show.html.erb +7 -0
- data/app/views/buyers/show.js.erb +1 -0
- data/app/views/goods/_choose.html.erb +36 -0
- data/app/views/goods/_good.html.erb +17 -0
- data/app/views/goods/_good_item.html.erb +17 -0
- data/app/views/goods/_nav.html.erb +18 -0
- data/app/views/goods/_search.html.erb +6 -0
- data/app/views/goods/index.html.erb +34 -0
- data/app/views/goods/index/_product.html.erb +14 -0
- data/app/views/goods/item.html.erb +47 -0
- data/app/views/goods/produce.html.erb +48 -0
- data/app/views/goods/show.html.erb +2 -0
- data/app/views/goods/show/_basic.html.erb +23 -0
- data/app/views/goods/show/_carousel.html.erb +35 -0
- data/app/views/goods/show/_items.html.erb +32 -0
- data/app/views/goods/show/_sales.html.erb +17 -0
- data/app/views/goods/show/_side.html.erb +19 -0
- data/app/views/goods/taxon/_breadcrumb.html.erb +8 -0
- data/app/views/goods/taxon/_nav.html.erb +19 -0
- data/app/views/goods/taxon/_nav_.html.erb +18 -0
- data/app/views/goods/taxon/_nav_last.html.erb +19 -0
- data/app/views/layouts/rails_trade_admin/base.html.erb +25 -0
- data/app/views/layouts/rails_trade_my/base.html.erb +28 -0
- data/app/views/rails_trade_admin/addresses/_address.html.erb +24 -0
- data/app/views/rails_trade_admin/addresses/_edit.html.erb +13 -0
- data/app/views/rails_trade_admin/addresses/_form.html.erb +23 -0
- data/app/views/rails_trade_admin/addresses/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/addresses/create.js.erb +2 -0
- data/app/views/rails_trade_admin/addresses/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/addresses/edit.js.erb +39 -0
- data/app/views/rails_trade_admin/addresses/index.html.erb +41 -0
- data/app/views/rails_trade_admin/addresses/new.js.erb +52 -0
- data/app/views/rails_trade_admin/addresses/show.html.erb +4 -0
- data/app/views/rails_trade_admin/addresses/update.js.erb +2 -0
- data/app/views/rails_trade_admin/areas/_form.html.erb +9 -0
- data/app/views/rails_trade_admin/areas/edit.html.erb +16 -0
- data/app/views/rails_trade_admin/areas/index.html.erb +43 -0
- data/app/views/rails_trade_admin/areas/new.html.erb +11 -0
- data/app/views/rails_trade_admin/areas/show.html.erb +1 -0
- data/app/views/rails_trade_admin/base/_nav.html.erb +24 -0
- data/app/views/rails_trade_admin/base/_nav_bar.html.erb +23 -0
- data/app/views/rails_trade_admin/base/_nav_payment.html.erb +25 -0
- data/app/views/rails_trade_admin/buyers/_form.html.erb +17 -0
- data/app/views/rails_trade_admin/buyers/_menu.html.erb +5 -0
- data/app/views/rails_trade_admin/buyers/_search_form.html.erb +11 -0
- data/app/views/rails_trade_admin/buyers/edit.html.erb +6 -0
- data/app/views/rails_trade_admin/buyers/index.html.erb +46 -0
- data/app/views/rails_trade_admin/buyers/new.html.erb +5 -0
- data/app/views/rails_trade_admin/buyers/orders.html.erb +134 -0
- data/app/views/rails_trade_admin/buyers/overdue.html.erb +49 -0
- data/app/views/rails_trade_admin/buyers/show.html.erb +4 -0
- data/app/views/rails_trade_admin/cart_item_serves/_check.html.erb +12 -0
- data/app/views/rails_trade_admin/cart_item_serves/_index.html.erb +37 -0
- data/app/views/rails_trade_admin/cart_item_serves/_new.html.erb +14 -0
- data/app/views/rails_trade_admin/cart_item_serves/_serve.html.erb +16 -0
- data/app/views/rails_trade_admin/cart_item_serves/_single.html.erb +10 -0
- data/app/views/rails_trade_admin/cart_item_serves/_single_table.html.erb +29 -0
- data/app/views/rails_trade_admin/cart_item_serves/_total.html.erb +10 -0
- data/app/views/rails_trade_admin/cart_item_serves/_total_table.html.erb +26 -0
- data/app/views/rails_trade_admin/cart_item_serves/add.js.erb +47 -0
- data/app/views/rails_trade_admin/cart_item_serves/create.js.erb +3 -0
- data/app/views/rails_trade_admin/cart_item_serves/destroy.js.erb +50 -0
- data/app/views/rails_trade_admin/cart_item_serves/index.js.erb +50 -0
- data/app/views/rails_trade_admin/cart_item_serves/new.js.erb +5 -0
- data/app/views/rails_trade_admin/cart_item_serves/single.js.erb +55 -0
- data/app/views/rails_trade_admin/cart_item_serves/total.js.erb +55 -0
- data/app/views/rails_trade_admin/cart_items/_additions.html.erb +20 -0
- data/app/views/rails_trade_admin/cart_items/_filter.html.erb +15 -0
- data/app/views/rails_trade_admin/cart_items/_good_price.html.erb +10 -0
- data/app/views/rails_trade_admin/cart_items/_order_price.html.erb +27 -0
- data/app/views/rails_trade_admin/cart_items/_retail_price.html.erb +4 -0
- data/app/views/rails_trade_admin/cart_items/_single_price.html.erb +28 -0
- data/app/views/rails_trade_admin/cart_items/_total_price.html.erb +9 -0
- data/app/views/rails_trade_admin/cart_items/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/cart_items/error.html.erb +3 -0
- data/app/views/rails_trade_admin/cart_items/index.html.erb +104 -0
- data/app/views/rails_trade_admin/cart_items/only.html.erb +72 -0
- data/app/views/rails_trade_admin/cart_items/total.js.erb +11 -0
- data/app/views/rails_trade_admin/cart_items/update.js.erb +11 -0
- data/app/views/rails_trade_admin/goods/_form.html.erb +7 -0
- data/app/views/rails_trade_admin/goods/_item.html.erb +6 -0
- data/app/views/rails_trade_admin/goods/_new.html.erb +11 -0
- data/app/views/rails_trade_admin/goods/_show.html.erb +24 -0
- data/app/views/rails_trade_admin/goods/_show_tr.html.erb +24 -0
- data/app/views/rails_trade_admin/goods/create.js.erb +2 -0
- data/app/views/rails_trade_admin/goods/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/goods/edit.html.erb +16 -0
- data/app/views/rails_trade_admin/goods/edit.js.erb +8 -0
- data/app/views/rails_trade_admin/goods/edit_items.html.erb +43 -0
- data/app/views/rails_trade_admin/goods/edit_pic.html.erb +32 -0
- data/app/views/rails_trade_admin/goods/edit_promote.html.erb +64 -0
- data/app/views/rails_trade_admin/goods/index.html.erb +32 -0
- data/app/views/rails_trade_admin/goods/new.html.erb +14 -0
- data/app/views/rails_trade_admin/goods/new.js.erb +8 -0
- data/app/views/rails_trade_admin/goods/show.js.erb +5 -0
- data/app/views/rails_trade_admin/goods/update.js.erb +2 -0
- data/app/views/rails_trade_admin/order_payments/_index.html.erb +44 -0
- data/app/views/rails_trade_admin/order_payments/_new.html.erb +44 -0
- data/app/views/rails_trade_admin/order_payments/_payment_orders.html.erb +17 -0
- data/app/views/rails_trade_admin/order_payments/_payments.html.erb +19 -0
- data/app/views/rails_trade_admin/order_payments/create.js.erb +2 -0
- data/app/views/rails_trade_admin/order_payments/create_fail.js.erb +1 -0
- data/app/views/rails_trade_admin/order_payments/destroy.js.erb +2 -0
- data/app/views/rails_trade_admin/order_payments/index.js.erb +8 -0
- data/app/views/rails_trade_admin/order_payments/new.js.erb +8 -0
- data/app/views/rails_trade_admin/orders/_addresses.html.erb +36 -0
- data/app/views/rails_trade_admin/orders/_filter.html.erb +20 -0
- data/app/views/rails_trade_admin/orders/_form.html.erb +17 -0
- data/app/views/rails_trade_admin/orders/_invoice_addresses.html.erb +36 -0
- data/app/views/rails_trade_admin/orders/_item.html.erb +10 -0
- data/app/views/rails_trade_admin/orders/_new_items.html.erb +70 -0
- data/app/views/rails_trade_admin/orders/_search_form.html.erb +7 -0
- data/app/views/rails_trade_admin/orders/edit.html.erb +1 -0
- data/app/views/rails_trade_admin/orders/index.html.erb +61 -0
- data/app/views/rails_trade_admin/orders/new.html.erb +23 -0
- data/app/views/rails_trade_admin/orders/payments.html.erb +50 -0
- data/app/views/rails_trade_admin/orders/refresh.js.erb +7 -0
- data/app/views/rails_trade_admin/orders/show.html.erb +89 -0
- data/app/views/rails_trade_admin/payment_methods/_edit.html.erb +6 -0
- data/app/views/rails_trade_admin/payment_methods/_form.html.erb +5 -0
- data/app/views/rails_trade_admin/payment_methods/_index_layout.html.erb +15 -0
- data/app/views/rails_trade_admin/payment_methods/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/payment_methods/_payment_method.html.erb +25 -0
- data/app/views/rails_trade_admin/payment_methods/_search_form.html.erb +22 -0
- data/app/views/rails_trade_admin/payment_methods/create.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_methods/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_methods/edit.html.erb +15 -0
- data/app/views/rails_trade_admin/payment_methods/edit.js.erb +8 -0
- data/app/views/rails_trade_admin/payment_methods/index.html.erb +23 -0
- data/app/views/rails_trade_admin/payment_methods/mine.html.erb +23 -0
- data/app/views/rails_trade_admin/payment_methods/new.html.erb +15 -0
- data/app/views/rails_trade_admin/payment_methods/new.js.erb +7 -0
- data/app/views/rails_trade_admin/payment_methods/unverified.html.erb +60 -0
- data/app/views/rails_trade_admin/payment_methods/update.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/_index.html.erb +31 -0
- data/app/views/rails_trade_admin/payment_orders/_new.html.erb +24 -0
- data/app/views/rails_trade_admin/payment_orders/_orders.html.erb +27 -0
- data/app/views/rails_trade_admin/payment_orders/cancel.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/create.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/create_fail.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_orders/new.js.erb +6 -0
- data/app/views/rails_trade_admin/payment_orders/raise_fail.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_orders/update.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_orders/update_fail.js.erb +2 -0
- data/app/views/rails_trade_admin/payment_references/_form.html.erb +20 -0
- data/app/views/rails_trade_admin/payment_references/_new.html.erb +11 -0
- data/app/views/rails_trade_admin/payment_references/destroy.js.erb +1 -0
- data/app/views/rails_trade_admin/payment_references/edit.html.erb +6 -0
- data/app/views/rails_trade_admin/payment_references/index.html.erb +25 -0
- data/app/views/rails_trade_admin/payment_references/new.js.erb +8 -0
- data/app/views/rails_trade_admin/payment_references/show.html.erb +4 -0
- data/app/views/rails_trade_admin/payment_strategies/_form.html.erb +5 -0
- data/app/views/rails_trade_admin/payment_strategies/edit.html.erb +13 -0
- data/app/views/rails_trade_admin/payment_strategies/index.html.erb +37 -0
- data/app/views/rails_trade_admin/payment_strategies/new.html.erb +13 -0
- data/app/views/rails_trade_admin/payments/_form.html.erb +12 -0
- data/app/views/rails_trade_admin/payments/_item.html.erb +49 -0
- data/app/views/rails_trade_admin/payments/_search_form.html.erb +15 -0
- data/app/views/rails_trade_admin/payments/analyze.js.erb +12 -0
- data/app/views/rails_trade_admin/payments/dashboard.html.erb +4 -0
- data/app/views/rails_trade_admin/payments/edit.html.erb +15 -0
- data/app/views/rails_trade_admin/payments/index.html.erb +60 -0
- data/app/views/rails_trade_admin/payments/new.html.erb +17 -0
- data/app/views/rails_trade_admin/payments/show.html.erb +4 -0
- data/app/views/rails_trade_admin/promote_buyers/_form.html.erb +6 -0
- data/app/views/rails_trade_admin/promote_buyers/_promote_buyer.json.jbuilder +2 -0
- data/app/views/rails_trade_admin/promote_buyers/edit.html.erb +14 -0
- data/app/views/rails_trade_admin/promote_buyers/index.html.erb +42 -0
- data/app/views/rails_trade_admin/promote_buyers/index.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promote_buyers/new.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_buyers/show.html.erb +0 -0
- data/app/views/rails_trade_admin/promote_buyers/show.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promote_charges/_edit.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_charges/_form.html.erb +6 -0
- data/app/views/rails_trade_admin/promote_charges/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_charges/_search_form.html.erb +9 -0
- data/app/views/rails_trade_admin/promote_charges/edit.js.erb +8 -0
- data/app/views/rails_trade_admin/promote_charges/index.html.erb +49 -0
- data/app/views/rails_trade_admin/promote_charges/new.js.erb +8 -0
- data/app/views/rails_trade_admin/promote_goods/_form.html.erb +4 -0
- data/app/views/rails_trade_admin/promote_goods/_promote_good.json.jbuilder +2 -0
- data/app/views/rails_trade_admin/promote_goods/edit.html.erb +14 -0
- data/app/views/rails_trade_admin/promote_goods/index.html.erb +37 -0
- data/app/views/rails_trade_admin/promote_goods/index.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promote_goods/new.html.erb +13 -0
- data/app/views/rails_trade_admin/promote_goods/show.html.erb +0 -0
- data/app/views/rails_trade_admin/promote_goods/show.json.jbuilder +1 -0
- data/app/views/rails_trade_admin/promotes/_form.html.erb +9 -0
- data/app/views/rails_trade_admin/promotes/edit.html.erb +9 -0
- data/app/views/rails_trade_admin/promotes/index.html.erb +65 -0
- data/app/views/rails_trade_admin/promotes/new.html.erb +9 -0
- data/app/views/rails_trade_admin/promotes/show.html.erb +4 -0
- data/app/views/rails_trade_admin/providers/_form.html.erb +6 -0
- data/app/views/rails_trade_admin/providers/_product.html.erb +12 -0
- data/app/views/rails_trade_admin/providers/_side.html.erb +8 -0
- data/app/views/rails_trade_admin/providers/area.html.erb +1 -0
- data/app/views/rails_trade_admin/providers/channel.html.erb +46 -0
- data/app/views/rails_trade_admin/providers/edit.html.erb +16 -0
- data/app/views/rails_trade_admin/providers/index.html.erb +27 -0
- data/app/views/rails_trade_admin/providers/new.html.erb +21 -0
- data/app/views/rails_trade_admin/providers/posts.html.erb +41 -0
- data/app/views/rails_trade_admin/providers/products.html.erb +23 -0
- data/app/views/rails_trade_admin/providers/show.html.erb +60 -0
- data/app/views/rails_trade_admin/refunds/_form.html.erb +17 -0
- data/app/views/rails_trade_admin/refunds/_logs_table.html.erb +33 -0
- data/app/views/rails_trade_admin/refunds/_new.html.erb +18 -0
- data/app/views/rails_trade_admin/refunds/_search_form.html.erb +13 -0
- data/app/views/rails_trade_admin/refunds/edit.html.erb +6 -0
- data/app/views/rails_trade_admin/refunds/index.html.erb +57 -0
- data/app/views/rails_trade_admin/refunds/logs.js.erb +8 -0
- data/app/views/rails_trade_admin/refunds/new.html.erb +5 -0
- data/app/views/rails_trade_admin/refunds/new.js.erb +8 -0
- data/app/views/rails_trade_admin/refunds/show.html.erb +4 -0
- data/app/views/rails_trade_admin/serve_charges/_edit.html.erb +13 -0
- data/app/views/rails_trade_admin/serve_charges/_form.html.erb +10 -0
- data/app/views/rails_trade_admin/serve_charges/_new.html.erb +13 -0
- data/app/views/rails_trade_admin/serve_charges/_search_form.html.erb +10 -0
- data/app/views/rails_trade_admin/serve_charges/edit.js.erb +7 -0
- data/app/views/rails_trade_admin/serve_charges/index.html.erb +56 -0
- data/app/views/rails_trade_admin/serve_charges/new.js.erb +8 -0
- data/app/views/rails_trade_admin/serves/_form.html.erb +9 -0
- data/app/views/rails_trade_admin/serves/edit.html.erb +9 -0
- data/app/views/rails_trade_admin/serves/index.html.erb +80 -0
- data/app/views/rails_trade_admin/serves/new.html.erb +9 -0
- data/app/views/rails_trade_my/addresses/_edit.html.erb +31 -0
- data/app/views/rails_trade_my/addresses/_form.html.erb +23 -0
- data/app/views/rails_trade_my/addresses/_new.html.erb +11 -0
- data/app/views/rails_trade_my/addresses/create.js.erb +2 -0
- data/app/views/rails_trade_my/addresses/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/addresses/edit.js.erb +39 -0
- data/app/views/rails_trade_my/addresses/index.html.erb +44 -0
- data/app/views/rails_trade_my/addresses/new.js.erb +39 -0
- data/app/views/rails_trade_my/addresses/show.html.erb +4 -0
- data/app/views/rails_trade_my/addresses/update.js.erb +2 -0
- data/app/views/rails_trade_my/base/_nav.html.erb +22 -0
- data/app/views/rails_trade_my/buyers/_form.html.erb +5 -0
- data/app/views/rails_trade_my/buyers/edit.html.erb +2 -0
- data/app/views/rails_trade_my/buyers/show.html.erb +21 -0
- data/app/views/rails_trade_my/cart_items/_additions.html.erb +22 -0
- data/app/views/rails_trade_my/cart_items/_single_price.html.erb +6 -0
- data/app/views/rails_trade_my/cart_items/_total_price.html.erb +8 -0
- data/app/views/rails_trade_my/cart_items/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/cart_items/index.html.erb +69 -0
- data/app/views/rails_trade_my/cart_items/total.js.erb +11 -0
- data/app/views/rails_trade_my/cart_items/update.js.erb +8 -0
- data/app/views/rails_trade_my/my/index.html.erb +17 -0
- data/app/views/rails_trade_my/order_items/_form.html.erb +17 -0
- data/app/views/rails_trade_my/order_items/edit.html.erb +6 -0
- data/app/views/rails_trade_my/order_items/index.html.erb +25 -0
- data/app/views/rails_trade_my/order_items/new.html.erb +5 -0
- data/app/views/rails_trade_my/order_items/show.html.erb +8 -0
- data/app/views/rails_trade_my/orders/_date_form.html.erb +23 -0
- data/app/views/rails_trade_my/orders/_edit.html.erb +10 -0
- data/app/views/rails_trade_my/orders/_edit_payment_type.html.erb +13 -0
- data/app/views/rails_trade_my/orders/_form.html.erb +4 -0
- data/app/views/rails_trade_my/orders/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/orders/edit.js.erb +4 -0
- data/app/views/rails_trade_my/orders/edit_payment_type.js.erb +6 -0
- data/app/views/rails_trade_my/orders/fail.html.erb +11 -0
- data/app/views/rails_trade_my/orders/index.html.erb +55 -0
- data/app/views/rails_trade_my/orders/index.json.jbuilder +9 -0
- data/app/views/rails_trade_my/orders/new.html.erb +41 -0
- data/app/views/rails_trade_my/orders/refresh.js.erb +7 -0
- data/app/views/rails_trade_my/orders/show.html.erb +103 -0
- data/app/views/rails_trade_my/orders/success.html.erb +12 -0
- data/app/views/rails_trade_my/orders/update.js.erb +3 -0
- data/app/views/rails_trade_my/orders/update_payment_type.js.erb +3 -0
- data/app/views/rails_trade_my/orders/wxpay_pay.js.erb +16 -0
- data/app/views/rails_trade_my/orders/wxpay_pay_err.js.erb +5 -0
- data/app/views/rails_trade_my/payment_methods/_edit.html.erb +13 -0
- data/app/views/rails_trade_my/payment_methods/_form.html.erb +5 -0
- data/app/views/rails_trade_my/payment_methods/_index.html.erb +25 -0
- data/app/views/rails_trade_my/payment_methods/_item.html.erb +10 -0
- data/app/views/rails_trade_my/payment_methods/_new.html.erb +13 -0
- data/app/views/rails_trade_my/payment_methods/create.js.erb +3 -0
- data/app/views/rails_trade_my/payment_methods/destroy.js.erb +1 -0
- data/app/views/rails_trade_my/payment_methods/edit.js.erb +8 -0
- data/app/views/rails_trade_my/payment_methods/index.html.erb +1 -0
- data/app/views/rails_trade_my/payment_methods/index.js.erb +1 -0
- data/app/views/rails_trade_my/payment_methods/new.js.erb +8 -0
- data/app/views/rails_trade_my/payment_methods/show.html.erb +4 -0
- data/app/views/rails_trade_my/payment_methods/update.js.erb +2 -0
- data/app/views/rails_trade_my/providers/_form.html.erb +5 -0
- data/app/views/rails_trade_my/providers/_provider.html.erb +20 -0
- data/app/views/rails_trade_my/providers/edit.html.erb +2 -0
- data/app/views/rails_trade_my/providers/index.html.erb +12 -0
- data/app/views/rails_trade_my/providers/new.html.erb +10 -0
- data/app/views/rails_trade_my/providers/show.html.erb +13 -0
- data/app/views/rails_trade_my/users/_form.html.erb +17 -0
- data/app/views/rails_trade_my/users/edit.html.erb +44 -0
- data/app/views/rails_trade_my/users/show.html.erb +18 -0
- data/config/locales/en.yml +85 -0
- data/config/locales/zh.yml +75 -0
- data/config/routes.rb +118 -0
- data/db/migrate/20150514135720_create_providers.rb +59 -0
- data/db/migrate/20170601014520_create_payments.rb +52 -0
- data/db/migrate/20170602061859_create_payment_references.rb +12 -0
- data/db/migrate/20170702234123_create_orders.rb +56 -0
- data/db/migrate/20170714080032_create_payment_strategies.rb +77 -0
- data/db/migrate/20171115063702_create_promote_buyers.rb +31 -0
- data/db/schema.rb +94 -0
- data/lib/rails_trade.rb +22 -0
- data/lib/rails_trade/config.rb +12 -0
- data/lib/rails_trade/engine.rb +30 -0
- data/lib/rails_trade/version.rb +3 -0
- data/lib/tasks/the_trade_tasks.rake +4 -0
- metadata +491 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="ui segment breadcrumb">
|
2
|
+
<%= link_to 'back', admin_providers_path, class: 'section' %>
|
3
|
+
<div class="divider"> / </div>
|
4
|
+
<div class="section">编辑</div>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="ui segment">
|
8
|
+
|
9
|
+
<%= form_with model: @provider, url: admin_provider_path(@provider) do |f| %>
|
10
|
+
<%= render partial: 'form', locals: { f: f } %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="ui top attached borderless menu">
|
2
|
+
<div class="item header">商家列表</div>
|
3
|
+
<div class="right menu">
|
4
|
+
<div class="item"><%= link_to '新建', new_admin_provider_path, class: 'ui teal button' %></div>
|
5
|
+
</div>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<table class="ui bottom attached table">
|
9
|
+
<thead>
|
10
|
+
<tr>
|
11
|
+
<th>ID</th>
|
12
|
+
<th>名称</th>
|
13
|
+
<th></th>
|
14
|
+
<th></th>
|
15
|
+
</tr>
|
16
|
+
</thead>
|
17
|
+
<tbody>
|
18
|
+
<% @providers.each do |provider| %>
|
19
|
+
<tr>
|
20
|
+
<td><%= provider.id %></td>
|
21
|
+
<td><%= provider.name %></td>
|
22
|
+
<td><%= link_to '编辑', edit_admin_provider_path(provider) %></td>
|
23
|
+
<td><%= link_to '删除', admin_provider_path(provider), method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
24
|
+
</tr>
|
25
|
+
<% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div>
|
2
|
+
<div class="ui segment breadcrumb">
|
3
|
+
<%= link_to '供应商列表', admin_providers_path, class: 'section' %>
|
4
|
+
<div class="divider"> / </div>
|
5
|
+
<div class="active section">新建供应商</div>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="ui segment">
|
9
|
+
<%= form_with model: [:admin, @provider] do |f| %>
|
10
|
+
<%= render partial: 'form', locals: { f: f } %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
</div>
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<ul class="breadcrumb">
|
2
|
+
<li><%= link_to '商家服务', panel_path %></li>
|
3
|
+
<li><%= link_to @provider.name, provider_path(@provider) %></li>
|
4
|
+
<li class="active">内容管理</li>
|
5
|
+
<li class="pull-right"><a href="<%= new_post_path(:wordage_id => @provider, :wordage_type => 'Provider') %>">新建</a></li>
|
6
|
+
</ul>
|
7
|
+
|
8
|
+
<div class="row">
|
9
|
+
|
10
|
+
<div class="col-md-3">
|
11
|
+
<ul class="nav-chapters well">
|
12
|
+
<% @channels.each do |channel| %>
|
13
|
+
<li><%= link_to channel.name, channel_provider_path(@provider, channel) %></li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="col-md-9">
|
19
|
+
|
20
|
+
<table class="table table-bordered table-striped table-condensed">
|
21
|
+
<tr>
|
22
|
+
<td>编号</td>
|
23
|
+
<td>标题</td>
|
24
|
+
<td>创建时间</td>
|
25
|
+
<td></td>
|
26
|
+
</tr>
|
27
|
+
<% @posts.each do |post| %>
|
28
|
+
<tr>
|
29
|
+
<td><%= post.id %></td>
|
30
|
+
<td><%= link_to post.title, post_path(post), :target => '_blank' %></td>
|
31
|
+
<td><%= post.created_at %></td>
|
32
|
+
<td>
|
33
|
+
<%= link_to "编辑", edit_post_path(post.id) %>
|
34
|
+
<%= link_to "删除", post_path(post.id), :method => :delete, 'data-confirm' => '确定要删除吗?' %>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</table>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<ul class="breadcrumb">
|
2
|
+
<li><%= link_to '商家服务', panel_path %></li>
|
3
|
+
<li><%= link_to @provider.name, provider_path(@provider) %></li>
|
4
|
+
<li>产品列表</li>
|
5
|
+
<li class="pull-right"><%= link_to '找产品', providers_path %></li>
|
6
|
+
</ul>
|
7
|
+
|
8
|
+
<div class="row">
|
9
|
+
|
10
|
+
<div class="col-md-3">
|
11
|
+
<%= render :partial => 'side' %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="col-md-9">
|
15
|
+
|
16
|
+
|
17
|
+
<%= render :partial => 'product', :collection => @products, :as => :product %>
|
18
|
+
|
19
|
+
<%= paginate @products %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<ul class="breadcrumb">
|
2
|
+
<li><%= link_to '商家服务', panel_path %></li>
|
3
|
+
<li><%= @provider.name %></li>
|
4
|
+
<li class="pull-right"><%= link_to '编辑', edit_provider_path(@provider) %></li>
|
5
|
+
</ul>
|
6
|
+
|
7
|
+
<div class="row">
|
8
|
+
<div class="col-md-9">
|
9
|
+
|
10
|
+
|
11
|
+
<%= form_for @provider, :url => type_provider_path(@provider), :html => {:class=> "form-horizontal"} do |f| %>
|
12
|
+
<%= render "shared/error_messages", :target => @provider %>
|
13
|
+
|
14
|
+
<fieldset>
|
15
|
+
<div class="form-group">
|
16
|
+
<label class="col-sm-2 control-label">地区:</label>
|
17
|
+
<div class="col-md-5"><p class="form-control-static"><%= @provider.area.name %></p></div>
|
18
|
+
</div>
|
19
|
+
<div class="form-group">
|
20
|
+
<label class="col-sm-2 control-label">名称:</label>
|
21
|
+
<div class="col-md-5"><p class="form-control-static"><%= @provider.name %></p></div>
|
22
|
+
</div>
|
23
|
+
<div class="form-group">
|
24
|
+
<label class="col-sm-2 control-label">logo图:</label>
|
25
|
+
<div class="col-md-6"><p class="form-control-static"><%= image_tag(@provider.logo_url) if @provider.logo? %></p></div>
|
26
|
+
</div>
|
27
|
+
<div class="form-group">
|
28
|
+
<label class="col-sm-2 control-label">地址:</label>
|
29
|
+
<div class="col-md-5"><p class="form-control-static"><%= @provider.address %></p></div>
|
30
|
+
</div>
|
31
|
+
<div class="form-group">
|
32
|
+
<label class="col-sm-2 control-label">电话:</label>
|
33
|
+
<div class="col-md-5"><p class="form-control-static"><%= @provider.service_tel %></p></div>
|
34
|
+
</div>
|
35
|
+
<div class="form-group">
|
36
|
+
<label class="col-sm-2 control-label">QQ:</label>
|
37
|
+
<div class="col-md-5"><p class="form-control-static"><%= @provider.service_qq %></p></div>
|
38
|
+
</div>
|
39
|
+
<div class="form-group">
|
40
|
+
<label class="col-md-2 control-label">商家性质:</label>
|
41
|
+
<div class="col-md-5">
|
42
|
+
<div class="radio-inline">
|
43
|
+
<label><%= f.radio_button :type, 'Producer' %>品牌</label>
|
44
|
+
</div>
|
45
|
+
<div class="radio-inline">
|
46
|
+
<label><%= f.radio_button :type, '' %>供应商</label>
|
47
|
+
</div>
|
48
|
+
<%= f.submit "修改", :class => "btn btn-primary" %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</fieldset>
|
52
|
+
<% end %>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
<div class="col-md-3">
|
57
|
+
<%= render 'side' %>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= form_with(model: refund, local: true) do |form| %>
|
2
|
+
<% if refund.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(refund.errors.count, "error") %> prohibited this refund from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% refund.errors.full_messages.each do |message| %>
|
8
|
+
<li><%= message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="actions">
|
15
|
+
<%= form.submit %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<table class="ui celled table">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th class="center aligned">Total Amount</th>
|
5
|
+
<th class="center aligned">Order Amount</th>
|
6
|
+
<th class="center aligned">Type</th>
|
7
|
+
<th class="center aligned">Created At</th>
|
8
|
+
<th class="center aligned">State</th>
|
9
|
+
<th class="center aligned">Comment</th>
|
10
|
+
<th class="center aligned">Refunded At</th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<tbody>
|
14
|
+
<% @refunds.each do |refund| %>
|
15
|
+
<tr>
|
16
|
+
<td class="center aligned"><%= refund.total_amount.to_money(refund.currency).format %></td>
|
17
|
+
<td class="center aligned"><%= refund.order_amount.to_money.format %></td>
|
18
|
+
<td class="center aligned"><%= refund.type %></td>
|
19
|
+
<td class="center aligned"><%= refund.created_at.to_s %></td>
|
20
|
+
<td class="center aligned"><%= refund.state %></td>
|
21
|
+
<td class="center aligned"><%= refund.comment %></td>
|
22
|
+
<td class="center aligned">
|
23
|
+
<% if refund.refunded_at %>
|
24
|
+
<time><%= refund.refunded_at.to_s %></time>
|
25
|
+
<% else %>
|
26
|
+
<%= refund.reason.to_s.truncate(27) %>
|
27
|
+
<% end %>
|
28
|
+
</td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="ui modal" id="new_refund_modal">
|
2
|
+
<i class="close icon"></i>
|
3
|
+
<div class="ui blue header">Refund</div>
|
4
|
+
<div class="content">
|
5
|
+
<%= render 'logs_table' %>
|
6
|
+
</div>
|
7
|
+
<div class="ui divider"></div>
|
8
|
+
<div class="content">
|
9
|
+
<%= form_with model: @refund, url: work_refunds_path, method: 'post' do |f| %>
|
10
|
+
<%= hidden_field_tag :order_id, @order.id %>
|
11
|
+
<%= f.text_field :order_amount, label: 'Refund Amount:', placeholder: '$' %>
|
12
|
+
<%= f.text_area :comment, label: 'Comment:' %>
|
13
|
+
<%= f.select :type, options_for_select(Refund.options_i18n(:type), @refund.type), label: 'Type: ' %>
|
14
|
+
<%= f.submit %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="ui blue segment">
|
2
|
+
<%= search_form_with do |f| %>
|
3
|
+
<div class="fields">
|
4
|
+
<%= hidden_field_tag :payment_status, params[:payment_status] %>
|
5
|
+
<%= f.text_field :'company.name', placeholder: 'Company Name' %>
|
6
|
+
<%= f.text_field :uuid, placeholder: 'PO No.' %>
|
7
|
+
<%= f.select :payment_method, options_for_select(Order.options_i18n(:payment_method)), { include_blank: true, prompt: 'Select one' }, { } %>
|
8
|
+
<%= f.date_field :'created_at.gte', placeholder: 'Transaction Start Date' %>
|
9
|
+
<%= f.date_field :'created_at.lte', placeholder: 'Transaction End Date' %>
|
10
|
+
<%= f.submit 'Search', class: 'ui blue button' %>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
</div>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<div class="ui borderless menu">
|
2
|
+
<div class="item">Refund</div>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div class="ui top attached segment">
|
6
|
+
<%= render 'search_form' %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<table class="ui bottom attached table">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th>UUID</th>
|
13
|
+
<th>Order</th>
|
14
|
+
<th>Total Amount</th>
|
15
|
+
<th>Type</th>
|
16
|
+
<th>Created At</th>
|
17
|
+
<th>State</th>
|
18
|
+
<th>Comment</th>
|
19
|
+
<th>Refunded At</th>
|
20
|
+
<th>Operator</th>
|
21
|
+
</tr>
|
22
|
+
</thead>
|
23
|
+
<tbody>
|
24
|
+
<% @refunds.each do |refund| %>
|
25
|
+
<tr>
|
26
|
+
<td><%= refund.refund_uuid %></td>
|
27
|
+
<td>
|
28
|
+
<p><%= link_to refund.order.uuid, admin_order_path(refund.order_id) %></p>
|
29
|
+
<p><%= link_to refund.payment.payment_uuid, admin_payments_path(id: refund.payment_id) %></p>
|
30
|
+
</td>
|
31
|
+
<td><%= refund.total_amount.to_money(refund.currency).format %></td>
|
32
|
+
<td><%= refund.type %></td>
|
33
|
+
<td><time><%= refund.created_at.to_s(:rfc822) %></time></td>
|
34
|
+
<td><%= refund.state %></td>
|
35
|
+
<td><%= refund.comment %></td>
|
36
|
+
<td>
|
37
|
+
<% if refund.refunded_at %>
|
38
|
+
<time><%= refund.refunded_at.to_s(:rfc822) %></time>
|
39
|
+
<% else %>
|
40
|
+
<div class="ui buttons">
|
41
|
+
<%= link_to 'Approve', confirm_admin_refund_path(refund), method: :patch, data: { confirm: 'Confirm Do Refund!' }, class: 'ui positive button' %>
|
42
|
+
<div class="or"></div>
|
43
|
+
<%= link_to 'Deny', deny_admin_refund_path(refund), method: :patch, data: { confirm: 'Deny Refund!' }, class: 'ui negative button' %>
|
44
|
+
</div>
|
45
|
+
<% end %>
|
46
|
+
<% if refund.reason %>
|
47
|
+
<p><%= refund.reason.truncate(27) %></p>
|
48
|
+
<% end %>
|
49
|
+
</td>
|
50
|
+
<td><%= refund.operator&.name %></td>
|
51
|
+
</tr>
|
52
|
+
<% end %>
|
53
|
+
</tbody>
|
54
|
+
</table>
|
55
|
+
|
56
|
+
|
57
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="ui modal" id="charge_edit_modal">
|
2
|
+
<i class="close icon"></i>
|
3
|
+
<div class="ui header blue">
|
4
|
+
Edit Charge
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="content">
|
8
|
+
<%= default_form_with model: @charge, scope: :charge, url: admin_serve_charge_path(@serve, @charge), method: :patch do |f| %>
|
9
|
+
<%= render partial: 'form', locals: { f: f } %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= f.select :type, options_for_select(ServeCharge.options_i18n(:type), @charge.type) %>
|
2
|
+
<%= f.number_field :min, step: ServeCharge.min_step %>
|
3
|
+
<%= f.number_field :max, step: ServeCharge.max_step %>
|
4
|
+
<%= f.number_field :price, step: '0.01' %>
|
5
|
+
<%= f.number_field :base_price, step: '0.01' %>
|
6
|
+
<% @serve.extra.each do |ex| %>
|
7
|
+
<%= f.text_field ex %>
|
8
|
+
<% end %>
|
9
|
+
<%= f.submit %>
|
10
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="ui modal" id="charge_new_modal">
|
2
|
+
<i class="close icon"></i>
|
3
|
+
<div class="ui header blue">
|
4
|
+
Add New Charge
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="content">
|
8
|
+
<%= form_with model: @charge, scope: :charge, url: admin_serve_charges_path(@serve) do |f| %>
|
9
|
+
<%= render partial: 'form', locals: { f: f } %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= search_form_with css: { wrapper_all: 'inline field', wrapper_input: 'field', wrapper_submit: 'field', submit: 'ui green button'} do |f| %>
|
2
|
+
<div class="fields">
|
3
|
+
<%= f.text_field :value, placeholder: 'Value' %>
|
4
|
+
<% @serve.extra.each do |extra| %>
|
5
|
+
<%= f.text_field extra, placeholder: extra %>
|
6
|
+
<% end %>
|
7
|
+
<%= f.submit 'Search' %>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<div>
|
2
|
+
|
3
|
+
<div class="ui segment breadcrumb">
|
4
|
+
<%= link_to 'back', admin_serves_path, class: 'section' %>
|
5
|
+
<i class="right angle icon divider"></i>
|
6
|
+
<div class="section">Charge List</div>
|
7
|
+
</div>
|
8
|
+
<div class="ui blue segment">
|
9
|
+
<%= render 'search_form' %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="ui blue segment">
|
13
|
+
<%= link_to new_admin_serve_charge_path(@serve), remote: true, class: 'ui blue button' do %>
|
14
|
+
<i class="add circle icon"></i>Add New Charge
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<table class="ui celled table">
|
19
|
+
<thead>
|
20
|
+
<tr>
|
21
|
+
<th class="center aligned">Min</th>
|
22
|
+
<th class="center aligned">Max</th>
|
23
|
+
<th>Extra</th>
|
24
|
+
<th class="center aligned">Price</th>
|
25
|
+
<th class="center aligned">Type</th>
|
26
|
+
<th class="center aligned">Action</th>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<tbody>
|
30
|
+
<% @charges.each do |charge| %>
|
31
|
+
<tr>
|
32
|
+
<td class="center aligned"><%= charge.min %></td>
|
33
|
+
<td class="center aligned"><%= charge.max %></td>
|
34
|
+
<td>
|
35
|
+
<%= simple_format_hash(charge.extra) %>
|
36
|
+
</td>
|
37
|
+
<td class="center aligned"><%= charge.price %></td>
|
38
|
+
<td class="center aligned"><%= charge.type %></td>
|
39
|
+
<td class="center aligned">
|
40
|
+
<%= link_to edit_admin_serve_charge_path(@serve, charge), class: 'ui icon green button', 'data-content' => 'Edit Charge', 'data-variation' => 'inverted', remote: true do %>
|
41
|
+
<i class="edit white icon"></i>
|
42
|
+
<% end %>
|
43
|
+
<%= link_to admin_serve_charge_path(@serve, charge), method: :delete, class: 'ui icon red button floated', 'data-content': 'Delete', 'data-variation': 'inverted', data: { confirm: 'Are you sure?' } do %>
|
44
|
+
<i class="center aligned remove white icon"></i>
|
45
|
+
<% end %>
|
46
|
+
</td>
|
47
|
+
</tr>
|
48
|
+
<% end %>
|
49
|
+
</tbody>
|
50
|
+
</table>
|
51
|
+
<%= paginate @charges %>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
55
|
+
|
56
|
+
|