tienda 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: edf111d05bb6bea52a0e5cbe91c43f8616d359d1
4
- data.tar.gz: 7c59e4ea1357e278c4b8641775ba5861f89d8230
3
+ metadata.gz: 81e23d4189c914fb5f641271d7814032e948f27c
4
+ data.tar.gz: f59902ce674679b8a4511aa4d1c744ef2a704821
5
5
  SHA512:
6
- metadata.gz: 71f53bf4675bb97b2ee8e413eca9ddbdd6c1bd7de7148f56b3942fd4f49b70298e7815c216213cacf8a3c9fae79a25d1dfa9a58a812b1b647bd40d9e5e8d39d2
7
- data.tar.gz: 146f2925b2d153afd168b8c95c1ce3ef6aac3c7e91440efb9a6bd94c203e7f2e42177d22ad34a8a21b2cbd1e76cc19b5feb38547c54e5f95cfe0b8a9dcdd279d
6
+ metadata.gz: e56224fe1eeeb5f9ce63e2d52114b33adf8958a5d8da130181e37cfad4e0181b3977f76a246eba9796f3e870307b35f4d0ffd0045718fa1b99dbc4c67de2d56e
7
+ data.tar.gz: e158c8e1b445891270a5599f2436431915a109b689de31f14be659144f07b84162605c3ca04cee1d42e4cde07822a81ba14d9bedd48d7b53e39a6e5822e975a6
@@ -35,11 +35,29 @@
35
35
  .panel-heading
36
36
  = t('tienda.variants.image')
37
37
  .panel-body
38
- .row
39
- .col-md-12
40
- .form-group
41
- = attachment_preview @variant.default_image, hide_if_blank: true
42
- = f.file_field :default_image_file, class: 'form-control'
38
+ %table.productImages.table.table-hover
39
+ %thead
40
+ %tr
41
+ %th= t('tienda.products.preview')
42
+ %th= t('tienda.products.file_name')
43
+ %th.remove= t('tienda.products.remove')
44
+ %th
45
+ %tbody
46
+ %tr.template{style: 'display:none;'}
47
+ %td= file_field_tag 'product[product_images_attributes][][image]', class: 'form-control'
48
+ %td= t('tienda.products.file_name')
49
+ %td.remove= link_to t('tienda.remove') , '#', class: 'btn btn-sm btn-danger'
50
+ %td
51
+ - @product.product_images.each_with_index do |image, i|
52
+ %tr
53
+ %td= image_tag image.image.url, class: :img_preview
54
+ %td= File.basename(image.image.path)
55
+ %td.remove
56
+ = link_to t("tienda.remove"), '#', class: 'btn btn-sm btn-danger'
57
+ = hidden_field_tag "product[product_images_attributes][#{i}][id]", image.id
58
+ = hidden_field_tag "product[product_images_attributes][#{i}][_destroy]", '', class: 'destroy'
59
+ %td
60
+ %p.addImage= link_to t('tienda.products.add_image') , '#', data: {behavior: 'addImageToImagesTable'}, class: 'btn btn-success btn-sm'
43
61
 
44
62
  .panel.panel-default
45
63
  .panel-heading
@@ -1,3 +1,3 @@
1
1
  module Tienda
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tienda
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Robaina
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-07 00:00:00.000000000 Z
11
+ date: 2015-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails