viniBaxter-field-active_storage 300.0.11 → 300.0.15

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
  SHA256:
3
- metadata.gz: e735bbcfeb7e7bea423eafdb4982520f4a83c9b80095f6bbadc567ea0835d0fd
4
- data.tar.gz: a61da509f009e79fa912bf67b82cd16fc35adbd9acae9650044252b876fae812
3
+ metadata.gz: 3585d63c65bfcddee1e132ca93d69bfd74649247eac7faf062bba358dafb7998
4
+ data.tar.gz: 305cacf03e9dc905a5bf52009e0147b8ab66f17f4ef97b4459bf3eba58a50d70
5
5
  SHA512:
6
- metadata.gz: afa17bb2624b562d0ad58a85d86b77b09700c094b2a684c2ddc5872c63cbc6c8ea6ac62c9ef7d6c1dd466a6534bc775f03d64549949cf4d2a4a79d4866d76930
7
- data.tar.gz: f3f66ddc74dace8ad052a3259786d264e1dfae45b1683e2bd0e8c938baceb7198a98596d63c76e99f4e8eb404f845056e9c46cfb0259258337ae0fbb170614d4
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>
@@ -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 = 11
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.11
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-06 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