tienda 1.0.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/Rakefile +35 -0
- data/app/assets/images/tienda/chosen-sprite.png +0 -0
- data/app/assets/images/tienda/chosen-sprite@2x.png +0 -0
- data/app/assets/images/tienda/document.svg +1 -0
- data/app/assets/images/tienda/icons/bag.svg +1 -0
- data/app/assets/images/tienda/icons/balance.svg +1 -0
- data/app/assets/images/tienda/icons/box.svg +1 -0
- data/app/assets/images/tienda/icons/building.svg +1 -0
- data/app/assets/images/tienda/icons/chart.svg +1 -0
- data/app/assets/images/tienda/icons/chat.svg +1 -0
- data/app/assets/images/tienda/icons/checkbox.svg +1 -0
- data/app/assets/images/tienda/icons/checkbox2.svg +1 -0
- data/app/assets/images/tienda/icons/cloud.svg +1 -0
- data/app/assets/images/tienda/icons/cone.svg +1 -0
- data/app/assets/images/tienda/icons/credit_card.svg +1 -0
- data/app/assets/images/tienda/icons/currency.svg +1 -0
- data/app/assets/images/tienda/icons/edit.svg +14 -0
- data/app/assets/images/tienda/icons/flowchart.svg +1 -0
- data/app/assets/images/tienda/icons/gift.svg +1 -0
- data/app/assets/images/tienda/icons/globe.svg +1 -0
- data/app/assets/images/tienda/icons/id.svg +1 -0
- data/app/assets/images/tienda/icons/id2.svg +1 -0
- data/app/assets/images/tienda/icons/locked.svg +1 -0
- data/app/assets/images/tienda/icons/report.svg +1 -0
- data/app/assets/images/tienda/icons/search.svg +1 -0
- data/app/assets/images/tienda/icons/support.svg +1 -0
- data/app/assets/images/tienda/icons/tags.svg +1 -0
- data/app/assets/images/tienda/icons/toolbox.svg +1 -0
- data/app/assets/images/tienda/icons/unlocked.svg +1 -0
- data/app/assets/images/tienda/icons/wallet.svg +1 -0
- data/app/assets/images/tienda/logo.svg +47 -0
- data/app/assets/images/tienda/move.svg +1 -0
- data/app/assets/images/tienda/shoppe.svg +25 -0
- data/app/assets/images/tienda/square.svg +9 -0
- data/app/assets/images/tienda/statuses/accepted.svg +14 -0
- data/app/assets/images/tienda/statuses/paid.svg +16 -0
- data/app/assets/images/tienda/statuses/received.svg +15 -0
- data/app/assets/images/tienda/statuses/rejected.svg +14 -0
- data/app/assets/images/tienda/statuses/shipped.svg +14 -0
- data/app/assets/images/tienda/table-tear-off.png +0 -0
- data/app/assets/javascripts/tienda/application.coffee +119 -0
- data/app/assets/javascripts/tienda/chosen.jquery.js +1166 -0
- data/app/assets/javascripts/tienda/jquery_ui.js +6 -0
- data/app/assets/javascripts/tienda/mousetrap.js +9 -0
- data/app/assets/javascripts/tienda/order_form.coffee +47 -0
- data/app/assets/stylesheets/tienda/application.scss +585 -0
- data/app/assets/stylesheets/tienda/chosen.scss +424 -0
- data/app/assets/stylesheets/tienda/dialog.scss +25 -0
- data/app/assets/stylesheets/tienda/elements.scss +79 -0
- data/app/assets/stylesheets/tienda/printable.scss +67 -0
- data/app/assets/stylesheets/tienda/reset.scss +93 -0
- data/app/assets/stylesheets/tienda/sub.scss +106 -0
- data/app/assets/stylesheets/tienda/variables.scss +1 -0
- data/app/controllers/tienda/application_controller.rb +46 -0
- data/app/controllers/tienda/attachments_controller.rb +14 -0
- data/app/controllers/tienda/countries_controller.rb +47 -0
- data/app/controllers/tienda/dashboard_controller.rb +9 -0
- data/app/controllers/tienda/delivery_service_prices_controller.rb +45 -0
- data/app/controllers/tienda/delivery_services_controller.rb +47 -0
- data/app/controllers/tienda/orders_controller.rb +90 -0
- data/app/controllers/tienda/payments_controller.rb +33 -0
- data/app/controllers/tienda/product_categories_controller.rb +47 -0
- data/app/controllers/tienda/products_controller.rb +58 -0
- data/app/controllers/tienda/sessions_controller.rb +34 -0
- data/app/controllers/tienda/settings_controller.rb +16 -0
- data/app/controllers/tienda/stock_level_adjustments_controller.rb +40 -0
- data/app/controllers/tienda/tax_rates_controller.rb +49 -0
- data/app/controllers/tienda/users_controller.rb +53 -0
- data/app/controllers/tienda/variants_controller.rb +50 -0
- data/app/helpers/tienda/application_helper.rb +60 -0
- data/app/mailers/tienda/order_mailer.rb +25 -0
- data/app/mailers/tienda/user_mailer.rb +10 -0
- data/app/models/tienda/country.rb +27 -0
- data/app/models/tienda/delivery_service.rb +33 -0
- data/app/models/tienda/delivery_service_price.rb +31 -0
- data/app/models/tienda/order/actions.rb +98 -0
- data/app/models/tienda/order/billing.rb +105 -0
- data/app/models/tienda/order/delivery.rb +229 -0
- data/app/models/tienda/order/states.rb +69 -0
- data/app/models/tienda/order.rb +93 -0
- data/app/models/tienda/order_item.rb +239 -0
- data/app/models/tienda/payment.rb +80 -0
- data/app/models/tienda/product/product_attributes.rb +20 -0
- data/app/models/tienda/product/variants.rb +51 -0
- data/app/models/tienda/product.rb +169 -0
- data/app/models/tienda/product_attribute.rb +66 -0
- data/app/models/tienda/product_category.rb +23 -0
- data/app/models/tienda/setting.rb +68 -0
- data/app/models/tienda/stock_level_adjustment.rb +19 -0
- data/app/models/tienda/tax_rate.rb +46 -0
- data/app/models/tienda/user.rb +49 -0
- data/app/validators/permalink_validator.rb +7 -0
- data/app/views/layouts/tienda/application.html.haml +34 -0
- data/app/views/layouts/tienda/printable.html.haml +11 -0
- data/app/views/layouts/tienda/sub.html.haml +10 -0
- data/app/views/tienda/countries/_form.html.haml +35 -0
- data/app/views/tienda/countries/edit.html.haml +6 -0
- data/app/views/tienda/countries/index.html.haml +25 -0
- data/app/views/tienda/countries/new.html.haml +7 -0
- data/app/views/tienda/delivery_service_prices/_form.html.haml +44 -0
- data/app/views/tienda/delivery_service_prices/edit.html.haml +6 -0
- data/app/views/tienda/delivery_service_prices/index.html.haml +23 -0
- data/app/views/tienda/delivery_service_prices/new.html.haml +6 -0
- data/app/views/tienda/delivery_services/_form.html.haml +38 -0
- data/app/views/tienda/delivery_services/edit.html.haml +9 -0
- data/app/views/tienda/delivery_services/index.html.haml +27 -0
- data/app/views/tienda/delivery_services/new.html.haml +6 -0
- data/app/views/tienda/order_mailer/accepted.text.erb +12 -0
- data/app/views/tienda/order_mailer/received.text.erb +12 -0
- data/app/views/tienda/order_mailer/rejected.text.erb +10 -0
- data/app/views/tienda/order_mailer/shipped.text.erb +16 -0
- data/app/views/tienda/orders/_form.html.haml +55 -0
- data/app/views/tienda/orders/_order_details.html.haml +57 -0
- data/app/views/tienda/orders/_order_items.html.haml +38 -0
- data/app/views/tienda/orders/_order_items_form.html.haml +61 -0
- data/app/views/tienda/orders/_payments_form.html.haml +15 -0
- data/app/views/tienda/orders/_payments_table.html.haml +37 -0
- data/app/views/tienda/orders/_search_form.html.haml +24 -0
- data/app/views/tienda/orders/_status_bar.html.haml +35 -0
- data/app/views/tienda/orders/despatch_note.html.haml +45 -0
- data/app/views/tienda/orders/edit.html.haml +21 -0
- data/app/views/tienda/orders/index.html.haml +39 -0
- data/app/views/tienda/orders/new.html.haml +14 -0
- data/app/views/tienda/orders/show.html.haml +25 -0
- data/app/views/tienda/payments/refund.html.haml +13 -0
- data/app/views/tienda/product_categories/_form.html.haml +26 -0
- data/app/views/tienda/product_categories/edit.html.haml +6 -0
- data/app/views/tienda/product_categories/index.html.haml +19 -0
- data/app/views/tienda/product_categories/new.html.haml +6 -0
- data/app/views/tienda/products/_form.html.haml +118 -0
- data/app/views/tienda/products/_table.html.haml +42 -0
- data/app/views/tienda/products/edit.html.haml +8 -0
- data/app/views/tienda/products/import.html.haml +63 -0
- data/app/views/tienda/products/index.html.haml +9 -0
- data/app/views/tienda/products/new.html.haml +7 -0
- data/app/views/tienda/sessions/new.html.haml +12 -0
- data/app/views/tienda/sessions/reset.html.haml +12 -0
- data/app/views/tienda/settings/edit.html.haml +19 -0
- data/app/views/tienda/shared/error.html.haml +6 -0
- data/app/views/tienda/stock_level_adjustments/index.html.haml +40 -0
- data/app/views/tienda/tax_rates/form.html.haml +28 -0
- data/app/views/tienda/tax_rates/index.html.haml +17 -0
- data/app/views/tienda/user_mailer/new_password.text.erb +9 -0
- data/app/views/tienda/users/_form.html.haml +27 -0
- data/app/views/tienda/users/edit.html.haml +5 -0
- data/app/views/tienda/users/index.html.haml +17 -0
- data/app/views/tienda/users/new.html.haml +7 -0
- data/app/views/tienda/variants/form.html.haml +66 -0
- data/app/views/tienda/variants/index.html.haml +33 -0
- data/config/locales/en.yml +650 -0
- data/config/locales/pl.yml +650 -0
- data/config/locales/pt-BR.yml +643 -0
- data/config/routes.rb +42 -0
- data/db/countries.txt +252 -0
- data/db/migrate/20150124094549_create_tienda_initial_schema.rb +184 -0
- data/db/seeds.rb +128 -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/tasks/tienda.rake +29 -0
- data/lib/tienda/associated_countries.rb +20 -0
- data/lib/tienda/country_importer.rb +14 -0
- data/lib/tienda/default_navigation.rb +20 -0
- data/lib/tienda/engine.rb +48 -0
- data/lib/tienda/error.rb +21 -0
- data/lib/tienda/errors/inappropriate_delivery_service.rb +6 -0
- data/lib/tienda/errors/insufficient_stock_to_fulfil.rb +15 -0
- data/lib/tienda/errors/invalid_configuration.rb +6 -0
- data/lib/tienda/errors/not_enough_stock.rb +15 -0
- data/lib/tienda/errors/payment_declined.rb +6 -0
- data/lib/tienda/errors/refund_failed.rb +6 -0
- data/lib/tienda/errors/unorderable_item.rb +6 -0
- data/lib/tienda/navigation_manager.rb +81 -0
- data/lib/tienda/orderable_item.rb +39 -0
- data/lib/tienda/settings.rb +26 -0
- data/lib/tienda/settings_loader.rb +16 -0
- data/lib/tienda/setup_generator.rb +10 -0
- data/lib/tienda/version.rb +3 -0
- data/lib/tienda/view_helpers.rb +16 -0
- data/lib/tienda.rb +59 -0
- metadata +604 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
- @page_title = "#{t('tienda.variants.variants')} - #{@product.name}"
|
2
|
+
= content_for :header do
|
3
|
+
%p.buttons= link_to t('tienda.variants.back_to_variants'), [@product, :variants], :class => 'button'
|
4
|
+
%h2.products= t('tienda.variants.variants_of', product:@product.name)
|
5
|
+
|
6
|
+
= form_for [@product, @variant], :url => @variant.new_record? ? product_variants_path(@product) : product_variant_path(@product, @variant), :html => {:multipart => true} do |f|
|
7
|
+
= f.error_messages
|
8
|
+
= field_set_tag t('tienda.variants.product_information') do
|
9
|
+
.splitContainer
|
10
|
+
%dl.third
|
11
|
+
%dt= f.label :name, t('tienda.variants.name')
|
12
|
+
%dd= f.text_field :name, :class => 'text focus'
|
13
|
+
%dl.third
|
14
|
+
%dt= f.label :permalink, t('tienda.variants.permalink')
|
15
|
+
%dd= f.text_field :permalink, :class => 'text'
|
16
|
+
%dl.third
|
17
|
+
%dt= f.label :sku, t('tienda.variants.sku')
|
18
|
+
%dd= f.text_field :sku, :class => 'text'
|
19
|
+
|
20
|
+
= field_set_tag t('tienda.variants.image') do
|
21
|
+
%dl
|
22
|
+
%dd
|
23
|
+
= attachment_preview @variant.default_image, :hide_if_blank => true
|
24
|
+
%p= f.file_field :default_image_file
|
25
|
+
= field_set_tag t("tienda.variants.pricing") do
|
26
|
+
.splitContainer
|
27
|
+
%dl.third
|
28
|
+
%dt= f.label :price, t('tienda.variants.price')
|
29
|
+
%dd= f.text_field :price, :class => 'text'
|
30
|
+
%dl.third
|
31
|
+
%dt= f.label :cost_price, t('tienda.variants.cost_price')
|
32
|
+
%dd= f.text_field :cost_price, :class => 'text'
|
33
|
+
%dl.third
|
34
|
+
%dt= f.label :tax_rate_id, t('tienda.variants.tax_rate')
|
35
|
+
%dd= f.collection_select :tax_rate_id, Tienda::TaxRate.ordered, :id, :description, {:include_blank => true}, {:class => 'chosen-with-deselect', :data => {:placeholder => t('tienda.variants.no_tax')}}
|
36
|
+
|
37
|
+
= field_set_tag t('tienda.variants.stock_control') do
|
38
|
+
.splitContainer
|
39
|
+
%dl.half
|
40
|
+
%dt= f.label :weight, t('tienda.variants.weight')
|
41
|
+
%dd= f.text_field :weight, :class => 'text'
|
42
|
+
|
43
|
+
%dl.half
|
44
|
+
%dt= f.label :stock_control, t('tienda.variants.stock_control')
|
45
|
+
%dd.checkbox
|
46
|
+
= f.check_box :stock_control
|
47
|
+
= f.label :stock_control, t('tienda.variants.enable_stock_control?')
|
48
|
+
|
49
|
+
= field_set_tag t('tienda.variants.website_properties') do
|
50
|
+
.splitContainer
|
51
|
+
%dl.half
|
52
|
+
%dt= f.label :active, t('tienda.variants.on_sale?')
|
53
|
+
%dd.checkbox
|
54
|
+
= f.check_box :active
|
55
|
+
= f.label :active, t('tienda.variants.on_sale_info')
|
56
|
+
%dl.half
|
57
|
+
%dt= f.label :default, t('tienda.variants.default_variant?')
|
58
|
+
%dd.checkbox
|
59
|
+
= f.check_box :default
|
60
|
+
= f.label :default, t('tienda.variants.default_variant_info')
|
61
|
+
|
62
|
+
%p.submit
|
63
|
+
- unless @variant.new_record?
|
64
|
+
%span.right= link_to t('tienda.delete'), product_variant_path(@product, @variant), :class => 'button purple', :method => :delete, :data => {:confirm => t('tienda.variants.delete_confirmation')}
|
65
|
+
= f.submit t('tienda.variants.save_variant'), :class => 'button green'
|
66
|
+
= link_to t('tienda.cancel'), :products, :class => 'button'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
- @page_title = "#{t('tienda.variants.variants')} - #{@product.name}"
|
2
|
+
|
3
|
+
= content_for :header do
|
4
|
+
%p.buttons
|
5
|
+
= link_to t('tienda.variants.edit_product'), [:edit, @product], :class => 'button'
|
6
|
+
= link_to t('tienda.variants.new_variant'), [:new, @product, :variant], :class => 'button green'
|
7
|
+
|
8
|
+
%h2.products= t('tienda.variants.variants_of', product: @product.name)
|
9
|
+
|
10
|
+
.table
|
11
|
+
%table.data
|
12
|
+
%thead
|
13
|
+
%tr
|
14
|
+
%th{:width => '20%'}= t('tienda.variants.sku')
|
15
|
+
%th{:width => '50%'}= t('tienda.variants.name')
|
16
|
+
%th{:width => '15%'}= t('tienda.variants.price')
|
17
|
+
%th{:width => '15%'}= t('tienda.variants.stock')
|
18
|
+
%tbody
|
19
|
+
- if @variants.empty?
|
20
|
+
%tr.empty
|
21
|
+
%td{:colspan => 4}= t('tienda.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('tienda.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('tienda.variants.no_stock'))
|
32
|
+
- else
|
33
|
+
∞
|