kkt_shoppe 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +55 -0
- data/Rakefile +36 -0
- data/app/assets/images/kkt_shoppe/chosen-sprite.png +0 -0
- data/app/assets/images/kkt_shoppe/chosen-sprite@2x.png +0 -0
- data/app/assets/images/kkt_shoppe/document.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/bag.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/balance.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/box.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/building.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/chart.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/chat.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/checkbox.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/checkbox2.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/cloud.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/cone.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/credit_card.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/currency.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/edit.svg +14 -0
- data/app/assets/images/kkt_shoppe/icons/flowchart.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/gift.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/globe.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/id.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/id2.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/locked.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/report.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/search.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/support.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/tags.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/toolbox.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/unlocked.svg +1 -0
- data/app/assets/images/kkt_shoppe/icons/wallet.svg +1 -0
- data/app/assets/images/kkt_shoppe/kkt_shoppe.svg +25 -0
- data/app/assets/images/kkt_shoppe/logo.svg +47 -0
- data/app/assets/images/kkt_shoppe/move.svg +1 -0
- data/app/assets/images/kkt_shoppe/square.svg +9 -0
- data/app/assets/images/kkt_shoppe/statuses/accepted.svg +14 -0
- data/app/assets/images/kkt_shoppe/statuses/paid.svg +16 -0
- data/app/assets/images/kkt_shoppe/statuses/received.svg +15 -0
- data/app/assets/images/kkt_shoppe/statuses/rejected.svg +14 -0
- data/app/assets/images/kkt_shoppe/statuses/shipped.svg +14 -0
- data/app/assets/images/kkt_shoppe/table-tear-off.png +0 -0
- data/app/assets/javascripts/kkt_shoppe/application.coffee +123 -0
- data/app/assets/javascripts/kkt_shoppe/chosen.jquery.js +1166 -0
- data/app/assets/javascripts/kkt_shoppe/jquery_ui.js +6 -0
- data/app/assets/javascripts/kkt_shoppe/mousetrap.js +9 -0
- data/app/assets/javascripts/kkt_shoppe/order_form.coffee +47 -0
- data/app/assets/stylesheets/kkt_shoppe/application.scss +601 -0
- data/app/assets/stylesheets/kkt_shoppe/chosen.scss +424 -0
- data/app/assets/stylesheets/kkt_shoppe/dialog.scss +25 -0
- data/app/assets/stylesheets/kkt_shoppe/elements.scss +79 -0
- data/app/assets/stylesheets/kkt_shoppe/printable.scss +67 -0
- data/app/assets/stylesheets/kkt_shoppe/reset.scss +93 -0
- data/app/assets/stylesheets/kkt_shoppe/sub.scss +106 -0
- data/app/assets/stylesheets/kkt_shoppe/variables.scss +1 -0
- data/app/controllers/kkt_shoppe/addresses_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/application_controller.rb +46 -0
- data/app/controllers/kkt_shoppe/attachments_controller.rb +14 -0
- data/app/controllers/kkt_shoppe/countries_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/customers_controller.rb +55 -0
- data/app/controllers/kkt_shoppe/dashboard_controller.rb +9 -0
- data/app/controllers/kkt_shoppe/delivery_service_prices_controller.rb +45 -0
- data/app/controllers/kkt_shoppe/delivery_services_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/orders_controller.rb +119 -0
- data/app/controllers/kkt_shoppe/payments_controller.rb +33 -0
- data/app/controllers/kkt_shoppe/product_categories_controller.rb +47 -0
- data/app/controllers/kkt_shoppe/product_category_localisations_controller.rb +58 -0
- data/app/controllers/kkt_shoppe/product_localisations_controller.rb +58 -0
- data/app/controllers/kkt_shoppe/products_controller.rb +58 -0
- data/app/controllers/kkt_shoppe/sessions_controller.rb +34 -0
- data/app/controllers/kkt_shoppe/settings_controller.rb +16 -0
- data/app/controllers/kkt_shoppe/stock_level_adjustments_controller.rb +40 -0
- data/app/controllers/kkt_shoppe/tax_rates_controller.rb +49 -0
- data/app/controllers/kkt_shoppe/users_controller.rb +53 -0
- data/app/controllers/kkt_shoppe/variants_controller.rb +50 -0
- data/app/helpers/kkt_shoppe/application_helper.rb +60 -0
- data/app/helpers/kkt_shoppe/product_category_helper.rb +36 -0
- data/app/mailers/kkt_shoppe/order_mailer.rb +25 -0
- data/app/mailers/kkt_shoppe/user_mailer.rb +10 -0
- data/app/models/kkt_shoppe/address.rb +44 -0
- data/app/models/kkt_shoppe/country.rb +27 -0
- data/app/models/kkt_shoppe/customer.rb +41 -0
- data/app/models/kkt_shoppe/delivery_service.rb +33 -0
- data/app/models/kkt_shoppe/delivery_service_price.rb +31 -0
- data/app/models/kkt_shoppe/order/actions.rb +94 -0
- data/app/models/kkt_shoppe/order/billing.rb +105 -0
- data/app/models/kkt_shoppe/order/delivery.rb +229 -0
- data/app/models/kkt_shoppe/order/states.rb +69 -0
- data/app/models/kkt_shoppe/order.rb +100 -0
- data/app/models/kkt_shoppe/order_item.rb +239 -0
- data/app/models/kkt_shoppe/payment.rb +86 -0
- data/app/models/kkt_shoppe/product/product_attributes.rb +20 -0
- data/app/models/kkt_shoppe/product/variants.rb +51 -0
- data/app/models/kkt_shoppe/product.rb +189 -0
- data/app/models/kkt_shoppe/product_attribute.rb +66 -0
- data/app/models/kkt_shoppe/product_categorization.rb +14 -0
- data/app/models/kkt_shoppe/product_category.rb +75 -0
- data/app/models/kkt_shoppe/setting.rb +68 -0
- data/app/models/kkt_shoppe/stock_level_adjustment.rb +19 -0
- data/app/models/kkt_shoppe/tax_rate.rb +46 -0
- data/app/models/kkt_shoppe/user.rb +49 -0
- data/app/validators/permalink_validator.rb +7 -0
- data/app/views/kkt_shoppe/addresses/_form.html.haml +33 -0
- data/app/views/kkt_shoppe/addresses/edit.html.haml +5 -0
- data/app/views/kkt_shoppe/addresses/new.html.haml +5 -0
- data/app/views/kkt_shoppe/countries/_form.html.haml +35 -0
- data/app/views/kkt_shoppe/countries/edit.html.haml +6 -0
- data/app/views/kkt_shoppe/countries/index.html.haml +25 -0
- data/app/views/kkt_shoppe/countries/new.html.haml +7 -0
- data/app/views/kkt_shoppe/customers/_addresses.html.haml +20 -0
- data/app/views/kkt_shoppe/customers/_form.html.haml +30 -0
- data/app/views/kkt_shoppe/customers/_search_form.html.haml +13 -0
- data/app/views/kkt_shoppe/customers/edit.html.haml +5 -0
- data/app/views/kkt_shoppe/customers/index.html.haml +32 -0
- data/app/views/kkt_shoppe/customers/new.html.haml +5 -0
- data/app/views/kkt_shoppe/customers/show.html.haml +53 -0
- data/app/views/kkt_shoppe/delivery_service_prices/_form.html.haml +44 -0
- data/app/views/kkt_shoppe/delivery_service_prices/edit.html.haml +6 -0
- data/app/views/kkt_shoppe/delivery_service_prices/index.html.haml +23 -0
- data/app/views/kkt_shoppe/delivery_service_prices/new.html.haml +6 -0
- data/app/views/kkt_shoppe/delivery_services/_form.html.haml +38 -0
- data/app/views/kkt_shoppe/delivery_services/edit.html.haml +9 -0
- data/app/views/kkt_shoppe/delivery_services/index.html.haml +27 -0
- data/app/views/kkt_shoppe/delivery_services/new.html.haml +6 -0
- data/app/views/kkt_shoppe/order_mailer/accepted.text.erb +12 -0
- data/app/views/kkt_shoppe/order_mailer/received.text.erb +9 -0
- data/app/views/kkt_shoppe/order_mailer/rejected.text.erb +10 -0
- data/app/views/kkt_shoppe/order_mailer/shipped.text.erb +16 -0
- data/app/views/kkt_shoppe/orders/_form.html.haml +58 -0
- data/app/views/kkt_shoppe/orders/_order_details.html.haml +57 -0
- data/app/views/kkt_shoppe/orders/_order_items.html.haml +38 -0
- data/app/views/kkt_shoppe/orders/_order_items_form.html.haml +61 -0
- data/app/views/kkt_shoppe/orders/_payments_form.html.haml +15 -0
- data/app/views/kkt_shoppe/orders/_payments_table.html.haml +37 -0
- data/app/views/kkt_shoppe/orders/_search_form.html.haml +24 -0
- data/app/views/kkt_shoppe/orders/_status_bar.html.haml +35 -0
- data/app/views/kkt_shoppe/orders/despatch_note.html.haml +45 -0
- data/app/views/kkt_shoppe/orders/edit.html.haml +21 -0
- data/app/views/kkt_shoppe/orders/index.html.haml +39 -0
- data/app/views/kkt_shoppe/orders/new.html.haml +14 -0
- data/app/views/kkt_shoppe/orders/show.html.haml +25 -0
- data/app/views/kkt_shoppe/payments/refund.html.haml +13 -0
- data/app/views/kkt_shoppe/product_categories/_form.html.haml +50 -0
- data/app/views/kkt_shoppe/product_categories/edit.html.haml +8 -0
- data/app/views/kkt_shoppe/product_categories/index.html.haml +27 -0
- data/app/views/kkt_shoppe/product_categories/new.html.haml +6 -0
- data/app/views/kkt_shoppe/product_category_localisations/form.html.haml +29 -0
- data/app/views/kkt_shoppe/product_category_localisations/index.html.haml +26 -0
- data/app/views/kkt_shoppe/product_localisations/form.html.haml +32 -0
- data/app/views/kkt_shoppe/product_localisations/index.html.haml +26 -0
- data/app/views/kkt_shoppe/products/_form.html.haml +118 -0
- data/app/views/kkt_shoppe/products/_table.html.haml +42 -0
- data/app/views/kkt_shoppe/products/edit.html.haml +9 -0
- data/app/views/kkt_shoppe/products/import.html.haml +67 -0
- data/app/views/kkt_shoppe/products/index.html.haml +9 -0
- data/app/views/kkt_shoppe/products/new.html.haml +7 -0
- data/app/views/kkt_shoppe/sessions/new.html.haml +12 -0
- data/app/views/kkt_shoppe/sessions/reset.html.haml +12 -0
- data/app/views/kkt_shoppe/settings/edit.html.haml +19 -0
- data/app/views/kkt_shoppe/shared/error.html.haml +6 -0
- data/app/views/kkt_shoppe/stock_level_adjustments/index.html.haml +40 -0
- data/app/views/kkt_shoppe/tax_rates/form.html.haml +28 -0
- data/app/views/kkt_shoppe/tax_rates/index.html.haml +17 -0
- data/app/views/kkt_shoppe/user_mailer/new_password.text.erb +9 -0
- data/app/views/kkt_shoppe/users/_form.html.haml +27 -0
- data/app/views/kkt_shoppe/users/edit.html.haml +5 -0
- data/app/views/kkt_shoppe/users/index.html.haml +17 -0
- data/app/views/kkt_shoppe/users/new.html.haml +7 -0
- data/app/views/kkt_shoppe/variants/form.html.haml +68 -0
- data/app/views/kkt_shoppe/variants/index.html.haml +33 -0
- data/app/views/layouts/kkt_shoppe/application.html.haml +34 -0
- data/app/views/layouts/kkt_shoppe/printable.html.haml +11 -0
- data/app/views/layouts/kkt_shoppe/sub.html.haml +10 -0
- data/config/locales/de.yml +653 -0
- data/config/locales/en.yml +744 -0
- data/config/locales/es.yml +653 -0
- data/config/locales/pl.yml +662 -0
- data/config/locales/pt-BR.yml +655 -0
- data/config/routes.rb +53 -0
- data/db/countries.txt +252 -0
- data/db/migrate/20130926094549_create_kkt_shoppe_initial_schema.rb +175 -0
- data/db/migrate/20131024201501_add_address_type_to_kkt_shoppe_tax_rates.rb +5 -0
- data/db/migrate/20131024204815_create_kkt_shoppe_payments.rb +32 -0
- data/db/migrate/20131102143930_remove_default_on_order_item_weight.rb +9 -0
- data/db/migrate/20141013192427_create_kkt_shoppe_customers.rb +14 -0
- data/db/migrate/20141026175622_add_indexes_to_kkt_shoppe_order_items.rb +6 -0
- data/db/migrate/20141026175943_add_indexes_to_kkt_shoppe_orders.rb +7 -0
- data/db/migrate/20141026180333_add_indexes_to_kkt_shoppe_payments.rb +6 -0
- data/db/migrate/20141026180835_add_indexes_to_kkt_shoppe_product_attributes.rb +7 -0
- data/db/migrate/20141026180952_add_indexes_to_kkt_shoppe_product_categories.rb +5 -0
- data/db/migrate/20141026181040_add_indexes_to_kkt_shoppe_products.rb +8 -0
- data/db/migrate/20141026181312_add_indexes_to_kkt_shoppe_settings.rb +5 -0
- data/db/migrate/20141026181354_add_indexes_to_kkt_shoppe_stock_level_adjustments.rb +6 -0
- data/db/migrate/20141026181559_add_indexes_to_kkt_shoppe_users.rb +5 -0
- data/db/migrate/20141026181716_add_indexes_to_kkt_shoppe_delivery_services.rb +9 -0
- data/db/migrate/20141026181717_allow_multiple_kkt_shoppe_products_per_shoppe_product_category.rb +46 -0
- data/db/migrate/20141026181718_add_nested_to_product_categories.rb +30 -0
- data/db/migrate/20141027215005_create_kkt_shoppe_addresses.rb +17 -0
- data/db/migrate/20150315215633_add_customer_to_kkt_shoppe_orders.rb +5 -0
- data/db/migrate/20150513171350_create_kkt_shoppe_product_category_translation_table.rb +17 -0
- data/db/migrate/20150519173350_create_kkt_shoppe_product_translation_table.rb +18 -0
- data/db/schema.rb +308 -0
- data/db/seeds.rb +137 -0
- data/db/seeds_data/poe400.jpg +0 -0
- data/db/seeds_data/snom-870-blk.jpg +0 -0
- data/db/seeds_data/snom-870-grey.jpg +0 -0
- data/db/seeds_data/snom-mm2.jpg +0 -0
- data/db/seeds_data/spa303.jpg +0 -0
- data/db/seeds_data/t18p.jpg +0 -0
- data/db/seeds_data/t20p.jpg +0 -0
- data/db/seeds_data/t22p.jpg +0 -0
- data/db/seeds_data/t26p.jpg +0 -0
- data/db/seeds_data/t41pn.jpg +0 -0
- data/db/seeds_data/t46gn.jpg +0 -0
- data/db/seeds_data/w52p.jpg +0 -0
- data/db/seeds_data/yhs32.jpg +0 -0
- data/lib/kkt_shoppe/associated_countries.rb +20 -0
- data/lib/kkt_shoppe/country_importer.rb +15 -0
- data/lib/kkt_shoppe/default_navigation.rb +21 -0
- data/lib/kkt_shoppe/engine.rb +55 -0
- data/lib/kkt_shoppe/error.rb +21 -0
- data/lib/kkt_shoppe/errors/inappropriate_delivery_service.rb +6 -0
- data/lib/kkt_shoppe/errors/insufficient_stock_to_fulfil.rb +15 -0
- data/lib/kkt_shoppe/errors/invalid_configuration.rb +6 -0
- data/lib/kkt_shoppe/errors/not_enough_stock.rb +15 -0
- data/lib/kkt_shoppe/errors/payment_declined.rb +6 -0
- data/lib/kkt_shoppe/errors/refund_failed.rb +6 -0
- data/lib/kkt_shoppe/errors/unorderable_item.rb +6 -0
- data/lib/kkt_shoppe/navigation_manager.rb +81 -0
- data/lib/kkt_shoppe/orderable_item.rb +39 -0
- data/lib/kkt_shoppe/settings.rb +26 -0
- data/lib/kkt_shoppe/settings_loader.rb +16 -0
- data/lib/kkt_shoppe/setup_generator.rb +10 -0
- data/lib/kkt_shoppe/version.rb +3 -0
- data/lib/kkt_shoppe/view_helpers.rb +16 -0
- data/lib/kkt_shoppe.rb +60 -0
- data/lib/tasks/kylekthompson_shoppe.rake +29 -0
- metadata +662 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
= form_for @user do |f|
|
2
|
+
= f.error_messages
|
3
|
+
= field_set_tag t('kkt_shoppe.users.user_details') do
|
4
|
+
.splitContainer
|
5
|
+
%dl.half
|
6
|
+
%dt= f.label :first_name, t('kkt_shoppe.users.first_name')
|
7
|
+
%dd= f.text_field :first_name, :class => 'focus text'
|
8
|
+
%dl.half
|
9
|
+
%dt= f.label :last_name, t('kkt_shoppe.users.last_name')
|
10
|
+
%dd= f.text_field :last_name, :class => 'text'
|
11
|
+
= field_set_tag t("kkt_shoppe.users.login") do
|
12
|
+
.splitContainer
|
13
|
+
%dl.third
|
14
|
+
%dt= f.label :email_address, t('kkt_shoppe.users.email')
|
15
|
+
%dd= f.text_field :email_address, :class => 'text'
|
16
|
+
%dl.third
|
17
|
+
%dt= f.label :password, t('kkt_shoppe.users.password')
|
18
|
+
%dd= f.password_field :password, :class => 'text'
|
19
|
+
%dl.third
|
20
|
+
%dt= f.label :password_confirmation, t('kkt_shoppe.users.password_confirmation')
|
21
|
+
%dd= f.password_field :password_confirmation, :class => 'text'
|
22
|
+
|
23
|
+
%p.submit
|
24
|
+
- unless @user.new_record?
|
25
|
+
%span.right= link_to t('kkt_shoppe.delete'), @user, :class => 'button purple', :method => :delete, :data => {:confirm => t('kkt_shoppe.users.delete_confirmation')}
|
26
|
+
= f.submit t('kkt_shoppe.submit'), :class => 'button green'
|
27
|
+
= link_to t('kkt_shoppe.cancel'), :users, :class => 'button'
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- @page_title = t('kkt_shoppe.users.users')
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons= link_to t('kkt_shoppe.users.new_user'), :new_user, :class => 'button green'
|
5
|
+
%h2.users= t('kkt_shoppe.users.users')
|
6
|
+
|
7
|
+
.table
|
8
|
+
%table.data
|
9
|
+
%thead
|
10
|
+
%tr
|
11
|
+
%th= t('kkt_shoppe.users.name')
|
12
|
+
%th= t('kkt_shoppe.users.email')
|
13
|
+
%tbody
|
14
|
+
- for user in @users
|
15
|
+
%tr
|
16
|
+
%td= link_to user.full_name, [:edit, user]
|
17
|
+
%td= user.email_address
|
@@ -0,0 +1,68 @@
|
|
1
|
+
- @page_title = "#{t('kkt_shoppe.variants.variants')} - #{@product.name}"
|
2
|
+
= content_for :header do
|
3
|
+
%p.buttons
|
4
|
+
= link_to t('kkt_shoppe.localisations.localisations') , [@variant, :localisations], :class => 'button'
|
5
|
+
= link_to t('kkt_shoppe.variants.back_to_variants'), [@product, :variants], :class => 'button'
|
6
|
+
%h2.products= t('kkt_shoppe.variants.variants_of', product:@product.name)
|
7
|
+
|
8
|
+
= form_for [@product, @variant], :url => @variant.new_record? ? product_variants_path(@product) : product_variant_path(@product, @variant), :html => {:multipart => true} do |f|
|
9
|
+
= f.error_messages
|
10
|
+
= field_set_tag t('kkt_shoppe.variants.product_information') do
|
11
|
+
.splitContainer
|
12
|
+
%dl.third
|
13
|
+
%dt= f.label :name, t('kkt_shoppe.variants.name')
|
14
|
+
%dd= f.text_field :name, :class => 'text focus'
|
15
|
+
%dl.third
|
16
|
+
%dt= f.label :permalink, t('kkt_shoppe.variants.permalink')
|
17
|
+
%dd= f.text_field :permalink, :class => 'text'
|
18
|
+
%dl.third
|
19
|
+
%dt= f.label :sku, t('kkt_shoppe.variants.sku')
|
20
|
+
%dd= f.text_field :sku, :class => 'text'
|
21
|
+
|
22
|
+
= field_set_tag t('kkt_shoppe.variants.image') do
|
23
|
+
%dl
|
24
|
+
%dd
|
25
|
+
= attachment_preview @variant.default_image, :hide_if_blank => true
|
26
|
+
%p= f.file_field :default_image_file
|
27
|
+
= field_set_tag t("kkt_shoppe.variants.pricing") do
|
28
|
+
.splitContainer
|
29
|
+
%dl.third
|
30
|
+
%dt= f.label :price, t('kkt_shoppe.variants.price')
|
31
|
+
%dd= f.text_field :price, :class => 'text'
|
32
|
+
%dl.third
|
33
|
+
%dt= f.label :cost_price, t('kkt_shoppe.variants.cost_price')
|
34
|
+
%dd= f.text_field :cost_price, :class => 'text'
|
35
|
+
%dl.third
|
36
|
+
%dt= f.label :tax_rate_id, t('kkt_shoppe.variants.tax_rate')
|
37
|
+
%dd= f.collection_select :tax_rate_id, KktShoppe::TaxRate.ordered, :id, :description, {:include_blank => true}, {:class => 'chosen-with-deselect', :data => {:placeholder => t('kkt_shoppe.variants.no_tax')}}
|
38
|
+
|
39
|
+
= field_set_tag t('kkt_shoppe.variants.stock_control') do
|
40
|
+
.splitContainer
|
41
|
+
%dl.half
|
42
|
+
%dt= f.label :weight, t('kkt_shoppe.variants.weight')
|
43
|
+
%dd= f.text_field :weight, :class => 'text'
|
44
|
+
|
45
|
+
%dl.half
|
46
|
+
%dt= f.label :stock_control, t('kkt_shoppe.variants.stock_control')
|
47
|
+
%dd.checkbox
|
48
|
+
= f.check_box :stock_control
|
49
|
+
= f.label :stock_control, t('kkt_shoppe.variants.enable_stock_control?')
|
50
|
+
|
51
|
+
= field_set_tag t('kkt_shoppe.variants.website_properties') do
|
52
|
+
.splitContainer
|
53
|
+
%dl.half
|
54
|
+
%dt= f.label :active, t('kkt_shoppe.variants.on_sale?')
|
55
|
+
%dd.checkbox
|
56
|
+
= f.check_box :active
|
57
|
+
= f.label :active, t('kkt_shoppe.variants.on_sale_info')
|
58
|
+
%dl.half
|
59
|
+
%dt= f.label :default, t('kkt_shoppe.variants.default_variant?')
|
60
|
+
%dd.checkbox
|
61
|
+
= f.check_box :default
|
62
|
+
= f.label :default, t('kkt_shoppe.variants.default_variant_info')
|
63
|
+
|
64
|
+
%p.submit
|
65
|
+
- unless @variant.new_record?
|
66
|
+
%span.right= link_to t('kkt_shoppe.delete'), product_variant_path(@product, @variant), :class => 'button purple', :method => :delete, :data => {:confirm => t('kkt_shoppe.variants.delete_confirmation')}
|
67
|
+
= f.submit t('kkt_shoppe.variants.save_variant'), :class => 'button green'
|
68
|
+
= link_to t('kkt_shoppe.cancel'), :products, :class => 'button'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
- @page_title = "#{t('kkt_shoppe.variants.variants')} - #{@product.name}"
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('kkt_shoppe.variants.edit_product'), [:edit, @product], :class => 'button'
|
6
|
+
= link_to t('kkt_shoppe.variants.new_variant'), [:new, @product, :variant], :class => 'button green'
|
7
|
+
|
8
|
+
%h2.products= t('kkt_shoppe.variants.variants_of', product: @product.name)
|
9
|
+
|
10
|
+
.table
|
11
|
+
%table.data
|
12
|
+
%thead
|
13
|
+
%tr
|
14
|
+
%th{:width => '20%'}= t('kkt_shoppe.variants.sku')
|
15
|
+
%th{:width => '50%'}= t('kkt_shoppe.variants.name')
|
16
|
+
%th{:width => '15%'}= t('kkt_shoppe.variants.price')
|
17
|
+
%th{:width => '15%'}= t('kkt_shoppe.variants.stock')
|
18
|
+
%tbody
|
19
|
+
- if @variants.empty?
|
20
|
+
%tr.empty
|
21
|
+
%td{:colspan => 4}= t('kkt_shoppe.variants.no_products')
|
22
|
+
- else
|
23
|
+
- for variant in @variants
|
24
|
+
%tr
|
25
|
+
%td= variant.sku
|
26
|
+
%td= link_to variant.name, edit_product_variant_path(@product, variant)
|
27
|
+
%td= number_to_currency variant.price
|
28
|
+
%td
|
29
|
+
- if variant.stock_control?
|
30
|
+
%span.float-right= link_to t('kkt_shoppe.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('kkt_shoppe.variants.no_stock'))
|
32
|
+
- else
|
33
|
+
∞
|
@@ -0,0 +1,34 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title #{@page_title} - KktShoppe
|
5
|
+
= stylesheet_link_tag 'kkt_shoppe/application'
|
6
|
+
= javascript_include_tag 'kkt_shoppe/application'
|
7
|
+
= csrf_meta_tags
|
8
|
+
:javascript
|
9
|
+
window.KktShoppe = {}
|
10
|
+
window.KktShoppe.currencyUnit = "#{h KktShoppe.settings.currency_unit}";
|
11
|
+
%body
|
12
|
+
%nav.sidebar
|
13
|
+
%header.logo
|
14
|
+
%h1= link_to "KktShoppe", root_path
|
15
|
+
%p v#{KktShoppe::VERSION}
|
16
|
+
%p.logged= t('.logged_in_as', user_name: current_user.full_name)
|
17
|
+
|
18
|
+
%ul
|
19
|
+
- for item in KktShoppe::NavigationManager.find(:admin_primary).items
|
20
|
+
%li= navigation_manager_link item
|
21
|
+
|
22
|
+
%li= link_to t('.logout'), [:logout], :method => :delete
|
23
|
+
|
24
|
+
%header.main
|
25
|
+
= yield :header
|
26
|
+
|
27
|
+
#content
|
28
|
+
= display_flash
|
29
|
+
%section.main
|
30
|
+
= yield
|
31
|
+
|
32
|
+
%footer
|
33
|
+
%p.store= link_to "← #{t('.goto')} #{KktShoppe.settings.store_name}".html_safe, '/'
|
34
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
!!!
|
2
|
+
%html.login
|
3
|
+
%head
|
4
|
+
%title #{@page_title} - KktShoppe
|
5
|
+
%meta{:name => 'viewport', :content => 'width=device-width, initial-scale=1.0'}
|
6
|
+
= stylesheet_link_tag 'kkt_shoppe/sub'
|
7
|
+
= javascript_include_tag 'kkt_shoppe/application'
|
8
|
+
%body
|
9
|
+
#content
|
10
|
+
= yield
|