viniBaxter-field-active_storage 6.0.0 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cda3b9db71dd71fdc69303d4eef7825fa8d5962facca7b3d9cfbc9405d81fb85
4
- data.tar.gz: b51ebe68bd5eff1912804a2e4946bb1a495ae85c19076a355a6d3be5bcb6f44f
3
+ metadata.gz: 73dfc5dceefddd6a09069187c61ad591562dd5ff78ccd0d91c818fbb1e227896
4
+ data.tar.gz: fe2be8a93954216af8d6435bf7250090a86ce8750ddd3eae67ffa25af1fe4615
5
5
  SHA512:
6
- metadata.gz: 4a3003bc1ceceb2dc7c88ddde64dd982f5e4226ab21dfc77e74fb7c82b87761945ec2bf3ad814e336dbd0990d1199baf25605ab21b3b2abc53c5974b5e1b1df8
7
- data.tar.gz: 6fc9ddb534628d8217c581c969d3414aa9fe082ede4bcb763260606793a40a215fa6b127f6eb8c4e363f326e5f46fdb83f8995a2ee6e4cfbfe599ad6a0fb710b
6
+ metadata.gz: 72e96d3be372cf61c2a297005f201411bd36f958daad239bbe0de83afeee0442361188f3ccde712f83fbd9328e51410d0f8dded44a68f6e10a6898483a135266
7
+ data.tar.gz: 981a00e8e41c6fe00cc3500305de74e994e6194d177c2037c5ddacd40a098de94b233491cdcf1f945f4277f9e2238b11f7f7c3c277be1946f71dd6f9b0c18a09
@@ -26,33 +26,37 @@ controlled via a boolean local variable.
26
26
  image_size = local_assigns.fetch(:image_size, [1920, 1080])
27
27
  %>
28
28
  <% if attachment.image? and attachment.variable? and !field.url_only? %>
29
- <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
30
- <%= image_tag(field.variant(attachment, resize_to_limit: image_size)) %>
31
- <% end %>
32
- <% elsif attachment.image? and !field.url_only? %>
33
- <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
34
- <%= image_tag(field.url(attachment)) %>
35
- <% end %>
36
- <% elsif attachment.video? and attachment.previewable? and !field.url_only? %> <%# if ffmpeg is installed %>
37
- <%= video_tag(field.url(attachment), poster: field.preview(attachment, resize_to_limit: image_size), controls: true, autobuffer: true, style: "width: 100%; height: auto;") %>
38
- <% elsif attachment.video? and !field.url_only? %>
39
- <%= video_tag(field.url(attachment), controls: true, autobuffer: true, style: "width: 100%; height: auto;") %>
40
- <% elsif attachment.audio? and !field.url_only? %>
41
- <%= audio_tag(field.url(attachment), autoplay: false, controls: true) %>
42
- <% else %>
43
- <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
44
- <% if attachment.previewable? and !field.url_only? %>
45
- <%= image_tag(field.preview(attachment, resize_to_limit: [595, 842])) %>
46
- <% else %>
47
- <%= attachment.filename %>
29
+ <%#= link_to(field.blob_url(attachment), title: attachment.filename) do %>
30
+ <%#= image_tag(field.variant(attachment, resize_to_limit: image_size)) %>
31
+ <%= link_to(field.blob_url(attachment), title: attachment.filename, class:'avatar avatar-sm mr-2') do %>
32
+ <%= image_tag attachment, class:"avatar-img rounded-circle" %>
33
+ <% end %>
34
+ <% elsif attachment.image? and !field.url_only? %>
35
+ <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
36
+ <%= image_tag(field.url(attachment)) %>
37
+ <% end %>
38
+ <% elsif attachment.video? and attachment.previewable? and !field.url_only? %> <%# if ffmpeg is installed %>
39
+ <%= video_tag(field.url(attachment), poster: field.preview(attachment, resize_to_limit: image_size), controls: true, autobuffer: true, style: "width: 100%; height: auto;") %>
40
+ <% elsif attachment.video? and !field.url_only? %>
41
+ <%= video_tag(field.url(attachment), controls: true, autobuffer: true, style: "width: 100%; height: auto;") %>
42
+ <% elsif attachment.audio? and !field.url_only? %>
43
+ <%= audio_tag(field.url(attachment), autoplay: false, controls: true) %>
44
+ <% else %>
45
+ <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
46
+ <% if attachment.previewable? and !field.url_only? %>
47
+ <%= image_tag(field.preview(attachment, resize_to_limit: [595, 842])) %>
48
+ <% else %>
49
+ <%= attachment.filename %>
50
+ <% end %>
48
51
  <% end %>
49
52
  <% end %>
50
- <% end %>
51
- <% if removable %>
52
- <%#= link_to 'Remove', field.destroy_path(field, attachment), method: :delete, class: 'remove-attachment-link' %>
53
- <%= link_to 'Remove', destroy_url,
53
+ <% if removable %>
54
+ <%#= link_to 'Remove', field.destroy_path(field, attachment), method: :delete, class: 'remove-attachment-link' %>
55
+ <%= link_to 'Remove', destroy_url,
54
56
  method: :delete,
57
+ # data: { confirm: t("administrate.actions.confirm") },
55
58
  remote: true,
56
- class: 'remove-attachment-link' %>
57
- <hr>
58
- <% end %>
59
+ class: 'remove-attachment-link'
60
+ %>
61
+ <hr>
62
+ <% end %>
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "viniBaxter-field-active_storage"
5
- gem.version = "6.0.0"
5
+ gem.version = "7.0.0"
6
6
  gem.authors = ["viny baxter"]
7
7
  gem.email = ["vincent.viricel@gmail.com"]
8
8
  gem.homepage = "https://github.com/Dreamersoul/administrate-field-active_storage"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viniBaxter-field-active_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - viny baxter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-16 00:00:00.000000000 Z
11
+ date: 2020-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate