sibu 0.1.2 → 0.1.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 +4 -4
 - data/app/helpers/sibu/pages_helper.rb +7 -1
 - data/lib/sibu/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: f4069d42c8c180c80e1ccb387a073b6679fba5d8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ab6384000526466cdbf32b916567a3d6fff8ed02
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 8ff358f9082ef0ddab1aea8fe5fcda96ab9224d7bad174da0fccf72c3fc7f5866de8b574f140fba1553113b59251810f183288bcc9943a2aa46f3739614b7bde
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 59f1bee45c6cdce0bda85e45a58626bb8a46923d43f90058dfab153677aa236be20bbb8b8d197242668829aa36345809f8b12c3e03e772b96a524633e665cbf2
         
     | 
| 
         @@ -15,7 +15,7 @@ module Sibu 
     | 
|
| 
       15 
15 
     | 
    
         
             
                  [['Français', 'fr'], ['Anglais', 'en']]
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
                [:h1, :h2, :h3, :h4, :h5, :h6, :p, :span, :div 
     | 
| 
      
 18 
     | 
    
         
            +
                [:h1, :h2, :h3, :h4, :h5, :h6, :p, :span, :div].each do |t|
         
     | 
| 
       19 
19 
     | 
    
         
             
                  define_method(t) do |id_or_elt, html_opts = {}|
         
     | 
| 
       20 
20 
     | 
    
         
             
                    content = id_or_elt.is_a?(Hash) ? (id_or_elt || {"text" => "Texte à modifier"}) : (select(id_or_elt) || {"text" => "Texte à modifier"})
         
     | 
| 
       21 
21 
     | 
    
         
             
                    html_opts.merge!({class: "sb-#{t} #{html_opts[:class]}", data: {id:  id_or_elt.is_a?(Hash) ? id_or_elt["id"] : id_or_elt}}) if action_name != 'show'
         
     | 
| 
         @@ -76,5 +76,11 @@ module Sibu 
     | 
|
| 
       76 
76 
     | 
    
         
             
                    content_tag(:a, content["text"], {href: href}.merge(html_opts))
         
     | 
| 
       77 
77 
     | 
    
         
             
                  end
         
     | 
| 
       78 
78 
     | 
    
         
             
                end
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                def form_label(id_or_elt, html_opts = {}, &block)
         
     | 
| 
      
 81 
     | 
    
         
            +
                  content = id_or_elt.is_a?(Hash) ? (id_or_elt || {"text" => "Texte à modifier"}) : (select(id_or_elt) || {"text" => "Texte à modifier"})
         
     | 
| 
      
 82 
     | 
    
         
            +
                  html_opts.merge!({class: "sb-label #{html_opts[:class]}", data: {id:  id_or_elt.is_a?(Hash) ? id_or_elt["id"] : id_or_elt}}) if action_name != 'show'
         
     | 
| 
      
 83 
     | 
    
         
            +
                  content_tag(:label, raw(content["text"]).html_safe, html_opts)
         
     | 
| 
      
 84 
     | 
    
         
            +
                end
         
     | 
| 
       79 
85 
     | 
    
         
             
              end
         
     | 
| 
       80 
86 
     | 
    
         
             
            end
         
     | 
    
        data/lib/sibu/version.rb
    CHANGED