tkh_content 0.1.9.1 → 0.1.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
 
4
4
 
5
+ ## 0.1.9.1 & 0.1.9.2
6
+
7
+ * Debugging
8
+ * Enable admin user to embed contact form in any page using happy DSL
9
+
10
+
5
11
  ## 0.1.9
6
12
 
7
13
  * Removed inline editor. Will add another one soon
@@ -0,0 +1,6 @@
1
+ module PagesHelper
2
+ def tkhed(content)
3
+ content = content.gsub /\(-: contact_us_form :-\)/, render('contacts/form') if content.match(/(-: contact_us_form :-)/)
4
+ content
5
+ end
6
+ end
@@ -12,7 +12,10 @@ class ContactMailer < ActionMailer::Base
12
12
  # FIXME - only the email addresses show up. not the names :-(
13
13
  # TODO - what do to if contact_email is not set?
14
14
  recipient = "#{Setting.first.company_name} <#{Setting.first.contact_email}>"
15
- from = "#{@contact.sender_name} <#{@contact.sender_email}>"
16
- mail to: recipient, from: from , subject: 'Message from the contact form'
15
+ reply_to = "#{@contact.sender_name} <#{@contact.sender_email}>"
16
+ mail to: recipient,
17
+ from: "#{Setting.first.site_name} <deploy@pragmaticyoga.org>",
18
+ reply_to: reply_to,
19
+ subject: "Message from #{@contact.sender_name} via #{Setting.first.site_name} web site"
17
20
  end
18
21
  end
@@ -1,4 +1,9 @@
1
- Here is the message <%= @contact.sender_name %> sent via the contact form on the web site:
1
+ Here is the message sent via the contact form on the web site:
2
+
3
+ - Sender's name: <%= @contact.sender_name %>
4
+ - Sender's email: <%= @contact.sender_email %>
5
+
6
+ Message:
2
7
 
3
8
  -----------------------------------
4
9
 
@@ -6,4 +11,3 @@ Here is the message <%= @contact.sender_name %> sent via the contact form on the
6
11
 
7
12
  -----------------------------------
8
13
 
9
- Their email address is: <%= @contact.sender_email %>
@@ -3,10 +3,10 @@
3
3
 
4
4
  <%= content_tag(:h1, @page.title) if @page.for_blog? %>
5
5
 
6
- <%= raw @page.body %>
6
+ <%= raw tkhed(@page.body) %>
7
7
 
8
8
  <!-- remove this once DSL has been created -->
9
- <%= render 'contacts/form' if params[:id].to_i == 5 %>
9
+ <%# = render 'contacts/form' if params[:id].to_i == 5 %>
10
10
 
11
11
  <%# partial in tkh_menus gem or has to be added in host app %>
12
12
  <%= render './shared/menus' %>
@@ -1,3 +1,3 @@
1
1
  module TkhContent
2
- VERSION = "0.1.9.1"
2
+ VERSION = "0.1.9.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tkh_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.1
4
+ version: 0.1.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -150,6 +150,7 @@ files:
150
150
  - app/controllers/contacts_controller.rb
151
151
  - app/controllers/pages_controller.rb
152
152
  - app/helpers/blog_helper.rb
153
+ - app/helpers/pages_helper.rb
153
154
  - app/mailers/contact_mailer.rb
154
155
  - app/models/contact.rb
155
156
  - app/models/page.rb
@@ -232,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
233
  version: '0'
233
234
  segments:
234
235
  - 0
235
- hash: 2060717003927025802
236
+ hash: -1015600408546556615
236
237
  required_rubygems_version: !ruby/object:Gem::Requirement
237
238
  none: false
238
239
  requirements:
@@ -241,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
242
  version: '0'
242
243
  segments:
243
244
  - 0
244
- hash: 2060717003927025802
245
+ hash: -1015600408546556615
245
246
  requirements: []
246
247
  rubyforge_project:
247
248
  rubygems_version: 1.8.23