viniBaxter-field-active_storage 300.0.8 → 300.0.15

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: d22048dd1719aafbaa1450afd38a0c25bc7011d0afc594aed93d556edb5d826c
4
- data.tar.gz: b8c0044eebcf42b178fad52ff14f923096673fc87fb1dd61f3897441d4d7da24
3
+ metadata.gz: 3585d63c65bfcddee1e132ca93d69bfd74649247eac7faf062bba358dafb7998
4
+ data.tar.gz: 305cacf03e9dc905a5bf52009e0147b8ab66f17f4ef97b4459bf3eba58a50d70
5
5
  SHA512:
6
- metadata.gz: 8592b56fdd2b2c779b65e02227e65451b2201bcef0cee75a8044ae72a767e5d64ab07745e54a7bc6232b26bd85473d223ccbc7c63bacf7f331cf237b25ff0ae1
7
- data.tar.gz: f68e11231bd2fd97692cf051068e7b93605729b31ec3f269a42c4ba2f81bee7b480ab57729a29d85405f84b32077b28126bd4899a51e9a1ba190a682219ab2dc
6
+ metadata.gz: 1e7c86346d5de9dabba52159b9b0e8c42a32f10e00fffe8b9481f10750d25ba2e387b5d7b30c14678a0bfe4dbc1f311933b8fe755b25282cb279d4e8b6311b03
7
+ data.tar.gz: fb4ca2ce0123e35d3b28fa420e03c1da1790e4ff785e041847829ff3f17fa92177aea2933511c49d1025a7e3fe5fd6f23a13b244bb5f6a5a4bd7c36c9be2450b
@@ -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,7 +21,7 @@
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
26
  <div class="mb-1 dz-size" data-dz-size="">
27
27
  <strong>
@@ -34,14 +34,49 @@
34
34
  <small class="text-muted">
35
35
  <div class="mb-1 dz-size" data-dz-size="">
36
36
  <strong>
37
- full name : <%= attachment.filename %> |
37
+ full name : <%= attachment.filename %>
38
38
  </strong></div>
39
39
  </small>
40
40
  <small class="text-muted">
41
41
  <div class="mb-1 dz-size" data-dz-size="">
42
42
  <strong>
43
- <%= attachment.byte_size.fdiv(1000).round(1) %>
44
- </strong> KB</div>
43
+ Width: <%= attachment.blob.metadata[:width]%>px
44
+ </strong>
45
+ </div>
46
+ </small>
47
+ <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>
52
+ </div>
53
+ </small>
54
+ <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>
59
+ </div>
60
+ </small>
61
+ <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>
66
+ </div>
67
+ </small>
68
+ <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>
73
+ </div>
74
+ </small>
75
+ <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>
45
80
  </small>
46
81
  </div>
47
82
  </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 %>
@@ -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,10 +1,10 @@
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
10
  <i class="tim-icons icon-simple-remove text-light"></i>
@@ -5,7 +5,7 @@ module ViniBaxter
5
5
  module ViniBaxterFieldActiveStorage
6
6
  MAJOR = 300
7
7
  MINOR = 0
8
- TINY = 8
8
+ TINY = 15
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.8
4
+ version: 300.0.15
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-04 00:00:00.000000000 Z
11
+ date: 2022-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate