shoppe 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/shoppe/table-tear-off.png +0 -0
- data/app/assets/javascripts/shoppe/application.coffee +2 -2
- data/app/assets/stylesheets/shoppe/application.scss +80 -37
- data/app/assets/stylesheets/shoppe/elements.scss +1 -2
- data/app/controllers/shoppe/attachments_controller.rb +3 -3
- data/app/controllers/shoppe/countries_controller.rb +13 -13
- data/app/controllers/shoppe/delivery_service_prices_controller.rb +11 -11
- data/app/controllers/shoppe/delivery_services_controller.rb +13 -13
- data/app/controllers/shoppe/orders_controller.rb +20 -20
- data/app/controllers/shoppe/payments_controller.rb +8 -8
- data/app/controllers/shoppe/product_categories_controller.rb +13 -13
- data/app/controllers/shoppe/products_controller.rb +24 -13
- data/app/controllers/shoppe/sessions_controller.rb +7 -7
- data/app/controllers/shoppe/settings_controller.rb +6 -6
- data/app/controllers/shoppe/stock_level_adjustments_controller.rb +5 -5
- data/app/controllers/shoppe/tax_rates_controller.rb +13 -13
- data/app/controllers/shoppe/users_controller.rb +15 -15
- data/app/controllers/shoppe/variants_controller.rb +13 -13
- data/app/helpers/shoppe/application_helper.rb +12 -12
- data/app/models/shoppe/order/actions.rb +17 -3
- data/app/models/shoppe/order/billing.rb +18 -18
- data/app/models/shoppe/order/delivery.rb +30 -31
- data/app/models/shoppe/order_item.rb +33 -34
- data/app/models/shoppe/payment.rb +15 -15
- data/app/models/shoppe/product.rb +82 -21
- data/app/models/shoppe/product/variants.rb +10 -10
- data/app/models/shoppe/product_category.rb +7 -7
- data/app/models/shoppe/stock_level_adjustment.rb +6 -6
- data/app/validators/permalink_validator.rb +7 -0
- data/app/views/layouts/shoppe/application.html.haml +10 -20
- data/app/views/shoppe/countries/_form.html.haml +15 -11
- data/app/views/shoppe/countries/edit.html.haml +5 -4
- data/app/views/shoppe/countries/index.html.haml +9 -9
- data/app/views/shoppe/countries/new.html.haml +6 -4
- data/app/views/shoppe/delivery_service_prices/_form.html.haml +16 -16
- data/app/views/shoppe/delivery_service_prices/edit.html.haml +5 -4
- data/app/views/shoppe/delivery_service_prices/index.html.haml +8 -9
- data/app/views/shoppe/delivery_service_prices/new.html.haml +5 -4
- data/app/views/shoppe/delivery_services/_form.html.haml +15 -14
- data/app/views/shoppe/delivery_services/edit.html.haml +7 -5
- data/app/views/shoppe/delivery_services/index.html.haml +11 -12
- data/app/views/shoppe/delivery_services/new.html.haml +5 -4
- data/app/views/shoppe/orders/_form.html.haml +19 -19
- data/app/views/shoppe/orders/_order_details.html.haml +20 -15
- data/app/views/shoppe/orders/_order_items.html.haml +6 -6
- data/app/views/shoppe/orders/_order_items_form.html.haml +11 -11
- data/app/views/shoppe/orders/_payments_form.html.haml +4 -4
- data/app/views/shoppe/orders/_payments_table.html.haml +12 -12
- data/app/views/shoppe/orders/_search_form.html.haml +10 -10
- data/app/views/shoppe/orders/_status_bar.html.haml +17 -13
- data/app/views/shoppe/orders/despatch_note.html.haml +15 -15
- data/app/views/shoppe/orders/edit.html.haml +8 -8
- data/app/views/shoppe/orders/index.html.haml +12 -12
- data/app/views/shoppe/orders/new.html.haml +7 -7
- data/app/views/shoppe/orders/show.html.haml +9 -12
- data/app/views/shoppe/payments/refund.html.haml +6 -7
- data/app/views/shoppe/product_categories/_form.html.haml +9 -9
- data/app/views/shoppe/product_categories/edit.html.haml +4 -4
- data/app/views/shoppe/product_categories/index.html.haml +5 -5
- data/app/views/shoppe/product_categories/new.html.haml +4 -3
- data/app/views/shoppe/products/_form.html.haml +49 -50
- data/app/views/shoppe/products/_table.html.haml +10 -10
- data/app/views/shoppe/products/edit.html.haml +6 -6
- data/app/views/shoppe/products/import.html.haml +63 -0
- data/app/views/shoppe/products/index.html.haml +6 -4
- data/app/views/shoppe/products/new.html.haml +6 -4
- data/app/views/shoppe/sessions/new.html.haml +5 -5
- data/app/views/shoppe/sessions/reset.html.haml +6 -5
- data/app/views/shoppe/settings/edit.html.haml +5 -5
- data/app/views/shoppe/shared/error.html.haml +3 -3
- data/app/views/shoppe/stock_level_adjustments/index.html.haml +13 -12
- data/app/views/shoppe/tax_rates/form.html.haml +13 -13
- data/app/views/shoppe/tax_rates/index.html.haml +5 -5
- data/app/views/shoppe/users/_form.html.haml +10 -11
- data/app/views/shoppe/users/edit.html.haml +4 -4
- data/app/views/shoppe/users/index.html.haml +5 -5
- data/app/views/shoppe/users/new.html.haml +6 -4
- data/app/views/shoppe/variants/form.html.haml +27 -29
- data/app/views/shoppe/variants/index.html.haml +11 -11
- data/config/locales/en.yml +619 -14
- data/config/locales/es.yml +650 -0
- data/config/locales/pl.yml +650 -0
- data/config/locales/pt-BR.yml +643 -0
- data/config/routes.rb +16 -8
- data/db/migrate/20141026175622_add_indexes_to_shoppe_order_items.rb +6 -0
- data/db/migrate/20141026175943_add_indexes_to_shoppe_orders.rb +7 -0
- data/db/migrate/20141026180333_add_indexes_to_shoppe_payments.rb +6 -0
- data/db/migrate/20141026180835_add_indexes_to_shoppe_product_attributes.rb +7 -0
- data/db/migrate/20141026180952_add_indexes_to_shoppe_product_categories.rb +5 -0
- data/db/migrate/20141026181040_add_indexes_to_shoppe_products.rb +8 -0
- data/db/migrate/20141026181312_add_indexes_to_shoppe_settings.rb +5 -0
- data/db/migrate/20141026181354_add_indexes_to_shoppe_stock_level_adjustments.rb +6 -0
- data/db/migrate/20141026181559_add_indexes_to_shoppe_users.rb +5 -0
- data/db/migrate/20141026181716_add_indexes_to_shoppe_delivery_services.rb +9 -0
- data/db/schema.rb +36 -1
- data/lib/shoppe/engine.rb +6 -0
- data/lib/shoppe/navigation_manager.rb +1 -1
- data/lib/shoppe/version.rb +1 -1
- metadata +67 -5
@@ -1,21 +1,21 @@
|
|
1
|
-
- @page_title =
|
1
|
+
- @page_title = "#{t('shoppe.orders.edit_order')} ##{@order.number}"
|
2
2
|
|
3
3
|
= content_for :header do
|
4
4
|
%p.buttons
|
5
|
-
= link_to
|
6
|
-
%h2.orders
|
5
|
+
= link_to t('shoppe.orders.back_to_order'), @order, :class => 'button grey'
|
6
|
+
%h2.orders "#{t('shoppe.orders.edit_order')} <b>##{@order.number}</b>"
|
7
7
|
|
8
8
|
= form_for @order, :html => {:class => 'orderForm'} do |f|
|
9
9
|
= f.error_messages
|
10
10
|
= render 'form', :f => f
|
11
|
-
|
12
|
-
= field_set_tag
|
11
|
+
|
12
|
+
= field_set_tag t('shoppe.orders.notes') do
|
13
13
|
%dl
|
14
14
|
%dd= f.text_area :notes, :class => 'text'
|
15
15
|
|
16
|
-
= field_set_tag
|
16
|
+
= field_set_tag t('shoppe.orders.ordered_products'), :class => 'padded' do
|
17
17
|
= render 'order_items_form', :f => f
|
18
18
|
|
19
19
|
%p.submit
|
20
|
-
= f.submit
|
21
|
-
= link_to
|
20
|
+
= f.submit t('shoppe.orders.save_order') , :class => 'button green'
|
21
|
+
= link_to t('shoppe.cancel'), @order, :class => 'button'
|
@@ -1,11 +1,11 @@
|
|
1
|
-
- @page_title = '
|
1
|
+
- @page_title = t('shoppe.orders.orders')
|
2
2
|
|
3
3
|
= content_for :header do
|
4
4
|
%p.buttons
|
5
|
-
= link_to
|
6
|
-
= link_to
|
5
|
+
= link_to t('shoppe.orders.new_order'), :new_order, :class => 'button green'
|
6
|
+
= link_to t('shoppe.orders.search_orders'), '#', :class => 'button', :rel => 'searchOrders'
|
7
7
|
%h2.orders
|
8
|
-
|
8
|
+
= t('shoppe.orders.orders')
|
9
9
|
%span= page_entries_info @orders
|
10
10
|
|
11
11
|
= render 'search_form'
|
@@ -14,16 +14,16 @@
|
|
14
14
|
%table.data
|
15
15
|
%thead
|
16
16
|
%tr
|
17
|
-
%th
|
18
|
-
%th
|
19
|
-
%th
|
20
|
-
%th
|
21
|
-
%th
|
22
|
-
%th
|
17
|
+
%th= t('shoppe.orders.number')
|
18
|
+
%th= t('shoppe.orders.customer')
|
19
|
+
%th= t('shoppe.orders.status')
|
20
|
+
%th= t('shoppe.orders.products')
|
21
|
+
%th= t('shoppe.orders.total')
|
22
|
+
%th= t('shoppe.orders.payment')
|
23
23
|
%tbody
|
24
24
|
- if @orders.empty?
|
25
25
|
%tr.empty
|
26
|
-
%td{:colspan => 6}
|
26
|
+
%td{:colspan => 6}= t('shoppe.orders.no_orders')
|
27
27
|
- else
|
28
28
|
- for order in @orders
|
29
29
|
%tr
|
@@ -36,4 +36,4 @@
|
|
36
36
|
%li #{item.quantity} x #{item.ordered_item.full_name}
|
37
37
|
%td= number_to_currency order.total
|
38
38
|
%td= boolean_tag order.paid_in_full?, nil, :true_text => number_to_currency(order.amount_paid), :false_text => number_to_currency(order.amount_paid)
|
39
|
-
= paginate @orders
|
39
|
+
= paginate @orders
|
@@ -1,14 +1,14 @@
|
|
1
|
-
- @page_title = '
|
1
|
+
- @page_title = t('shoppe.orders.new_order')
|
2
|
+
|
2
3
|
= content_for :header do
|
3
|
-
%p.buttons= link_to
|
4
|
-
%h2.orders
|
5
|
-
New Order
|
4
|
+
%p.buttons= link_to t('shoppe.orders.back_to_orders'), :orders, :class => 'button grey'
|
5
|
+
%h2.orders= t('shoppe.orders.new_order')
|
6
6
|
|
7
7
|
= form_for @order, :html => {:class => 'orderForm newOrder'} do |f|
|
8
8
|
= f.error_messages
|
9
9
|
= render 'form', :f => f
|
10
|
-
= field_set_tag
|
10
|
+
= field_set_tag t('shoppe.orders.ordered_products'), :class => 'padded' do
|
11
11
|
= render 'order_items_form', :f => f
|
12
12
|
%p.submit
|
13
|
-
= f.submit
|
14
|
-
= link_to
|
13
|
+
= f.submit t('shoppe.orders.create_order'), :class => 'button green'
|
14
|
+
= link_to t('shoppe.cancel'), :orders, :class => 'button grey'
|
@@ -1,12 +1,12 @@
|
|
1
|
-
- @page_title =
|
1
|
+
- @page_title = "#{t('shoppe.orders.order')} ##{@order.number}"
|
2
2
|
|
3
3
|
= content_for :header do
|
4
4
|
%p.buttons
|
5
|
-
= link_to
|
5
|
+
= link_to t('shoppe.edit'), [:edit, @order], :class => 'button'
|
6
6
|
- if @order.accepted?
|
7
|
-
= link_to
|
8
|
-
= link_to
|
9
|
-
%h2.orders
|
7
|
+
= link_to t('shoppe.orders.despatch_note.despatch_note'), [:despatch_note, @order], :class => 'button', :rel => 'print'
|
8
|
+
= link_to t('shoppe.orders.back_to_orders'), :orders, :class => 'button grey'
|
9
|
+
%h2.orders= t('shoppe.orders.order_no_html', order_number: @order.number)
|
10
10
|
|
11
11
|
#order
|
12
12
|
|
@@ -14,15 +14,12 @@
|
|
14
14
|
= render 'order_details'
|
15
15
|
= render 'status_bar'
|
16
16
|
- else
|
17
|
-
%p.warning
|
18
|
-
This order is still being built by the customer in your store. At
|
19
|
-
present you can only view the items which are within the order.
|
17
|
+
%p.warning= t('shoppe.orders.in_progress_warning')
|
20
18
|
|
21
|
-
|
22
|
-
= field_set_tag "Order Items", :class => 'padded' do
|
19
|
+
= field_set_tag t('shoppe.orders.order_items'), :class => 'padded' do
|
23
20
|
= render 'order_items'
|
24
|
-
|
21
|
+
|
25
22
|
- if @order.received?
|
26
|
-
= field_set_tag
|
23
|
+
= field_set_tag t('shoppe.orders.payments'), :class => 'padded orderPayments' do
|
27
24
|
= render 'payments_table'
|
28
25
|
= render 'payments_form'
|
@@ -1,14 +1,13 @@
|
|
1
1
|
|
2
2
|
= form_tag [:refund, @order, @payment], :class => 'refundForm' do
|
3
|
-
%h2
|
3
|
+
%h2= t('shoppe.refund.issue_refund')
|
4
4
|
%p.intro
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
= t('shoppe.refund.intro_html', amount: number_to_currency(@payment.refundable_amount))
|
6
|
+
|
8
7
|
.moneyInput
|
9
8
|
.currency= Shoppe.settings.currency_unit.html_safe
|
10
9
|
= text_field_tag 'amount', @payment.refundable_amount, :class => 'text'
|
11
10
|
%p.submit
|
12
|
-
= submit_tag
|
13
|
-
= link_to
|
14
|
-
|
11
|
+
= submit_tag t('shoppe.refund.refund'), :class => 'button green'
|
12
|
+
= link_to t('shoppe.close'), '#', :class => 'button grey', :rel => 'closeDialog'
|
13
|
+
|
@@ -1,26 +1,26 @@
|
|
1
1
|
= form_for @product_category do |f|
|
2
2
|
= f.error_messages
|
3
|
-
= field_set_tag '
|
3
|
+
= field_set_tag t('shoppe.product_category.category_details') do
|
4
4
|
.splitContainer
|
5
5
|
%dl.half
|
6
|
-
%dt= f.label :name
|
6
|
+
%dt= f.label :name, t('shoppe.product_category.name')
|
7
7
|
%dd= f.text_field :name, :class => 'focus text'
|
8
8
|
%dl.half
|
9
|
-
%dt= f.label :permalink
|
9
|
+
%dt= f.label :permalink, t('shoppe.product_category.permalink')
|
10
10
|
%dd= f.text_field :permalink, :class => 'text'
|
11
11
|
%dl
|
12
|
-
%dt= f.label :description
|
12
|
+
%dt= f.label :description, t('shoppe.product_category.description')
|
13
13
|
%dd= f.text_area :description, :class => 'text'
|
14
|
-
= field_set_tag "Attachments" do
|
15
14
|
|
15
|
+
= field_set_tag t('shoppe.product_category.attachments') do
|
16
16
|
%dl
|
17
|
-
%dt= f.label :image_file,
|
17
|
+
%dt= f.label :image_file, t('shoppe.product_category.image')
|
18
18
|
%dd
|
19
19
|
= attachment_preview @product_category.image
|
20
20
|
%p= f.file_field :image_file
|
21
21
|
|
22
22
|
%p.submit
|
23
23
|
- unless @product_category.new_record?
|
24
|
-
%span.right= link_to
|
25
|
-
= f.submit :class => 'button green'
|
26
|
-
= link_to
|
24
|
+
%span.right= link_to t('shoppe.delete') , @product_category, :class => 'button purple', :method => :delete, :data => {:confirm => t('shoppe.product_category.delete_confirmation') }
|
25
|
+
= f.submit t('shoppe.submit'), :class => 'button green'
|
26
|
+
= link_to t('shoppe.cancel') , :product_categories, :class => 'button'
|
@@ -1,6 +1,6 @@
|
|
1
|
-
- @page_title =
|
1
|
+
- @page_title = t('shoppe.product_category.product_categories')
|
2
2
|
= content_for :header do
|
3
|
-
%p.buttons= link_to
|
4
|
-
%h2.products
|
3
|
+
%p.buttons= link_to t('shoppe.product_category.back_to_categories'), :product_categories, :class => 'button'
|
4
|
+
%h2.products= t('shoppe.product_category.product_categories')
|
5
5
|
= render 'form'
|
6
|
-
|
6
|
+
|
@@ -1,18 +1,18 @@
|
|
1
|
-
- @page_title =
|
1
|
+
- @page_title = t('shoppe.product_category.product_categories')
|
2
2
|
|
3
3
|
= content_for :header do
|
4
|
-
%p.buttons=link_to
|
5
|
-
%h2.products
|
4
|
+
%p.buttons=link_to t('shoppe.product_category.new_category'), :new_product_category, :class => 'button green'
|
5
|
+
%h2.products= t('shoppe.product_category.product_categories')
|
6
6
|
|
7
7
|
.table
|
8
8
|
%table.data
|
9
9
|
%thead
|
10
10
|
%tr
|
11
|
-
%th
|
11
|
+
%th= t('shoppe.product_category.name')
|
12
12
|
%tbody
|
13
13
|
- if @product_categories.empty?
|
14
14
|
%tr.empty
|
15
|
-
%td
|
15
|
+
%td= t('shoppe.product_category.no_categories')
|
16
16
|
- else
|
17
17
|
- for cat in @product_categories
|
18
18
|
%tr
|
@@ -1,5 +1,6 @@
|
|
1
|
-
- @page_title =
|
1
|
+
- @page_title = t('shoppe.product_category.product_categories')
|
2
2
|
= content_for :header do
|
3
|
-
%p.buttons= link_to
|
4
|
-
%h2.products
|
3
|
+
%p.buttons= link_to t('shoppe.product_category.back_to_categories'), :product_categories, :class => 'button'
|
4
|
+
%h2.products= t('shoppe.product_category.product_categories')
|
5
|
+
|
5
6
|
= render 'form'
|
@@ -1,119 +1,118 @@
|
|
1
1
|
= form_for @product, :html => {:multipart => true} do |f|
|
2
2
|
= f.error_messages
|
3
|
-
= field_set_tag
|
3
|
+
= field_set_tag t('shoppe.products.product_information') do
|
4
4
|
%dl
|
5
|
-
%dt= f.label :product_category_id
|
6
|
-
%dd= f.collection_select :product_category_id, Shoppe::ProductCategory.ordered, :id, :name, {:
|
7
|
-
|
5
|
+
%dt= f.label :product_category_id, t('shoppe.products.product_category')
|
6
|
+
%dd= f.collection_select :product_category_id, Shoppe::ProductCategory.ordered, :id, :name, {:prompt => false}, {:class => 'chosen'}
|
7
|
+
|
8
8
|
.splitContainer
|
9
9
|
%dl.third
|
10
|
-
%dt= f.label :name
|
10
|
+
%dt= f.label :name, t('shoppe.products.name')
|
11
11
|
%dd= f.text_field :name, :class => 'text focus'
|
12
12
|
%dl.third
|
13
|
-
%dt= f.label :permalink
|
13
|
+
%dt= f.label :permalink, t('shoppe.products.permalink')
|
14
14
|
%dd= f.text_field :permalink, :class => 'text'
|
15
15
|
%dl.third
|
16
|
-
%dt= f.label :sku, '
|
16
|
+
%dt= f.label :sku, t('shoppe.products.sku')
|
17
17
|
%dd= f.text_field :sku, :class => 'text'
|
18
18
|
%dl
|
19
|
-
%dt= f.label :description
|
19
|
+
%dt= f.label :description, t('shoppe.products.description')
|
20
20
|
%dd= f.text_area :description, :class => 'text'
|
21
21
|
%dl
|
22
|
-
%dt= f.label :short_description
|
22
|
+
%dt= f.label :short_description, t('shoppe.products.short_description')
|
23
23
|
%dd= f.text_area :short_description, :class => 'text'
|
24
24
|
%dl
|
25
|
-
%dt= f.label :in_the_box,
|
25
|
+
%dt= f.label :in_the_box, t('shoppe.products.in_the_box')
|
26
26
|
%dd= f.text_area :in_the_box, :class => 'text'
|
27
|
-
|
28
|
-
= field_set_tag
|
27
|
+
|
28
|
+
= field_set_tag t('shoppe.products.attributes') do
|
29
29
|
.margin
|
30
30
|
%table.productAttributes
|
31
31
|
%thead
|
32
32
|
%tr
|
33
|
-
%td
|
34
|
-
%td
|
35
|
-
%td.searchable
|
36
|
-
%td.searchable
|
37
|
-
%td.remove
|
33
|
+
%td= t('shoppe.products.name')
|
34
|
+
%td= t('shoppe.products.value')
|
35
|
+
%td.searchable= t('shoppe.products.searchable?')
|
36
|
+
%td.searchable= t('shoppe.products.public?')
|
37
|
+
%td.remove= t('shoppe.products.remove')
|
38
38
|
%td
|
39
39
|
%tbody
|
40
40
|
%tr.template{:style => 'display:none;'}
|
41
|
-
%td= text_field_tag 'product[product_attributes_array][][key]', '', :placeholder => '
|
42
|
-
%td= text_field_tag 'product[product_attributes_array][][value]', '', :placeholder => '
|
41
|
+
%td= text_field_tag 'product[product_attributes_array][][key]', '', :placeholder => t('shoppe.products.name')
|
42
|
+
%td= text_field_tag 'product[product_attributes_array][][value]', '', :placeholder => t('shoppe.products.value')
|
43
43
|
%td.searchable= check_box_tag 'product[product_attributes_array][][searchable]', '1'
|
44
44
|
%td.searchable= check_box_tag 'product[product_attributes_array][][public]', '1'
|
45
|
-
%td.remove= link_to
|
45
|
+
%td.remove= link_to t('shoppe.remove') , '#', :class => 'button button-mini purple'
|
46
46
|
%td.handle
|
47
47
|
- for attribute in @product.product_attributes
|
48
48
|
%tr
|
49
|
-
%td= text_field_tag 'product[product_attributes_array][][key]', attribute.key, :placeholder => '
|
50
|
-
%td= text_field_tag 'product[product_attributes_array][][value]', attribute.value, :placeholder => '
|
49
|
+
%td= text_field_tag 'product[product_attributes_array][][key]', attribute.key, :placeholder => t('shoppe.products.name')
|
50
|
+
%td= text_field_tag 'product[product_attributes_array][][value]', attribute.value, :placeholder => t('shoppe.products.value')
|
51
51
|
%td.searchable= check_box_tag 'product[product_attributes_array][][searchable]', '1', attribute.searchable?
|
52
52
|
%td.searchable= check_box_tag 'product[product_attributes_array][][public]', '1', attribute.public?
|
53
|
-
%td.remove= link_to "
|
53
|
+
%td.remove= link_to t("shoppe.remove"), '#', :class => 'button button-mini purple'
|
54
54
|
%td.handle
|
55
|
-
%p.addAttribute= link_to
|
56
|
-
|
57
|
-
= field_set_tag
|
55
|
+
%p.addAttribute= link_to t('shoppe.products.add_attribute') , '#', :data => {:behavior => 'addAttributeToAttributesTable'}, :class => 'button button-mini green'
|
56
|
+
|
57
|
+
= field_set_tag t('shoppe.products.attachments') do
|
58
58
|
.splitContainer
|
59
59
|
%dl.half
|
60
|
-
%dt= f.label :default_image_file,
|
60
|
+
%dt= f.label :default_image_file, t('shoppe.products.default_image')
|
61
61
|
%dd
|
62
62
|
= attachment_preview @product.default_image
|
63
63
|
%p= f.file_field :default_image_file
|
64
64
|
%dl.half
|
65
|
-
%dt= f.label :data_sheet_file,
|
65
|
+
%dt= f.label :data_sheet_file, t('shoppe.products.datasheet')
|
66
66
|
%dd
|
67
67
|
= attachment_preview @product.data_sheet
|
68
68
|
%p= f.file_field :data_sheet_file
|
69
|
-
|
70
|
-
- unless @product.has_variants?
|
71
|
-
= field_set_tag
|
69
|
+
|
70
|
+
- unless @product.has_variants?
|
71
|
+
= field_set_tag t('shoppe.products.pricing') do
|
72
72
|
.splitContainer
|
73
73
|
%dl.third
|
74
|
-
%dt= f.label :price
|
74
|
+
%dt= f.label :price, t('shoppe.products.price')
|
75
75
|
%dd
|
76
76
|
.moneyInput
|
77
77
|
.currency= Shoppe.settings.currency_unit.html_safe
|
78
78
|
= f.text_field :price, :class => 'text'
|
79
79
|
%dl.third
|
80
|
-
%dt= f.label :cost_price
|
80
|
+
%dt= f.label :cost_price, t('shoppe.products.cost_price')
|
81
81
|
%dd
|
82
82
|
.moneyInput
|
83
83
|
.currency= Shoppe.settings.currency_unit.html_safe
|
84
84
|
= f.text_field :cost_price, :class => 'text'
|
85
85
|
%dl.third
|
86
|
-
%dt= f.label :tax_rate_id
|
87
|
-
%dd= f.collection_select :tax_rate_id, Shoppe::TaxRate.ordered, :id, :description, {:include_blank => true}, {:class => 'chosen-with-deselect', :data => {:placeholder =>
|
88
|
-
|
89
|
-
= field_set_tag
|
86
|
+
%dt= f.label :tax_rate_id, t('shoppe.products.tax_rate')
|
87
|
+
%dd= f.collection_select :tax_rate_id, Shoppe::TaxRate.ordered, :id, :description, {:include_blank => true}, {:class => 'chosen-with-deselect', :data => {:placeholder => t('shoppe.products.no_tax')}}
|
88
|
+
|
89
|
+
= field_set_tag t('shoppe.products.stock_control') do
|
90
90
|
.splitContainer
|
91
91
|
%dl.half
|
92
|
-
%dt= f.label :weight
|
92
|
+
%dt= f.label :weight, t('shoppe.products.weight')
|
93
93
|
%dd= f.text_field :weight, :class => 'text'
|
94
|
-
|
94
|
+
|
95
95
|
%dl.half
|
96
|
-
%dt= f.label :stock_control
|
96
|
+
%dt= f.label :stock_control, t('shoppe.products.stock_control')
|
97
97
|
%dd.checkbox
|
98
98
|
= f.check_box :stock_control
|
99
|
-
= f.label :stock_control,
|
99
|
+
= f.label :stock_control, t('shoppe.products.enable_stock_control?')
|
100
100
|
|
101
|
-
= field_set_tag
|
101
|
+
= field_set_tag t('shoppe.products.website_properties') do
|
102
102
|
.splitContainer
|
103
|
-
|
104
103
|
%dl.half
|
105
|
-
%dt= f.label :active,
|
104
|
+
%dt= f.label :active, t('shoppe.products.on_sale?')
|
106
105
|
%dd.checkbox
|
107
106
|
= f.check_box :active
|
108
|
-
= f.label :active,
|
107
|
+
= f.label :active, t('shoppe.products.on_sale_info')
|
109
108
|
%dl.half
|
110
|
-
%dt= f.label :featured,
|
109
|
+
%dt= f.label :featured, t('shoppe.products.featured?')
|
111
110
|
%dd.checkbox
|
112
111
|
= f.check_box :featured
|
113
|
-
= f.label :featured,
|
112
|
+
= f.label :featured, t('shoppe.products.featured_info')
|
114
113
|
|
115
114
|
%p.submit
|
116
115
|
- unless @product.new_record?
|
117
|
-
%span.right= link_to
|
118
|
-
= f.submit :class => 'button green'
|
119
|
-
= link_to
|
116
|
+
%span.right= link_to t('shoppe.delete') , @product, :class => 'button purple', :method => :delete, :data => {:confirm => "Are you sure you wish to remove this product?"}
|
117
|
+
= f.submit t('shoppe.submit'), :class => 'button green'
|
118
|
+
= link_to t('shoppe.cancel'), :products, :class => 'button'
|
@@ -2,14 +2,14 @@
|
|
2
2
|
%table.data
|
3
3
|
%thead
|
4
4
|
%tr
|
5
|
-
%th{:width => '20%'}
|
6
|
-
%th{:width => '40%'}
|
7
|
-
%th{:width => '25%'}
|
8
|
-
%th{:width => '15%'}
|
5
|
+
%th{:width => '20%'}= t('shoppe.products.sku')
|
6
|
+
%th{:width => '40%'}= t('shoppe.products.name')
|
7
|
+
%th{:width => '25%'}= t('shoppe.products.price_variants')
|
8
|
+
%th{:width => '15%'}= t('shoppe.products.stock')
|
9
9
|
%tbody
|
10
10
|
- if products.empty?
|
11
11
|
%tr.empty
|
12
|
-
%td{:colspan => 4}
|
12
|
+
%td{:colspan => 4}= t('shoppe.products.no_products')
|
13
13
|
- else
|
14
14
|
- for category, products in products
|
15
15
|
%tr
|
@@ -27,16 +27,16 @@
|
|
27
27
|
%td{:width => '30%'}= number_to_currency variant.price
|
28
28
|
%td{:width => '30%'}
|
29
29
|
- if variant.stock_control?
|
30
|
-
%span.float-right= link_to
|
31
|
-
= boolean_tag(variant.in_stock?, nil, :true_text => variant.stock, :false_text => '
|
30
|
+
%span.float-right= link_to t('shoppe.products.edit') , stock_level_adjustments_path(:item_type => variant.class, :item_id => variant.id), :class => 'edit', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
|
31
|
+
= boolean_tag(variant.in_stock?, nil, :true_text => variant.stock, :false_text => t('shoppe.products.no_stock'))
|
32
32
|
- else
|
33
33
|
∞
|
34
34
|
- else
|
35
35
|
%td= number_to_currency product.price
|
36
36
|
%td
|
37
37
|
- if product.stock_control?
|
38
|
-
%span.float-right= link_to
|
39
|
-
= boolean_tag(product.in_stock?, nil, :true_text => product.stock, :false_text => '
|
38
|
+
%span.float-right= link_to t('shoppe.products.edit'), stock_level_adjustments_path(:item_type => product.class, :item_id => product.id), :class => 'edit', :rel => 'dialog', :data => {:dialog_width => 700, :dialog_behavior => 'stockLevelAdjustments'}
|
39
|
+
= boolean_tag(product.in_stock?, nil, :true_text => product.stock, :false_text => t('shoppe.products.no_stock'))
|
40
40
|
- else
|
41
41
|
∞
|
42
|
-
|
42
|
+
|