templus_models 2.0.2 → 2.0.3

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
  SHA1:
3
- metadata.gz: eb53a205b3effb5725e79f8942766cd329e0063c
4
- data.tar.gz: de6dd1d86ba4130aeb08c1466514c7b0e209ca94
3
+ metadata.gz: 4ce817cc08c43cd412a30b093e5bc9f00fb4f38c
4
+ data.tar.gz: 0c6303bc7d12e48ee80af6888d52fc4b9042e25b
5
5
  SHA512:
6
- metadata.gz: e0932e8c5b3f3f57457f0996bb1fe8d77a34b3ba5837a7fb5202062e00cd7a732d484fcf3bf19d44e98b46c111b58d6bd53113762b1bcfb7c4d284ac7545e124
7
- data.tar.gz: 9c5ca770f1f106e43333db2a9deca647289bea59ae05674b83b61bb4ea91da50aae719e7e50bc440fd499c0f4c7b81404fee11c1bc48d4dfcc0d6f173fd3609b
6
+ metadata.gz: 05618d4dd8a1388fb9c63edde0ed6f91616221e8a570ecf307227883f785415d416462874b6235919e76a66055ed220f15d9c1ba24594b85075c70d98de9329e
7
+ data.tar.gz: 2b8df5f12fe2597c8c94332a6880b63dd75a348f895e6cd6674ca2dd2ae9a0923e62fdea1357d5f1a1520d0c342bb94599668649edaf2fc1ec9e6d953bf55877
@@ -176,9 +176,9 @@ module CrudHelper
176
176
  def render_field_file(field)
177
177
  if imagem?(field) && field.respond_to?(:thumb)
178
178
  if is_active_action("printing")
179
- pdf_image_tag(field)
179
+ pdf_image_tag(field, width: '100px')
180
180
  else
181
- image_tag(field.url(:thumb))
181
+ image_tag(field.url(:thumb), width: '100px')
182
182
  end
183
183
  elsif video?(field)
184
184
  link_to field, field.url, target: "_blank"
@@ -9,7 +9,11 @@
9
9
  <% if @crud_helper.logo_printing_field.present? %>
10
10
  <div class="col-xs-3">
11
11
  <% if @crud_helper.logo_printing_field[:field].present? %>
12
- <%= render_field_file(@record.send(@crud_helper.logo_printing_field[:field])) %>
12
+ <% if @record.send(@crud_helper.logo_printing_field[:field]).present? %>
13
+ <%= render_field_file(@record.send(@crud_helper.logo_printing_field[:field])) %>
14
+ <% else %>
15
+ <%= pdf_image_tag(Templus.logo, width: '100px') %>
16
+ <% end %>
13
17
  <% elsif @crud_helper.logo_printing_field[:url].present? %>
14
18
  <%= pdf_image_tag(@crud_helper.logo_printing_field[:url], width: '100px') %>
15
19
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module TemplusModels
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: templus_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Sol