viniBaxter-field-active_storage 300.0.15 → 300.0.17

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: 3585d63c65bfcddee1e132ca93d69bfd74649247eac7faf062bba358dafb7998
4
- data.tar.gz: 305cacf03e9dc905a5bf52009e0147b8ab66f17f4ef97b4459bf3eba58a50d70
3
+ metadata.gz: ceed4a7c57ced04a6bdd2958888e1855b8670e118c70a646d5ba3b6c2b7dde30
4
+ data.tar.gz: fc40d2de2f933de4544943a0c4e2e52bbfd79f957c7503a7560568e7dc69107c
5
5
  SHA512:
6
- metadata.gz: 1e7c86346d5de9dabba52159b9b0e8c42a32f10e00fffe8b9481f10750d25ba2e387b5d7b30c14678a0bfe4dbc1f311933b8fe755b25282cb279d4e8b6311b03
7
- data.tar.gz: fb4ca2ce0123e35d3b28fa420e03c1da1790e4ff785e041847829ff3f17fa92177aea2933511c49d1025a7e3fe5fd6f23a13b244bb5f6a5a4bd7c36c9be2450b
6
+ metadata.gz: c58f44c07fd2a66960a4fa1d51d18148d89783fdd8686b9db0b4272460adfa1b5243991b5a03d0978463ddb5d4640d073ff183483a73d5fa96e07a0462cbc5c2
7
+ data.tar.gz: 9ecc1f7d0cc8c6512dd2fdbcfcf42fe0c37840ad6f13fdbcf15126ef50239da71c2a5db3ee58e034f753f77c5fa692d80614bd390af12ddf65dff645f3285dd8
@@ -23,60 +23,46 @@
23
23
  </div>
24
24
  <div class="">
25
25
  <small class="text-muted">
26
- <div class="mb-1 dz-size" data-dz-size="">
27
- <strong>
28
- SEO: <%= alt_method(attachment) %>
29
- </strong>
26
+ <div class="">
27
+ SEO: <%= alt_method(attachment) %>
30
28
  </div>
31
29
  </small>
32
30
  <div class="dz-error-message"><span data-dz-errormessage=""></span></div>
33
31
  <!-- Text -->
34
32
  <small class="text-muted">
35
- <div class="mb-1 dz-size" data-dz-size="">
36
- <strong>
37
- full name : <%= attachment.filename %>
38
- </strong></div>
33
+ <div class="">
34
+ full name : <%= attachment.filename %>
35
+ </div>
39
36
  </small>
40
37
  <small class="text-muted">
41
- <div class="mb-1 dz-size" data-dz-size="">
42
- <strong>
43
- Width: <%= attachment.blob.metadata[:width]%>px
44
- </strong>
38
+ <div class="">
39
+ Width: <%= attachment.blob.metadata[:width]%>px
45
40
  </div>
46
41
  </small>
47
42
  <small class="text-muted">
48
- <div class="mb-1 dz-size" data-dz-size="">
49
- <strong>
50
- Height: <%= attachment.blob.metadata[:height]%>px
51
- </strong>
43
+ <div class="">
44
+ Height: <%= attachment.blob.metadata[:height]%>px
52
45
  </div>
53
46
  </small>
54
47
  <small class="text-muted">
55
- <div class="mb-1 dz-size" data-dz-size="">
56
- <strong>
57
- Aspect ratio - Width/Height : <%= ((attachment.blob.metadata[:width]).to_f / (attachment.blob.metadata[:height]).to_f).round(2).to_s.to_r%>
58
- </strong>
48
+ <div class="">
49
+ Aspect ratio - Width/Height : <%= ((attachment.blob.metadata[:width]).to_f / (attachment.blob.metadata[:height]).to_f).round(2).to_s.to_r%>
59
50
  </div>
60
51
  </small>
61
52
  <small class="text-muted">
62
- <div class="mb-1 dz-size" data-dz-size="">
63
- <strong>
64
- Aspect ratio - Height/Width : <%= (( (attachment.blob.metadata[:height]).to_f / attachment.blob.metadata[:width]).to_f).round(2).to_s.to_r%>
65
- </strong>
53
+ <div class="">
54
+ Aspect ratio - Height/Width : <%= (( (attachment.blob.metadata[:height]).to_f / attachment.blob.metadata[:width]).to_f).round(2).to_s.to_r%>
66
55
  </div>
67
56
  </small>
68
57
  <small class="text-muted">
69
- <div class="mb-1 dz-size" data-dz-size="">
70
- <strong>
71
- Vertical Padding : <%= (attachment.blob.metadata[:height].to_f / attachment.blob.metadata[:width].to_f ).to_f.round(8)*100 %> (in percent %)
72
- </strong>
58
+ <div class="">
59
+ Vertical Padding : <%= (attachment.blob.metadata[:height].to_f / attachment.blob.metadata[:width].to_f ).to_f.round(8)*100 %> (in percent %)
73
60
  </div>
74
61
  </small>
75
62
  <small class="text-muted">
76
- <div class="mb-1 dz-size" data-dz-size="">
77
- <strong>
78
- Size : <%= attachment.byte_size.fdiv(1000000).round(4) %>
79
- </strong> MB</div>
63
+ <div class="" data-dz-size="">
64
+ Size : <%= attachment.byte_size.fdiv(1000000).round(4) %>
65
+ MB</div>
80
66
  </small>
81
67
  </div>
82
68
  </div>
@@ -18,12 +18,45 @@
18
18
  <div class="row align-items-center">
19
19
  <% attachments.each do |attachment| %>
20
20
  <div class="" id="<%= @page.class %>_picture_<%= attachment.id %>">
21
- <%= render partial: 'fields/active_storage/drop_js/dropjs_list_edit', locals: {
22
- field: field,
23
- attachment: attachment,
24
- removable: removable,
25
- image_size: field.show_preview_size
26
- }%>
21
+ <div class='mt-4 list-group list-group-flush'>
22
+ <div class="dz-preview dz-file-preview bibi">
23
+ <div class="row align-items-center">
24
+ <div class="col-auto">
25
+ <div class="mx-1 my-1 avatar thumbnail-picture">
26
+ <%
27
+ # By default we don't allow attachment removal
28
+ removable = local_assigns.fetch(:removable, false)
29
+ image_size = local_assigns.fetch(:image_size, [200, 200])
30
+ %>
31
+ <% if attachment.image? and attachment.variable? and !field.url_only? %>
32
+ <%= link_to(field.blob_url(attachment), title: attachment.filename, class:'rounded avatar-img') do %>
33
+ <%#= image_tag(field.variant(attachment, resize_to_limit: image_size),class:'avatar-img rounded delete_on_click') %>
34
+ <%= image_tag attachment.variant(resize_to_limit: image_size), class:"rounded thumbnail-picture-img delete_on_click" %>
35
+ <% end %>
36
+ <% elsif attachment.image? and !field.url_only? %>
37
+ <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
38
+ <%= image_tag(field.url(attachment)) %>
39
+ <% end %>
40
+ <% elsif attachment.video? and attachment.previewable? and !field.url_only? %> <%# if ffmpeg is installed %>
41
+ <%= video_tag(field.url(attachment), poster: field.preview(attachment, resize_to_limit: image_size), controls: true, autobuffer: true, style: "width: 100%; height: auto;") %>
42
+ <% elsif attachment.video? and !field.url_only? %>
43
+ <%= video_tag(field.url(attachment), controls: true, autobuffer: true, style: "width: 100%; height: auto;") %>
44
+ <% elsif attachment.audio? and !field.url_only? %>
45
+ <%= audio_tag(field.url(attachment), autoplay: false, controls: true) %>
46
+ <% else %>
47
+ <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
48
+ <% if attachment.previewable? and !field.url_only? %>
49
+ <%= image_tag(field.preview(attachment, resize_to_limit: [595, 842])) %>
50
+ <% else %>
51
+ <%= attachment.filename %>
52
+ <% end %>
53
+ <% end %>
54
+ <% end %>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
27
60
  </div>
28
61
  <% end %>
29
62
  </div>
@@ -38,7 +38,7 @@
38
38
  <%= link_to destroy_url,
39
39
  method: :delete,
40
40
  remote: true do %>
41
- <i class="tim-icons icon-simple-remove text-light"></i>
41
+ <i class="tim-icons active-storage icon-simple-remove text-light"></i>
42
42
  <% end %>
43
43
  </div>
44
44
  <% end %>
@@ -7,7 +7,7 @@
7
7
  <%#<img class="rounded avatar-img" data-dz-thumbnail>%>
8
8
  <div class="position-absolute delete-link d-flex align-items-center justify-content-center">
9
9
  <a rel="nofollow" data-dz-remove>
10
- <i class="tim-icons icon-simple-remove text-light"></i>
10
+ <i class="tim-icons active-storage icon-simple-remove text-light"></i>
11
11
  </a>
12
12
  </div>
13
13
  </div>
@@ -5,7 +5,7 @@ module ViniBaxter
5
5
  module ViniBaxterFieldActiveStorage
6
6
  MAJOR = 300
7
7
  MINOR = 0
8
- TINY = 15
8
+ TINY = 17
9
9
  PRE = "STUDIO"
10
10
 
11
11
  VERSION = [MAJOR, MINOR, TINY].compact.join(".")
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: 300.0.15
4
+ version: 300.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - viny baxter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-10 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate