viniBaxter-field-active_storage 300.0.9 → 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: 132edab7067e1b1c4a3e6258f738ace14a8b96b1f5d6c4c62c7b25e6aeb3389e
4
- data.tar.gz: a0426fc8428661d73d6107e4f877f9402c6ada9c77715d8a4f48c5e60b045fd5
3
+ metadata.gz: ceed4a7c57ced04a6bdd2958888e1855b8670e118c70a646d5ba3b6c2b7dde30
4
+ data.tar.gz: fc40d2de2f933de4544943a0c4e2e52bbfd79f957c7503a7560568e7dc69107c
5
5
  SHA512:
6
- metadata.gz: 077de1eed93bb4ccf974a296b00d52edcaca753ca97e0d2d1599a173d85083ff09cea1f94bdc763d9599d6091eed465af19fab03da848ac1606a652ae5115b99
7
- data.tar.gz: b62fb62d6438b81ad213193b5dba680d12ac33dd326125cfa01129f57efbbb9b4e96c057da0e64f9cf475802979684b91549f6b96048062298bf8b67d67db873
6
+ metadata.gz: c58f44c07fd2a66960a4fa1d51d18148d89783fdd8686b9db0b4272460adfa1b5243991b5a03d0978463ddb5d4640d073ff183483a73d5fa96e07a0462cbc5c2
7
+ data.tar.gz: 9ecc1f7d0cc8c6512dd2fdbcfcf42fe0c37840ad6f13fdbcf15126ef50239da71c2a5db3ee58e034f753f77c5fa692d80614bd390af12ddf65dff645f3285dd8
@@ -1,9 +1,6 @@
1
1
  <% if field.attached? %>
2
2
  <style type="text/css" nonce="<%= content_security_policy_nonce %>">
3
3
  <%# figure out a way to remove this %>
4
- td img {
5
- max-height: unset !important;
6
- }
7
4
  </style>
8
5
  <% if field.index_display_preview? %>
9
6
  <% if field.many? %>
@@ -12,8 +12,8 @@
12
12
  <div class="list-group-item">
13
13
  <div class="row align-items-center">
14
14
  <% attachments.each do |attachment| %>
15
- <div>
16
- <div class="" id="<%= @page.class %>_picture_<%= attachment.id %>">
15
+ <div class="mr-3">
16
+ <div class="mb-2" id="<%= @page.class %>_picture_<%= attachment.id %>">
17
17
  <%= render partial: 'fields/active_storage/drop_js/dropjs_list_edit', locals: {
18
18
  field: field,
19
19
  attachment: attachment,
@@ -21,27 +21,48 @@
21
21
  image_size: field.show_preview_size
22
22
  }%>
23
23
  </div>
24
- <div class="col ml-n2">
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>
36
+ </small>
37
+ <small class="text-muted">
38
+ <div class="">
39
+ Width: <%= attachment.blob.metadata[:width]%>px
40
+ </div>
41
+ </small>
42
+ <small class="text-muted">
43
+ <div class="">
44
+ Height: <%= attachment.blob.metadata[:height]%>px
45
+ </div>
46
+ </small>
47
+ <small class="text-muted">
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%>
50
+ </div>
51
+ </small>
52
+ <small class="text-muted">
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%>
55
+ </div>
56
+ </small>
57
+ <small class="text-muted">
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 %)
60
+ </div>
39
61
  </small>
40
62
  <small class="text-muted">
41
- <div class="mb-1 dz-size" data-dz-size="">
42
- <strong>
43
- <%= attachment.byte_size.fdiv(1000).round(1) %>
44
- </strong> KB</div>
63
+ <div class="" data-dz-size="">
64
+ Size : <%= attachment.byte_size.fdiv(1000000).round(4) %>
65
+ MB</div>
45
66
  </small>
46
67
  </div>
47
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>
@@ -13,8 +13,13 @@
13
13
  <%= field.drop_max_file_size? %>
14
14
  MB par fichier. Les fichiers autorisés :
15
15
  <%= field.drop_accepted_files? %>. <br>
16
- Un maximum de
17
- <%= field.drop_max_file? %> fichiers autorisés.
16
+ <% if field.many? %>
17
+ A maximum of <%= field.drop_max_file? %> files allowed for eacch creatiion or edition. <br>
18
+ Want more assets? Save it and edit it again and add <%= field.drop_max_file? %> extras assets.
19
+ <% else %>
20
+ A maximum of <%= field.drop_max_file? %> files allowed for eacch creatiion or edition. <br>
21
+ I case of edition, the previous asset will be deleted only <%= field.drop_max_file? %> allowed.
22
+ <% end %>
18
23
  </span>
19
24
  </div>
20
25
  <div id="tpl" style='display:none'>
@@ -2,7 +2,7 @@
2
2
  <div class="dz-preview dz-file-preview bibi">
3
3
  <div class="row align-items-center">
4
4
  <div class="col-auto">
5
- <div class="mx-1 my-1 avatar avatar-xl">
5
+ <div class="mx-1 my-1 avatar thumbnail-picture">
6
6
  <%
7
7
  # By default we don't allow attachment removal
8
8
  removable = local_assigns.fetch(:removable, false)
@@ -11,7 +11,7 @@
11
11
  <% if attachment.image? and attachment.variable? and !field.url_only? %>
12
12
  <%= link_to(field.blob_url(attachment), title: attachment.filename, class:'rounded avatar-img') do %>
13
13
  <%#= image_tag(field.variant(attachment, resize_to_limit: image_size),class:'avatar-img rounded delete_on_click') %>
14
- <%= image_tag attachment.variant(resize_to_limit: image_size), class:"rounded avatar-img delete_on_click" %>
14
+ <%= image_tag attachment.variant(resize_to_limit: image_size), class:"rounded thumbnail-picture-img delete_on_click" %>
15
15
  <% end %>
16
16
  <% elsif attachment.image? and !field.url_only? %>
17
17
  <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
@@ -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 %>
@@ -12,7 +12,7 @@
12
12
  <% if attachment.image? and attachment.variable? and !field.url_only? %>
13
13
  <%= link_to(field.blob_url(attachment), title: attachment.filename, class:'avatar') do %>
14
14
  <%#= image_tag(field.variant(attachment, resize_to_limit: image_size),class:'avatar-img rounded delete_on_click') %>
15
- <%= image_tag attachment.variant(resize_to_limit: image_size), class:"avatar-img rounded delete_on_click" %>
15
+ <%= image_tag attachment.variant(resize_to_limit: image_size), class:"thumbnail-picture-img rounded delete_on_click" %>
16
16
  <% end %>
17
17
  <% elsif attachment.image? and !field.url_only? %>
18
18
  <%= link_to(field.blob_url(attachment), title: attachment.filename) do %>
@@ -1,13 +1,13 @@
1
-
2
1
  <div class='mt-4 list-group list-group-flush'>
3
2
  <div class="dz-preview dz-file-preview bibi">
4
3
  <div class="row align-items-center">
5
4
  <div class="col-auto">
6
- <div class="mx-1 my-1 avatar avatar-xl">
7
- <img class="rounded avatar-img" data-dz-thumbnail>
5
+ <div class="mx-1 my-1 avatar thumbnail-picture">
6
+ <img class="rounded thumbnail-picture-img" data-dz-thumbnail>
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 = 9
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.9
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-05 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