ecm_pictures2 2.1.3 → 2.1.4
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 +4 -4
 - data/app/helpers/ecm/pictures_helper.rb +7 -2
 - data/lib/ecm/pictures/version.rb +1 -1
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e80430e123b26bdf4baa6e8c5bbf2634fde0eeac
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 123a3e13c56cded1591fad0d4ed743bcdc9574a3
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 597d26f961840da32288d8e5194674ec608dbf5363fd1864d35832e033ea13faa4c8151aa48448d01e7c47a31d8736bb63c2223f2160ceaceb75c2b5d2b2efae
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: c363a66aa568b4a752bce8a9a028444d52a635486484372da6f4ed760e14cfa8f16607d76186702c39c37abfbd70397efb21763d139e357a4ce164f45751de76
         
     | 
| 
         @@ -49,15 +49,20 @@ module Ecm::PicturesHelper 
     | 
|
| 
       49 
49 
     | 
    
         
             
              end
         
     | 
| 
       50 
50 
     | 
    
         | 
| 
       51 
51 
     | 
    
         
             
              def render_picture(name, options = {})
         
     | 
| 
       52 
     | 
    
         
            -
                options = { preview_style: :thumb }.merge(options)
         
     | 
| 
      
 52 
     | 
    
         
            +
                options = { preview_style: :thumb, plain: false }.merge(options)
         
     | 
| 
      
 53 
     | 
    
         
            +
                plain = options[:plain]
         
     | 
| 
       53 
54 
     | 
    
         | 
| 
       54 
55 
     | 
    
         
             
                picture = Ecm::Pictures::Picture.where(name: name.to_s).first
         
     | 
| 
       55 
56 
     | 
    
         
             
                # gallery_identifier = gallery.to_param rescue 'missing'
         
     | 
| 
       56 
57 
     | 
    
         | 
| 
       57 
58 
     | 
    
         
             
                if picture.nil?
         
     | 
| 
       58 
     | 
    
         
            -
                  content_tag(:div, class: 'warning missing picture') do
         
     | 
| 
      
 59 
     | 
    
         
            +
                  return content_tag(:div, class: 'warning missing picture') do
         
     | 
| 
       59 
60 
     | 
    
         
             
                    content_tag(:p, I18n.t('ecm.pictures.picture.warnings.missing', name: name.to_s))
         
     | 
| 
       60 
61 
     | 
    
         
             
                  end
         
     | 
| 
      
 62 
     | 
    
         
            +
                end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
      
 64 
     | 
    
         
            +
                if plain
         
     | 
| 
      
 65 
     | 
    
         
            +
                  image_tag picture.image.url
         
     | 
| 
       61 
66 
     | 
    
         
             
                else
         
     | 
| 
       62 
67 
     | 
    
         
             
                  render picture
         
     | 
| 
       63 
68 
     | 
    
         
             
                end
         
     | 
    
        data/lib/ecm/pictures/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ecm_pictures2
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.1.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Roberto Vasquez Angel
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-05-02 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     |