cms-inquiries 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,6 @@ class Admin::InquirySettingsController < Admin::BaseController
7
7
 
8
8
  before_filter :set_url_override?, :only => [:edit, :update]
9
9
  after_filter :save_subject_for_confirmation?, :only => :update
10
- after_filter :save_message_for_confirmation?, :only => :update
11
10
  around_filter :rewrite_flash?, :only => :update
12
11
 
13
12
  protected
@@ -20,10 +19,6 @@ protected
20
19
  def save_subject_for_confirmation?
21
20
  InquirySetting.confirmation_subject = params[:subject] if params.keys.include?('subject')
22
21
  end
23
-
24
- def save_message_for_confirmation?
25
- InquirySetting.confirmation_message = params[:message] if params.keys.include?('message')
26
- end
27
22
 
28
23
  def set_url_override?
29
24
  @url_override = admin_inquiry_setting_url(@refinery_setting, :dialog => from_dialog?)
@@ -25,7 +25,7 @@ class InquiriesController < ApplicationController
25
25
  InquiryMailer.confirmation(@inquiry, request).deliver
26
26
  rescue
27
27
  logger.warn "There was an error delivering an inquiry confirmation:\n#{$!}\n"
28
- end if InquirySetting.send_confirmation?
28
+ end
29
29
  end
30
30
 
31
31
  redirect_to thank_you_inquiries_url
@@ -1,7 +1,7 @@
1
1
  class InquiryMailer < ActionMailer::Base
2
2
 
3
3
  def confirmation(inquiry, request)
4
- subject InquirySetting.confirmation_subject(Globalize.locale)
4
+ subject InquirySetting.confirmation_subject
5
5
  recipients inquiry.email
6
6
  from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
7
7
  reply_to InquirySetting.notification_recipients.split(',').first
@@ -13,7 +13,6 @@ class InquiryMailer < ActionMailer::Base
13
13
  subject InquirySetting.notification_subject
14
14
  recipients InquirySetting.notification_recipients
15
15
  from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
16
- reply_to inquiry.email
17
16
  sent_on Time.now
18
17
  @inquiry = inquiry
19
18
  end
@@ -14,8 +14,6 @@ class Inquiry < ActiveRecord::Base
14
14
 
15
15
  default_scope :order => 'created_at DESC' # previously scope :newest
16
16
 
17
- attr_accessible :name, :phone, :message, :email
18
-
19
17
  def self.latest(number = 7, include_spam = false)
20
18
  include_spam ? limit(number) : ham.limit(number)
21
19
  end
@@ -1,47 +1,33 @@
1
1
  class InquirySetting < ActiveRecord::Base
2
2
 
3
- class << self
4
- def confirmation_body
5
- RefinerySetting.find_or_set(:inquiry_confirmation_body,
6
- "Thank you for your inquiry %name%,\n\nThis email is a receipt to confirm we have received your inquiry and we'll be in touch shortly.\n\nThanks."
7
- )
8
- end
9
-
10
- def confirmation_subject(locale='en')
11
- RefinerySetting.find_or_set("inquiry_confirmation_subject_#{locale}".to_sym,
12
- "Thank you for your inquiry")
13
- end
14
-
15
- def confirmation_subject=(value)
16
- value.first.keys.each do |locale|
17
- RefinerySetting.set("inquiry_confirmation_subject_#{locale}".to_sym, value.first[locale.to_sym])
18
- end
19
- end
20
-
21
- def confirmation_message(locale='en')
22
- RefinerySetting.find_or_set("inquiry_confirmation_messeage_#{locale}".to_sym,
23
- RefinerySetting[:inquiry_confirmation_body])
24
- end
3
+ def self.confirmation_body
4
+ RefinerySetting.find_or_set(:inquiry_confirmation_body,
5
+ "Thank you for your inquiry %name%,\n\nThis email is a receipt to confirm we have received your inquiry and we'll be in touch shortly.\n\nThanks."
6
+ )
7
+ end
25
8
 
26
- def confirmation_message=(value)
27
- value.first.keys.each do |locale|
28
- RefinerySetting.set("inquiry_confirmation_messeage_#{locale}".to_sym, value.first[locale.to_sym])
29
- end
30
- end
9
+ def self.confirmation_subject
10
+ RefinerySetting.find_or_set(:inquiry_confirmation_subject,
11
+ "Thank you for your inquiry")
12
+ end
31
13
 
32
- def notification_recipients
33
- RefinerySetting.find_or_set(:inquiry_notification_recipients,
34
- ((Role[:refinery].users.first.email rescue nil) if defined?(Role)).to_s)
14
+ def self.confirmation_subject=(value)
15
+ # handles a change in Refinery API
16
+ if RefinerySetting.methods.map(&:to_sym).include?(:set)
17
+ RefinerySetting.set(:inquiry_confirmation_subject, value)
18
+ else
19
+ RefinerySetting[:inquiry_confirmation_subject] = value
35
20
  end
21
+ end
36
22
 
37
- def notification_subject
38
- RefinerySetting.find_or_set(:inquiry_notification_subject,
39
- "New inquiry from your website")
40
- end
23
+ def self.notification_recipients
24
+ RefinerySetting.find_or_set(:inquiry_notification_recipients,
25
+ ((Role[:refinery].users.first.email rescue nil) if defined?(Role)).to_s)
26
+ end
41
27
 
42
- def send_confirmation?
43
- RefinerySetting.find_or_set(:inquiry_send_confirmation, true)
44
- end
28
+ def self.notification_subject
29
+ RefinerySetting.find_or_set(:inquiry_notification_subject,
30
+ "New inquiry from your website")
45
31
  end
46
32
 
47
33
  end
@@ -65,7 +65,7 @@
65
65
  <strong><%= t('.message') %></strong>
66
66
  </td>
67
67
  <td>
68
- <%= simple_format strip_tags(@inquiry.message), :style => 'margin-top: 0' %>
68
+ <%= simple_format @inquiry.message, :style => 'margin-top: 0' %>
69
69
  </td>
70
70
  </tr>
71
71
  </table>
@@ -23,30 +23,28 @@
23
23
  <%= "#{RefinerySetting[:site_name]} &lt;no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}&gt;".html_safe %>
24
24
  </td>
25
25
  </tr>
26
- <% (RefinerySetting.get("i18n_translation_frontend_locales", :scoping => 'refinery')||[I18n.locale]).each do |locale| %>
27
- <tr>
28
- <td>
29
- <label class='stripped'><%= t('.subject') %> (<%= locale.to_s %>)</label>
30
- </td>
31
- <td>
32
- <%= text_field_tag "subject[][#{locale.to_s}]", InquirySetting.confirmation_subject(locale),
33
- :class => 'widest' %>
34
- </td>
35
- </tr>
36
- <tr>
37
- <td valign='top'>
38
- <%= f.label :value, t('.message'),
39
- :class => 'stripped' %> (<%= locale.to_s %>)
40
- </td>
41
- <td>
42
- <%= text_area_tag "message[][#{locale.to_s}]", InquirySetting.confirmation_message(locale), # required, we can't use :value
43
- :rows => "5",
44
- :class => 'widest' %>
45
- <br/>
46
- <em><%= t('.note') %></em>
47
- </td>
48
- </tr>
49
- <% end %>
26
+ <tr>
27
+ <td>
28
+ <label class='stripped'><%= t('.subject') %></label>
29
+ </td>
30
+ <td>
31
+ <%= text_field_tag 'subject', InquirySetting.confirmation_subject,
32
+ :class => 'widest' %>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <td valign='top'>
37
+ <%= f.label :value, t('.message'),
38
+ :class => 'stripped' %>
39
+ </td>
40
+ <td>
41
+ <%= f.text_area :value, :value => f.object.value, # required, we can't use :value
42
+ :rows => "5",
43
+ :class => 'widest' %>
44
+ <br/>
45
+ <em><%= t('.note') %></em>
46
+ </td>
47
+ </tr>
50
48
  </table>
51
49
 
52
50
  <%= render :partial => "/shared/admin/form_actions",
@@ -1,34 +1,34 @@
1
1
  <% content_for :body_content_left do %>
2
- <div class="inquiries">
3
- <%=raw @page.content_for(Page.default_parts.first.to_sym) %>
2
+ <div class='inquiries'>
3
+ <%=raw @page[Page.default_parts.first.to_sym] %>
4
4
 
5
5
  <%= form_for @inquiry do |f| %>
6
- <%= render :partial => '/shared/admin/error_messages',
6
+ <%= render :partial => "/shared/admin/error_messages",
7
7
  :locals => {
8
8
  :object => @inquiry,
9
9
  :include_object_name => true
10
10
  } %>
11
- <div class="field">
12
- <%= f.required_label :name, :class => 'placeholder-fallback' %>
13
- <%= f.text_field :name, :class => 'text', :required => 'required', :placeholder => t('name', :scope => 'activerecord.attributes.inquiry') %>
11
+ <div class='field'>
12
+ <%= f.required_label :name %>
13
+ <%= f.text_field :name %>
14
14
  </div>
15
- <div class="field">
16
- <%= f.required_label :email, :class => 'placeholder-fallback' %>
17
- <%= f.email_field :email, :class => 'text email', :required => 'required', :placeholder => t('email', :scope => 'activerecord.attributes.inquiry') %>
15
+ <div class='field'>
16
+ <%= f.required_label :email %>
17
+ <%= f.text_field :email %>
18
18
  </div>
19
- <div class="field">
20
- <%= f.label :phone, :class => 'placeholder-fallback' %>
21
- <%= f.text_field :phone, :class => 'text phone', :placeholder => t('phone', :scope => 'activerecord.attributes.inquiry') %>
19
+ <div class='field'>
20
+ <%= f.label :phone %>
21
+ <%= f.text_field :phone %>
22
22
  </div>
23
23
  <div class='field message_field'>
24
- <%= f.required_label :message, :class => 'placeholder-fallback' %>
25
- <%= f.text_area :message, :rows => 8, :required => 'required', :placeholder => t('message', :scope => 'activerecord.attributes.inquiry') %>
24
+ <%= f.required_label :message %>
25
+ <%= f.text_area :message, :rows => 8 %>
26
26
  </div>
27
- <div class="actions">
27
+ <div class='actions'>
28
28
  <%= f.submit t('.send') %>
29
- <%= link_to t('.privacy_policy'), '/pages/privacy-policy', :id => 'privacy_link' if RefinerySetting.find_or_set(:show_contact_privacy_link, false) %>
29
+ <%= link_to t('.privacy_policy'), "/pages/privacy-policy", :id => "privacy_link" if RefinerySetting.find_or_set(:show_contact_privacy_link, false) %>
30
30
  </div>
31
31
  <% end %>
32
32
  </div>
33
33
  <% end %>
34
- <%= render :partial => '/shared/content_page' %>
34
+ <%= render :partial => "/shared/content_page" %>
@@ -1 +1 @@
1
- <%=raw InquirySetting.confirmation_message(Globalize.locale).gsub("%name%", @inquiry.name) %>
1
+ <%= InquirySetting.confirmation_body.gsub("%name%", @inquiry.name) %>
@@ -1,18 +1,18 @@
1
- <%=raw t('.greeting') %>,
1
+ <%= t('.greeting') %>,
2
2
 
3
- <%=raw t('.you_recieved_new_inquiry') %>
3
+ <%= t('.you_recieved_new_inquiry') %>
4
4
 
5
- <%=raw t('.inquiry_starts') %>
5
+ <%= t('.inquiry_starts') %>
6
6
 
7
- <%=raw t('.from') %>: <%= @inquiry.name %>
8
- <%=raw t('.email') %>: <%= @inquiry.email %>
9
- <%=raw t('.phone') %>: <%= @inquiry.phone %>
10
- <%=raw t('.message') %>:
11
- <%=simple_format strip_tags(@inquiry.message) %>
7
+ <%= t('.from') %>: <%= @inquiry.name %>
8
+ <%= t('.email') %>: <%= @inquiry.email %>
9
+ <%= t('.phone') %>: <%= @inquiry.phone %>
10
+ <%= t('.message') %>:
11
+ <%= @inquiry.message %>
12
12
 
13
- <%=raw t('.inquiry_ends') %>
13
+ <%= t('.inquiry_ends') %>
14
14
 
15
- <%=raw t('.closing_line') %>,
16
- <%=raw RefinerySetting[:site_name] %>
15
+ <%= t('.closing_line') %>,
16
+ <%= RefinerySetting[:site_name] %>
17
17
 
18
- <%=raw t('.ps') %>
18
+ <%= t('.ps') %>
@@ -1,96 +1,94 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{cms-inquiries}
3
- s.version = %q{1.0.1}
4
- s.date = %q{2012-02-06}
3
+ s.version = %q{1.0.2}
4
+ s.date = %q{2012-02-08}
5
5
  s.summary = %q{Inquiry handling functionality for the CMS project.}
6
- s.description = %q{Inquiry handling functionality that allow you to have a contact form and manage inquiries in the CMS backend.}
6
+ s.description = %q{Inquiry handling functionality extracted from CMS to allow you to have a contact form and manage inquiries in the backend.}
7
7
  s.homepage = %q{http://www.mutalis.com}
8
8
  s.email = %q{services_info@mutalis.com}
9
9
  s.authors = ["Mutalis LLC"]
10
10
  s.require_paths = %w(lib)
11
11
 
12
12
  s.files = [
13
- 'cms-inquiries.gemspec',
14
13
  'app',
15
14
  'app/controllers',
16
- 'app/controllers/inquiries_controller.rb',
17
15
  'app/controllers/admin',
18
16
  'app/controllers/admin/inquiries_controller.rb',
19
17
  'app/controllers/admin/inquiry_settings_controller.rb',
18
+ 'app/controllers/inquiries_controller.rb',
19
+ 'app/helpers',
20
+ 'app/helpers/inquiries_helper.rb',
21
+ 'app/mailers',
22
+ 'app/mailers/inquiry_mailer.rb',
23
+ 'app/models',
24
+ 'app/models/inquiry.rb',
25
+ 'app/models/inquiry_setting.rb',
20
26
  'app/views',
21
- 'app/views/inquiries',
22
- 'app/views/inquiries/thank_you.html.erb',
23
- 'app/views/inquiries/new.html.erb',
24
- 'app/views/inquiry_mailer',
25
- 'app/views/inquiry_mailer/confirmation.html.erb',
26
- 'app/views/inquiry_mailer/notification.html.erb',
27
27
  'app/views/admin',
28
28
  'app/views/admin/inquiries',
29
- 'app/views/admin/inquiries/show.html.erb',
29
+ 'app/views/admin/inquiries/_inquiry.html.erb',
30
30
  'app/views/admin/inquiries/_submenu.html.erb',
31
31
  'app/views/admin/inquiries/index.html.erb',
32
- 'app/views/admin/inquiries/_inquiry.html.erb',
32
+ 'app/views/admin/inquiries/show.html.erb',
33
33
  'app/views/admin/inquiry_settings',
34
- 'app/views/admin/inquiry_settings/_notification_recipients_form.html.erb',
35
34
  'app/views/admin/inquiry_settings/_confirmation_email_form.html.erb',
35
+ 'app/views/admin/inquiry_settings/_notification_recipients_form.html.erb',
36
36
  'app/views/admin/inquiry_settings/edit.html.erb',
37
- 'app/helpers',
38
- 'app/helpers/inquiries_helper.rb',
39
- 'app/models',
40
- 'app/models/inquiry_setting.rb',
41
- 'app/models/inquiry.rb',
42
- 'app/mailers',
43
- 'app/mailers/inquiry_mailer.rb',
44
- 'spec',
45
- 'spec/models',
46
- 'spec/models/inquiry_spec.rb',
47
- 'features',
48
- 'features/support',
49
- 'features/support/paths.rb',
50
- 'features/support/factories.rb',
51
- 'features/manage_inquiries.feature',
52
- 'features/create_inquiries.feature',
53
- 'features/step_definitions',
54
- 'features/step_definitions/inquiry_steps.rb',
55
- 'lib',
56
- 'lib/gemspec.rb',
57
- 'lib/inquiries.rb',
58
- 'lib/generators',
59
- 'lib/generators/refinerycms_inquiries_generator.rb',
60
- 'lib/refinerycms-inquiries.rb',
61
- 'db',
62
- 'db/migrate',
63
- 'db/migrate/20101208082840_create_inquiries.rb',
64
- 'db/migrate/20110719082646_drop_inquiry_settings_table.rb',
65
- 'db/migrate/20101208082841_remove_position_and_open_from_inquiries.rb',
66
- 'db/seeds',
67
- 'db/seeds/pages_for_inquiries.rb',
68
- 'readme.md',
69
- 'license.md',
37
+ 'app/views/inquiries',
38
+ 'app/views/inquiries/new.html.erb',
39
+ 'app/views/inquiries/thank_you.html.erb',
40
+ 'app/views/inquiry_mailer',
41
+ 'app/views/inquiry_mailer/confirmation.html.erb',
42
+ 'app/views/inquiry_mailer/notification.html.erb',
43
+ 'cms-inquiries.gemspec',
70
44
  'config',
71
45
  'config/locales',
72
- 'config/locales/sk.yml',
73
46
  'config/locales/cs.yml',
74
- 'config/locales/bg.yml',
75
- 'config/locales/nl.yml',
76
- 'config/locales/sl.yml',
77
- 'config/locales/sv.yml',
78
- 'config/locales/ru.yml',
79
- 'config/locales/pt-BR.yml',
80
- 'config/locales/zh-CN.yml',
81
- 'config/locales/lt.yml',
82
47
  'config/locales/da.yml',
48
+ 'config/locales/de.yml',
83
49
  'config/locales/en-GB.yml',
50
+ 'config/locales/en.yml',
51
+ 'config/locales/es.yml',
52
+ 'config/locales/fr.yml',
84
53
  'config/locales/it.yml',
85
54
  'config/locales/lolcat.yml',
86
- 'config/locales/nb.yml',
87
- 'config/locales/en.yml',
55
+ 'config/locales/lt.yml',
88
56
  'config/locales/lv.yml',
89
- 'config/locales/fr.yml',
90
- 'config/locales/de.yml',
91
- 'config/locales/es.yml',
57
+ 'config/locales/nb.yml',
58
+ 'config/locales/nl.yml',
92
59
  'config/locales/pl.yml',
93
- 'config/routes.rb'
60
+ 'config/locales/pt-BR.yml',
61
+ 'config/locales/ru.yml',
62
+ 'config/locales/sk.yml',
63
+ 'config/locales/sl.yml',
64
+ 'config/locales/sv.yml',
65
+ 'config/locales/zh-CN.yml',
66
+ 'config/routes.rb',
67
+ 'db',
68
+ 'db/migrate',
69
+ 'db/migrate/20101208082840_create_inquiries.rb',
70
+ 'db/migrate/20101208082841_remove_position_and_open_from_inquiries.rb',
71
+ 'db/seeds',
72
+ 'db/seeds/pages_for_inquiries.rb',
73
+ 'features',
74
+ 'features/create_inquiries.feature',
75
+ 'features/manage_inquiries.feature',
76
+ 'features/step_definitions',
77
+ 'features/step_definitions/inquiry_steps.rb',
78
+ 'features/support',
79
+ 'features/support/factories.rb',
80
+ 'features/support/paths.rb',
81
+ 'lib',
82
+ 'lib/cms-inquiries.rb',
83
+ 'lib/gemspec.rb',
84
+ 'lib/generators',
85
+ 'lib/generators/refinerycms_inquiries_generator.rb',
86
+ 'lib/inquiries.rb',
87
+ 'license.md',
88
+ 'readme.md',
89
+ 'spec',
90
+ 'spec/models',
91
+ 'spec/models/inquiry_spec.rb'
94
92
  ]
95
93
  s.require_path = 'lib'
96
94
 
@@ -63,7 +63,7 @@ en-GB:
63
63
  phone: Phone
64
64
  message: Message
65
65
  closing_line: Kind Regards
66
- ps: P.S. All your enquiries are stored in the "Enquiries" section of Refinery should you ever want to view it there later.
66
+ ps: P.S. All your enquiries are stored in the "Enquiries" section of Refinery should you ever want to view it later there.
67
67
  activerecord:
68
68
  models:
69
69
  inquiry: inquiry
@@ -63,7 +63,7 @@ en:
63
63
  phone: Phone
64
64
  message: Message
65
65
  closing_line: Kind Regards
66
- ps: P.S. All your inquiries are stored in the "Inquiries" section of Refinery should you ever want to view it there later.
66
+ ps: P.S. All your inquiries are stored in the "Inquiries" section of Refinery should you ever want to view it later there.
67
67
  activerecord:
68
68
  models:
69
69
  inquiry: inquiry
@@ -16,6 +16,15 @@ class CreateInquiries < ActiveRecord::Migration
16
16
  add_index ::Inquiry.table_name, :id
17
17
  end
18
18
 
19
+ # todo: remove at 1.0
20
+ create_table ::InquirySetting.table_name, :force => true do |t|
21
+ t.string "name"
22
+ t.text "value"
23
+ t.boolean "destroyable"
24
+ t.datetime "created_at"
25
+ t.datetime "updated_at"
26
+ end unless ::InquirySetting.table_exists?
27
+
19
28
  ::Page.reset_column_information if defined?(::Page)
20
29
 
21
30
  load(Rails.root.join('db', 'seeds', 'pages_for_inquiries.rb').to_s)
@@ -23,7 +32,9 @@ class CreateInquiries < ActiveRecord::Migration
23
32
 
24
33
  def self.down
25
34
  drop_table ::Inquiry.table_name
26
-
35
+ # todo: remove at 1.0
36
+ drop_table ::InquirySetting.table_name
37
+
27
38
  ::Page.delete_all({
28
39
  :link_url => ("/contact" || "/contact/thank_you")
29
40
  }) if defined?(::Page)
@@ -1,4 +1,4 @@
1
- ::User.all.each do |user|
1
+ ::User.find(:all).each do |user|
2
2
  if user.plugins.where(:name => 'refinery_inquiries').blank?
3
3
  user.plugins.create(:name => "refinery_inquiries",
4
4
  :position => (user.plugins.maximum(:position) || -1) +1)
@@ -9,7 +9,6 @@ module Refinery
9
9
 
10
10
  config.after_initialize do
11
11
  Refinery::Plugin.register do |plugin|
12
- plugin.pathname = root
13
12
  plugin.name = "refinery_inquiries"
14
13
  plugin.directory = "inquiries"
15
14
  plugin.menu_match = /(refinery|admin)\/inquir(ies|y_settings)$/
@@ -21,4 +20,4 @@ module Refinery
21
20
  end
22
21
  end
23
22
  end
24
- end
23
+ end
data/lib/gemspec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- version = '1.0.1'
2
+ version = '1.0.2'
3
3
  raise "Could not get version so gemspec can not be built" if version.nil?
4
4
  files = Dir.glob("**/*").flatten.reject do |file|
5
5
  file =~ /\.gem$/
@@ -7,14 +7,14 @@ end
7
7
 
8
8
  gemspec = <<EOF
9
9
  Gem::Specification.new do |s|
10
- s.name = %q{refinerycms-inquiries}
10
+ s.name = %q{cms-inquiries}
11
11
  s.version = %q{#{version}}
12
12
  s.date = %q{#{Time.now.strftime('%Y-%m-%d')}}
13
- s.summary = %q{Inquiry handling functionality for the Refinery CMS project.}
14
- s.description = %q{Inquiry handling functionality extracted from Refinery CMS to allow you to have a contact form and manage inquiries in the Refinery backend.}
15
- s.homepage = %q{http://refinerycms.com}
16
- s.email = %q{info@refinerycms.com}
17
- s.authors = ["Resolve Digital"]
13
+ s.summary = %q{Inquiry handling functionality for the CMS project.}
14
+ s.description = %q{Inquiry handling functionality extracted from CMS to allow you to have a contact form and manage inquiries in the backend.}
15
+ s.homepage = %q{http://www.mutalis.com}
16
+ s.email = %q{services_info@mutalis.com}
17
+ s.authors = ["Mutalis LLC"]
18
18
  s.require_paths = %w(lib)
19
19
 
20
20
  s.files = [
@@ -26,4 +26,4 @@ Gem::Specification.new do |s|
26
26
  end
27
27
  EOF
28
28
 
29
- File.open(File.expand_path("../../refinerycms-inquiries.gemspec", __FILE__), 'w').puts(gemspec)
29
+ File.open(File.expand_path("../../cms-inquiries.gemspec", __FILE__), 'w').puts(gemspec)
data/readme.md CHANGED
@@ -40,10 +40,4 @@ Go into your 'Inquiries' tab in the Refinery admin area and click on "Update who
40
40
 
41
41
  ## How do I Edit the Automatic Confirmation Email
42
42
 
43
- Go into your 'Inquiries' tab in the Refinery admin area and click on "Edit confirmation email"
44
-
45
- ## How do I change the from address from no-reply@com.au to no-reply@[mydomain].com.au
46
-
47
- Simply change the Refinery setting 'Tld Length' in the admin section from 1 to 2 and your domain name will be added.
48
-
49
- Note: This only affects top level domains that are two deep (ie: not .com or .org, but does affect .com.au etc).
43
+ Go into your 'Inquiries' tab in the Refinery admin area and click on "Edit confirmation email"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cms-inquiries
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mutalis LLC
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-06 00:00:00 Z
18
+ date: 2012-02-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: filters_spam
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: "0.2"
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
- description: Inquiry handling functionality that allow you to have a contact form and manage inquiries in the CMS backend.
35
+ description: Inquiry handling functionality extracted from CMS to allow you to have a contact form and manage inquiries in the backend.
36
36
  email: services_info@mutalis.com
37
37
  executables: []
38
38
 
@@ -41,63 +41,61 @@ extensions: []
41
41
  extra_rdoc_files: []
42
42
 
43
43
  files:
44
- - cms-inquiries.gemspec
45
- - app/controllers/inquiries_controller.rb
46
44
  - app/controllers/admin/inquiries_controller.rb
47
45
  - app/controllers/admin/inquiry_settings_controller.rb
48
- - app/views/inquiries/thank_you.html.erb
49
- - app/views/inquiries/new.html.erb
50
- - app/views/inquiry_mailer/confirmation.html.erb
51
- - app/views/inquiry_mailer/notification.html.erb
52
- - app/views/admin/inquiries/show.html.erb
46
+ - app/controllers/inquiries_controller.rb
47
+ - app/helpers/inquiries_helper.rb
48
+ - app/mailers/inquiry_mailer.rb
49
+ - app/models/inquiry.rb
50
+ - app/models/inquiry_setting.rb
51
+ - app/views/admin/inquiries/_inquiry.html.erb
53
52
  - app/views/admin/inquiries/_submenu.html.erb
54
53
  - app/views/admin/inquiries/index.html.erb
55
- - app/views/admin/inquiries/_inquiry.html.erb
56
- - app/views/admin/inquiry_settings/_notification_recipients_form.html.erb
54
+ - app/views/admin/inquiries/show.html.erb
57
55
  - app/views/admin/inquiry_settings/_confirmation_email_form.html.erb
56
+ - app/views/admin/inquiry_settings/_notification_recipients_form.html.erb
58
57
  - app/views/admin/inquiry_settings/edit.html.erb
59
- - app/helpers/inquiries_helper.rb
60
- - app/models/inquiry_setting.rb
61
- - app/models/inquiry.rb
62
- - app/mailers/inquiry_mailer.rb
63
- - spec/models/inquiry_spec.rb
64
- - features/support/paths.rb
65
- - features/support/factories.rb
66
- - features/manage_inquiries.feature
67
- - features/create_inquiries.feature
68
- - features/step_definitions/inquiry_steps.rb
69
- - lib/gemspec.rb
70
- - lib/inquiries.rb
71
- - lib/generators/refinerycms_inquiries_generator.rb
72
- - lib/refinerycms-inquiries.rb
73
- - db/migrate/20101208082840_create_inquiries.rb
74
- - db/migrate/20110719082646_drop_inquiry_settings_table.rb
75
- - db/migrate/20101208082841_remove_position_and_open_from_inquiries.rb
76
- - db/seeds/pages_for_inquiries.rb
77
- - readme.md
78
- - license.md
79
- - config/locales/sk.yml
58
+ - app/views/inquiries/new.html.erb
59
+ - app/views/inquiries/thank_you.html.erb
60
+ - app/views/inquiry_mailer/confirmation.html.erb
61
+ - app/views/inquiry_mailer/notification.html.erb
62
+ - cms-inquiries.gemspec
80
63
  - config/locales/cs.yml
81
- - config/locales/bg.yml
82
- - config/locales/nl.yml
83
- - config/locales/sl.yml
84
- - config/locales/sv.yml
85
- - config/locales/ru.yml
86
- - config/locales/pt-BR.yml
87
- - config/locales/zh-CN.yml
88
- - config/locales/lt.yml
89
64
  - config/locales/da.yml
65
+ - config/locales/de.yml
90
66
  - config/locales/en-GB.yml
67
+ - config/locales/en.yml
68
+ - config/locales/es.yml
69
+ - config/locales/fr.yml
91
70
  - config/locales/it.yml
92
71
  - config/locales/lolcat.yml
93
- - config/locales/nb.yml
94
- - config/locales/en.yml
72
+ - config/locales/lt.yml
95
73
  - config/locales/lv.yml
96
- - config/locales/fr.yml
97
- - config/locales/de.yml
98
- - config/locales/es.yml
74
+ - config/locales/nb.yml
75
+ - config/locales/nl.yml
99
76
  - config/locales/pl.yml
77
+ - config/locales/pt-BR.yml
78
+ - config/locales/ru.yml
79
+ - config/locales/sk.yml
80
+ - config/locales/sl.yml
81
+ - config/locales/sv.yml
82
+ - config/locales/zh-CN.yml
100
83
  - config/routes.rb
84
+ - db/migrate/20101208082840_create_inquiries.rb
85
+ - db/migrate/20101208082841_remove_position_and_open_from_inquiries.rb
86
+ - db/seeds/pages_for_inquiries.rb
87
+ - features/create_inquiries.feature
88
+ - features/manage_inquiries.feature
89
+ - features/step_definitions/inquiry_steps.rb
90
+ - features/support/factories.rb
91
+ - features/support/paths.rb
92
+ - lib/cms-inquiries.rb
93
+ - lib/gemspec.rb
94
+ - lib/generators/refinerycms_inquiries_generator.rb
95
+ - lib/inquiries.rb
96
+ - license.md
97
+ - readme.md
98
+ - spec/models/inquiry_spec.rb
101
99
  homepage: http://www.mutalis.com
102
100
  licenses: []
103
101
 
@@ -1,75 +0,0 @@
1
- bg:
2
- plugins:
3
- refinery_inquiries:
4
- title: Запитвания
5
- description: Осигурява форма за контакт и съхранение на запитвания
6
- inquiries:
7
- new:
8
- send: Изпращане на съобщение
9
- privacy_policy: Високо ценим Вашите лични данни
10
- admin:
11
- inquiries:
12
- delete: Изтриване на това запитване завинаги
13
- inquiry:
14
- read_inquiry: Прочит на запитването
15
- said: написа
16
- mark_as_spam: Отбелязване като спам
17
- mark_as_ham: 'Преместване във "Входящи"'
18
- submenu:
19
- inbox: Входящи
20
- spam: Спам
21
- update_notified: Получатели на уведомления
22
- edit_confirmation_email: Е-поща за потвърждение
23
- index:
24
- no_inquiries: Все още не сте получи запитвания.
25
- no_spam: Поздравления! Нямате никакъв спам.
26
- show:
27
- details: Подробности
28
- age: Възраст
29
- actions: Действия
30
- back_to_all_inquiries: Обратно към всички запитвания
31
- spam: Спам
32
- spam_yes: 'да'
33
- inquiry: Запитване
34
- to: До
35
- from: От
36
- click_to_email: Изпращане на е-поща до този адрес
37
- phone: Телефон
38
- date: Дата
39
- message: Съобщение
40
- inquiry_settings:
41
- notification_recipients_form:
42
- inquiry_settings_value_name: Изпращане на уведомления до
43
- hint: При получаване на ново запитване, Refinery, ще Ви уведоми по е-пощата.
44
- example: "Въведете адреса(или няколко) на Вашата е-поща. Например: jack@work.com, jill@office.com"
45
- confirmation_email_form:
46
- to: От
47
- from: До
48
- subject: Тема
49
- click_to_edit_subject: Цъкнете тук за редактиране на темата
50
- explanation: Всеки път, когато някой се свържи с Вас през уебсайта Ви, Refinery, ще изпраща е-поща до него за потвърждение.
51
- below_edit_email_sent: По-долу можете да редактирате писмото, което ще бъде изпратено.
52
- the_customer_making_inquiry: Запитващ
53
- message: Съобщение
54
- note: 'Забележка: Поставете текста "%name%", където бихте желали да се появи името на запитващия в писмото'
55
- inquiry_mailer:
56
- notification:
57
- greeting: Здравейте
58
- you_recieved_new_inquiry: Току що получихте ново запитване през Вашия уебсайт.
59
- inquiry_starts: --- Начало на запитването ---
60
- inquiry_ends: --- Край на запитването ---
61
- from: От
62
- email: Е-поща
63
- phone: Телефон
64
- message: Съобщение
65
- closing_line: Поздрави
66
- ps: 'П.П. Всички запитвания към Вас се съхраняват от Refinery в секция "Запитвания" и могат да бъдат прегледани по-късно.'
67
- activerecord:
68
- models:
69
- inquiry: запитване
70
- attributes:
71
- inquiry:
72
- name: Име
73
- email: Е-поща
74
- phone: Телефон
75
- message: Съобщение
@@ -1,11 +0,0 @@
1
- class DropInquirySettingsTable < ActiveRecord::Migration
2
- def self.up
3
- if ::InquirySetting.table_exists?
4
- drop_table ::InquirySetting.table_name
5
- end
6
- end
7
-
8
- def self.down
9
- # we don't want to restore inquiry settings table
10
- end
11
- end