ecm_contact 1.0.9.pre → 1.0.10.pre
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.
| 
         @@ -0,0 +1,39 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <h4 style="text-decoration:underline"><%= message.subject %></h4>
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            <% @resource.mail_form_attributes.each do |attribute, value|
         
     | 
| 
      
 4 
     | 
    
         
            +
              next if value.blank? %>
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              <p><b><%= @resource.class.human_attribute_name(attribute) %>:</b>
         
     | 
| 
      
 7 
     | 
    
         
            +
              <%= case value
         
     | 
| 
      
 8 
     | 
    
         
            +
                when /\n/
         
     | 
| 
      
 9 
     | 
    
         
            +
                  raw(simple_format(h(value)))
         
     | 
| 
      
 10 
     | 
    
         
            +
                when Time, DateTime, Date
         
     | 
| 
      
 11 
     | 
    
         
            +
                  I18n.l(value)
         
     | 
| 
      
 12 
     | 
    
         
            +
                else
         
     | 
| 
      
 13 
     | 
    
         
            +
                  value
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
              %></p>
         
     | 
| 
      
 16 
     | 
    
         
            +
            <% end %>
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            <% unless @resource.class.mail_appendable.blank? %>
         
     | 
| 
      
 19 
     | 
    
         
            +
              <br /><h4 style="text-decoration:underline"><%= I18n.t :title, :scope => [ :mail_form, :request ], :default => 'Request information' %></h4>
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              <% @resource.class.mail_appendable.each do |attribute|
         
     | 
| 
      
 22 
     | 
    
         
            +
                value = @resource.request.send(attribute)
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
                value = if value.is_a?(Hash) && !value.empty?
         
     | 
| 
      
 25 
     | 
    
         
            +
                  list = value.to_a.map{ |k,v| content_tag(:li, h("#{k}: #{v.inspect}")) }.join("\n")
         
     | 
| 
      
 26 
     | 
    
         
            +
                  content_tag(:ul, raw(list), :style => "list-style:none;")
         
     | 
| 
      
 27 
     | 
    
         
            +
                elsif value.is_a?(String)
         
     | 
| 
      
 28 
     | 
    
         
            +
                  value
         
     | 
| 
      
 29 
     | 
    
         
            +
                else
         
     | 
| 
      
 30 
     | 
    
         
            +
                  value.inspect
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
              %>
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                <p><b><%= I18n.t attribute, :scope => [ :mail_form, :request ], :default => attribute.to_s.humanize %>:</b>
         
     | 
| 
      
 35 
     | 
    
         
            +
                <%= value.include?("\n") ? simple_format(value) : value %></p>
         
     | 
| 
      
 36 
     | 
    
         
            +
              <% end %>
         
     | 
| 
      
 37 
     | 
    
         
            +
              <br />
         
     | 
| 
      
 38 
     | 
    
         
            +
            <% end %>
         
     | 
| 
      
 39 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <%= render @resource %>
         
     | 
    
        data/lib/ecm/contact/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ecm_contact
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
       5 
     | 
    
         
            -
              prerelease:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 961916028
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 7
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 1
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 0
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
      
 9 
     | 
    
         
            +
              - 10
         
     | 
| 
       10 
10 
     | 
    
         
             
              - pre
         
     | 
| 
       11 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 11 
     | 
    
         
            +
              version: 1.0.10.pre
         
     | 
| 
       12 
12 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       13 
13 
     | 
    
         
             
            authors: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            - Roberto Vasquez Angel
         
     | 
| 
         @@ -16,7 +16,7 @@ autorequire: 
     | 
|
| 
       16 
16 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       17 
17 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
            date: 2013-01- 
     | 
| 
      
 19 
     | 
    
         
            +
            date: 2013-01-21 00:00:00 Z
         
     | 
| 
       20 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       21 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       22 
22 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -233,6 +233,8 @@ files: 
     | 
|
| 
       233 
233 
     | 
    
         
             
            - app/controllers/ecm/contact/requests_controller.rb
         
     | 
| 
       234 
234 
     | 
    
         
             
            - app/views/ecm/contact/requests/_form.erb
         
     | 
| 
       235 
235 
     | 
    
         
             
            - app/views/ecm/contact/requests/index.html.erb
         
     | 
| 
      
 236 
     | 
    
         
            +
            - app/views/ecm/contact/requests/_request.erb
         
     | 
| 
      
 237 
     | 
    
         
            +
            - app/views/mail_form/contact.erb
         
     | 
| 
       236 
238 
     | 
    
         
             
            - app/mail_forms/ecm/contact/request.rb
         
     | 
| 
       237 
239 
     | 
    
         
             
            - lib/generators/ecm/contact/locales/locales_generator.rb
         
     | 
| 
       238 
240 
     | 
    
         
             
            - lib/generators/ecm/contact/locales/templates/ecm.contact.routes.de.yml
         
     |