Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial extraction from RefineryCMS core.

  • Loading branch information...
commit f6564a2c442dfb79b2f26c81e40353025a310b52 0 parents
Philip Arndt parndt authored
Showing with 1,714 additions and 0 deletions.
  1. +21 −0 MIT-LICENSE
  2. +32 −0 app/controllers/admin/inquiries_controller.rb
  3. +22 −0 app/controllers/admin/inquiry_settings_controller.rb
  4. +47 −0 app/controllers/inquiries_controller.rb
  5. +2 −0  app/helpers/inquiries_helper.rb
  6. +144 −0 app/models/inquiry.rb
  7. +20 −0 app/models/inquiry_mailer.rb
  8. +67 −0 app/models/inquiry_setting.rb
  9. +24 −0 app/views/admin/inquiries/_inquiry.html.erb
  10. +27 −0 app/views/admin/inquiries/_submenu.html.erb
  11. +26 −0 app/views/admin/inquiries/index.html.erb
  12. +74 −0 app/views/admin/inquiries/show.html.erb
  13. +26 −0 app/views/admin/inquiries/spam.html.erb
  14. +57 −0 app/views/admin/inquiry_settings/_confirmation_email_form.html.erb
  15. +24 −0 app/views/admin/inquiry_settings/_notification_recipients_form.html.erb
  16. +5 −0 app/views/admin/inquiry_settings/edit.html.erb
  17. +34 −0 app/views/inquiries/new.html.erb
  18. +1 −0  app/views/inquiries/thank_you.html.erb
  19. +1 −0  app/views/inquiry_mailer/confirmation.html.erb
  20. +18 −0 app/views/inquiry_mailer/notification.html.erb
  21. +68 −0 config/locales/da.yml
  22. +71 −0 config/locales/de.yml
  23. +76 −0 config/locales/en.yml
  24. +69 −0 config/locales/es.yml
  25. +66 −0 config/locales/fr.yml
  26. +67 −0 config/locales/it.yml
  27. +76 −0 config/locales/lv.yml
  28. +77 −0 config/locales/nb.yml
  29. +76 −0 config/locales/nl.yml
  30. +86 −0 config/locales/pt-BR.yml
  31. +79 −0 config/locales/ru.yml
  32. +68 −0 config/locales/sl.yml
  33. +73 −0 config/locales/zh-CN.yml
  34. +20 −0 config/routes.rb
  35. +22 −0 lib/inquiries.rb
  36. +31 −0 readme.md
  37. +17 −0 refinerycms-inquiries.gemspec
21 MIT-LICENSE
@@ -0,0 +1,21 @@
+# MIT License
+
+Copyright (c) 2005-2010 [Resolve Digital Ltd.](http://www.resolvedigital.co.nz)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
32 app/controllers/admin/inquiries_controller.rb
@@ -0,0 +1,32 @@
+class Admin::InquiriesController < Admin::BaseController
+
+ crudify :inquiry, :title_attribute => "name", :order => "created_at DESC"
+
+ before_filter :get_spam_count, :only => [:index, :spam]
+
+ def index
+ @inquiries = Inquiry.ham.with_query(params[:search]) if searching?
+
+ @grouped_inquiries = group_by_date(Inquiry.ham)
+ end
+
+ def spam
+ @inquiries = Inquiry.spam.with_query(params[:search]) if searching?
+
+ @grouped_inquiries = group_by_date(Inquiry.spam)
+ end
+
+ def toggle_spam
+ find_inquiry
+ @inquiry.toggle!(:spam)
+
+ redirect_to :back
+ end
+
+protected
+
+ def get_spam_count
+ @spam_count = Inquiry.count(:conditions => {:spam => true})
+ end
+
+end
22 app/controllers/admin/inquiry_settings_controller.rb
@@ -0,0 +1,22 @@
+class Admin::InquirySettingsController < Admin::BaseController
+
+ crudify :inquiry_setting, :title_attribute => "name", :order => 'name ASC', :redirect_to_url => "admin_inquiries_url"
+
+ before_filter :redirect_back_to_inquiries?, :only => [:index]
+ before_filter :set_url_override?, :only => [:edit]
+ after_filter :save_subject_for_confirmation?, :only => [:create, :update]
+
+protected
+ def save_subject_for_confirmation?
+ InquirySetting.confirmation_subject = params[:subject] if params.keys.include?('subject')
+ end
+
+ def redirect_back_to_inquiries?
+ redirect_to admin_inquiries_url
+ end
+
+ def set_url_override?
+ @url_override = admin_inquiry_setting_url(@inquiry_setting, :dialog => from_dialog?)
+ end
+
+end
47 app/controllers/inquiries_controller.rb
@@ -0,0 +1,47 @@
+class InquiriesController < ApplicationController
+
+ before_filter :find_page, :only => [:create, :new]
+
+ def index
+ redirect_to :action => "new"
+ end
+
+ def thank_you
+ @page = Page.find_by_link_url("/contact/thank_you", :include => [:parts, :slugs])
+ end
+
+ def new
+ @inquiry = Inquiry.new
+ end
+
+ def create
+ @inquiry = Inquiry.new(params[:inquiry])
+
+ if @inquiry.save
+ if @inquiry.ham?
+ begin
+ InquiryMailer.deliver_notification(@inquiry, request)
+ rescue
+ logger.warn "There was an error delivering an inquiry notification.\n#{$!}\n"
+ end
+
+ begin
+ InquiryMailer.deliver_confirmation(@inquiry, request)
+ rescue
+ logger.warn "There was an error delivering an inquiry confirmation:\n#{$!}\n"
+ end
+ end
+
+ redirect_to thank_you_inquiries_url
+ else
+ render :action => 'new'
+ end
+ end
+
+protected
+
+ def find_page
+ @page = Page.find_by_link_url('/contact', :include => [:parts, :slugs])
+ end
+
+end
2  app/helpers/inquiries_helper.rb
@@ -0,0 +1,2 @@
+module InquiriesHelper
+end
144 app/models/inquiry.rb
@@ -0,0 +1,144 @@
+class Inquiry < ActiveRecord::Base
+
+ validates :name, :presence => true
+ validates :message, :presence => true
+ validates :email, :format=> { :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i }
+
+ acts_as_indexed :fields => [:name, :email, :message, :phone]
+
+ scope :newest, :order => 'created_at DESC'
+
+ scope :ham, lambda {{:conditions => {:spam => false}, :order => 'created_at DESC'}}
+ scope :spam, lambda {{:conditions => {:spam => true}, :order => 'created_at DESC'}}
+
+ before_validation(:on => :create) { calculate_spam_score }
+
+ cattr_accessor :spam_words
+ self.spam_words = %w{
+ -online 4u 4-u acne adipex advicer baccarrat blackjack bllogspot booker buy byob carisoprodol
+ casino chatroom cialis coolhu credit-card-debt cwas cyclen cyclobenzaprine
+ day-trading debt-consolidation discreetordering duty-free dutyfree equityloans fioricet
+ freenet free\s*shipping gambling- hair-loss homefinance holdem incest jrcreations leethal levitra macinstruct
+ mortgagequotes nemogs online-gambling ottawavalleyag ownsthis paxil penis pharmacy phentermine
+ poker poze pussy ringtones roulette shemale shoes -site slot-machine thorcarlson
+ tramadol trim-spa ultram valeofglamorganconservatives viagra vioxx xanax zolus
+ }
+
+ def self.latest(number = 7, include_spam = false)
+ unless include_spam
+ ham.find(:all, :limit => number)
+ else
+ newest.find(:all, :limit => number)
+ end
+ end
+
+ def ham?
+ not spam?
+ end
+
+ def ham!
+ self.update_attribute(:spam, false)
+ end
+
+ def spam!
+ self.update_attribute(:spam, true)
+ end
+
+protected
+
+ # heavily based off http://github.com/rsl/acts_as_snook
+ # which is based off http://snook.ca/archives/other/effective_blog_comment_spam_blocker
+
+ def score_for_body_links
+ link_count = self.message.to_s.scan(/http:/).size
+ link_count > 2 ? -link_count : 2
+ end
+
+ def score_for_body_length
+ if self.message.to_s.length > 20 and self.message.to_s.scan(/http:/).size.zero?
+ 2
+ else
+ -1
+ end
+ end
+
+ def score_for_previous_inquiries
+ current_score = 0
+
+ Inquiry.find(:all, :conditions => {:email => email}).each do |i|
+ if i.spam?
+ current_score -= 1
+ else
+ current_score += 1
+ end
+ end
+
+ current_score
+ end
+
+ def score_for_spam_words
+ current_score = 0
+
+ spam_words.each do |word|
+ regex = /#{word}/i
+ current_score -= 1 if message =~ regex || name =~ regex || phone =~ regex
+ end
+
+ current_score
+ end
+
+ def score_for_suspect_url
+ current_score = 0
+
+ regex = /http:\/\/\S*(\.html|\.info|\?|&|free)/i
+ current_score =- (1 * message.to_s.scan(regex).size)
+ end
+
+ def score_for_suspect_tld
+ regex = /http:\/\/\S*\.(de|pl|cn)/i
+ message.to_s.scan(regex).size * -1
+ end
+
+ def score_for_lame_body_start
+ message.to_s.strip =~ /^(interesting|sorry|nice|cool)/i ? -10 : 0
+ end
+
+ def score_for_author_link
+ name.to_s.scan(/http:/).size * -2
+ end
+
+ def score_for_same_body
+ Inquiry.count(:conditions => {:message => message}) * -1
+ end
+
+ def score_for_consonant_runs
+ current_score = 0
+
+ [name, message, phone, email].each do |field|
+ field.to_s.scan(/[bcdfghjklmnpqrstvwxz]{5,}/).each do |run|
+ current_score =- run.size - 4
+ end
+ end
+
+ current_score
+ end
+
+ def calculate_spam_score
+ score = 0
+ score += score_for_body_links
+ score += score_for_body_length
+ score += score_for_previous_inquiries
+ score += score_for_spam_words
+ score += score_for_suspect_tld
+ score += score_for_lame_body_start
+ score += score_for_author_link
+ score += score_for_same_body
+ score += score_for_consonant_runs
+ self.spam = (score < 0)
+
+ logger.info("spam score was #{score}")
+
+ true
+ end
+
+end
20 app/models/inquiry_mailer.rb
@@ -0,0 +1,20 @@
+class InquiryMailer < ActionMailer::Base
+
+ def confirmation(inquiry, request)
+ subject InquirySetting.confirmation_subject.value
+ recipients inquiry.email
+ from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
+ reply_to InquirySetting.notification_recipients.value.split(',').first
+ sent_on Time.now
+ body :inquiry => inquiry
+ end
+
+ def notification(inquiry, request)
+ subject InquirySetting.notification_subject.value
+ recipients InquirySetting.notification_recipients.value
+ from "\"#{RefinerySetting[:site_name]}\" <no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}>"
+ sent_on Time.now
+ body :inquiry => inquiry
+ end
+
+end
67 app/models/inquiry_setting.rb
@@ -0,0 +1,67 @@
+class InquirySetting < ActiveRecord::Base
+
+ def self.confirmation_body
+ find_or_create_by_name( :name => "Confirmation Body",
+ :value => "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.",
+ :destroyable => false)
+ end
+
+ def self.confirmation_subject
+ find_or_create_by_name( :name => "Confirmation Subject",
+ :value => "Thank you for your inquiry",
+ :destroyable => false)
+ end
+
+ def self.confirmation_subject=(value)
+ subject = find_or_create_by_name(:name => "Confirmation Subject",
+ :destroyable => false,
+ :value => value)
+ subject.update_attribute(:value, value)
+ end
+
+ def self.notification_recipients
+ find_or_create_by_name( :name => "Notification Recipients",
+ :destroyable => false)
+ end
+
+ def self.notification_subject
+ find_or_create_by_name( :name => "Notification Subject",
+ :value => "New inquiry from your website",
+ :destroyable => false)
+ end
+
+ def deletable?
+ false
+ end
+
+ # Access method that allows dot notation to work.
+ # Say you had a setting called "site_name". You could access that by going RefinerySetting[:site_name]
+ # but with this you can also access that by going RefinerySettting.site_name
+ def self.method_missing(method, *args)
+ method_name = method.to_s
+ super(method, *args)
+
+ rescue NoMethodError
+ if method_name =~ /=$/
+ self[method_name.gsub('=', '')] = args.first
+ else
+ self[method_name]
+ end
+ end
+
+ def self.find_or_set(name, the_value)
+ find_or_create_by_name(:name => name.to_s, :value => the_value).value
+ end
+
+ def self.[](name)
+ setting = self.find_by_name(name.to_s)
+ setting.value unless setting.nil?
+ end
+
+ def self.[]=(name, value)
+ setting = find_or_create_by_name(name.to_s)
+ setting.value = value
+ setting.save
+ end
+
+end
24 app/views/admin/inquiries/_inquiry.html.erb
@@ -0,0 +1,24 @@
+<li class='clearfix record <%= cycle("on", "on-hover") %>'>
+ <span class='title'>
+ <%= link_to inquiry.name, admin_inquiry_url(inquiry) %> <%= t('.said') %>
+ <span class="preview"><%= truncate(strip_tags(inquiry.message), :length => 60) -%></span>
+ </span>
+ <span class='actions'>
+ <%= link_to refinery_icon_tag('delete.png'), admin_inquiry_url(inquiry),
+ :class => "cancel confirm-delete",
+ :title => t('admin.inquiries.delete'),
+ :'data-confirm' => t('shared.admin.delete.message', :title => inquiry.name),
+ :'data-method' => "delete" -%>
+
+ <%= link_to refinery_icon_tag('zoom.png'), admin_inquiry_url(inquiry),
+ :title => t('.read_inquiry') -%>
+
+ <% if inquiry.spam? %>
+ <%= link_to refinery_icon_tag('email.png'), toggle_spam_admin_inquiry_url(inquiry),
+ :title => t('.mark_as_ham') -%>
+ <% else %>
+ <%= link_to refinery_icon_tag('bin_closed.png'), toggle_spam_admin_inquiry_url(inquiry),
+ :title => t('.mark_as_spam') -%>
+ <% end %>
+ </span>
+</li>
27 app/views/admin/inquiries/_submenu.html.erb
@@ -0,0 +1,27 @@
+<div id='actions'>
+ <ul>
+ <li>
+ <%= render :partial => "/shared/admin/search", :locals => {:url => request.path} %>
+ </li>
+ <li <%= "class='selected'" if params[:action] == "index" %>>
+ <%= link_to t('.inbox'), admin_inquiries_url, :class => "email_icon" %>
+ </li>
+ <li <%= "class='selected'" if params[:action] == "spam" %>>
+ <% if @spam_count > 0 %>
+ <%= link_to "#{t('.spam')} (#{@spam_count})", spam_admin_inquiries_url, :class => "spam_icon" %>
+ <% else %>
+ <%= link_to t('.spam'), spam_admin_inquiries_url, :class => "spam_empty_icon" %>
+ <% end %>
+ </li>
+ <li>
+ <%= link_to t('.update_notified'),
+ edit_admin_inquiry_setting_url(InquirySetting.notification_recipients, :dialog => true, :height => 300),
+ :class => "user_comment_icon" %>
+ </li>
+ <li>
+ <%= link_to t('.edit_confirmation_email'),
+ edit_admin_inquiry_setting_url(InquirySetting.confirmation_body, :dialog => true),
+ :class => "edit_email_icon" %>
+ </li>
+ </ul>
+</div>
26 app/views/admin/inquiries/index.html.erb
@@ -0,0 +1,26 @@
+<%= render :partial => "submenu" %>
+<div id='records'>
+ <% if searching? %>
+ <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
+ <% if @inquiries.any? %>
+ <ul>
+ <%= render :partial => "inquiry", :collection => @inquiries %>
+ </ul>
+ <% else %>
+ <p><%= t('shared.admin.search.no_results') %></p>
+ <% end %>
+ <% else %>
+ <% if @grouped_inquiries.any? -%>
+ <% @grouped_inquiries.each do |container| %>
+ <h3><%= l((inquiry_group = container.last).first.created_at) %></h3>
+ <ul>
+ <%= render :partial => 'inquiry', :collection => inquiry_group %>
+ </ul>
+ <% end %>
+ <% else -%>
+ <p>
+ <strong><%= t('.no_inquiries') %></strong>
+ </p>
+ <% end -%>
+ <% end %>
+</div>
74 app/views/admin/inquiries/show.html.erb
@@ -0,0 +1,74 @@
+<div id='actions'>
+ <h2><%= t('.details')%></h2>
+ <p>
+ <strong><%= t('.age') %>:</strong> <%= time_ago_in_words(@inquiry.created_at) %>
+ </p>
+ <% if @inquiry.spam? %>
+ <p>
+ <strong><%= t('.spam') %>:</strong> <%= t('.spam_yes') %>
+ </p>
+ <% end %>
+ <h2><%= t('.actions') %></h2>
+ <ul>
+ <li>
+ <%= link_to t('.back_to_all_inquiries'), {:action => 'index'}, :class => "back_icon" %>
+ </li>
+ <li>
+ <%= link_to t('admin.inquiries.delete'),
+ admin_inquiry_url(@inquiry),
+ :class => 'delete_icon no-tooltip confirm-delete',
+ :title => t('admin.inquiries.delete'),
+ :'data-confirm' => t('shared.admin.delete.message', :title => @inquiry.name),
+ :'data-method' => "delete" %>
+ </li>
+ </ul>
+</div>
+<div id='records'>
+ <h2><%= t('.inquiry') %></h2>
+ <table id='inquiry'>
+ <tr>
+ <td>
+ <strong><%= t('.to') %></strong>
+ </td>
+ <td>
+ <%= RefinerySetting[:site_name] %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <strong><%= t('.from') %></strong>
+ </td>
+ <td>
+ <%= @inquiry.name %> [<%= mail_to @inquiry.email, @inquiry.email, {:title => t('.click_to_email')} %>]
+ </td>
+ </tr>
+ <% unless @inquiry.phone.blank? %>
+ <tr>
+ <td>
+ <strong><%= t('.phone') %></strong>
+ </td>
+ <td>
+ <%= @inquiry.phone %>
+ </td>
+ </tr>
+ <% end %>
+ <tr>
+ <td>
+ <strong><%= t('.date') %></strong>
+ </td>
+ <td>
+ <%= l(Date.parse(@inquiry.created_at.to_s), :format => :long) %>
+ </td>
+ </tr>
+ <tr>
+ <td valign='top'>
+ <strong><%= t('.message') %></strong>
+ </td>
+ <td>
+ <p style='margin-top: 0px'>
+ <%= @inquiry.message.gsub("\r\n\r\n", "\r\n").gsub("\r\n", "</p><p>") %>
+ </p>
+ </td>
+ </tr>
+ </table>
+</div>
26 app/views/admin/inquiries/spam.html.erb
@@ -0,0 +1,26 @@
+<%= render :partial => "submenu" %>
+<div id='records'>
+ <% if searching? %>
+ <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
+ <% if @inquiries.any? %>
+ <ul>
+ <%= render :partial => "inquiry", :collection => @inquiries %>
+ </ul>
+ <% else %>
+ <p><%= t('shared.admin.search.no_results') %></p>
+ <% end %>
+ <% else %>
+ <% if @grouped_inquiries.any? -%>
+ <% @grouped_inquiries.each do |container| %>
+ <h3><%= l((inquiry_group = container.last).first.created_at) %></h3>
+ <ul>
+ <%= render :partial => 'inquiry', :collection => inquiry_group %>
+ </ul>
+ <% end %>
+ <% else -%>
+ <p>
+ <strong><%= t('.no_spam') %></strong>
+ </p>
+ <% end -%>
+ <% end %>
+</div>
57 app/views/admin/inquiry_settings/_confirmation_email_form.html.erb
@@ -0,0 +1,57 @@
+<%= form_for([:admin, @inquiry_setting], :url => (@url_override || @url)) do |f| %>
+
+ <p>
+ <%= t('.explanation') %>
+ </p>
+ <p>
+ <%= t('.below_edit_email_sent') %>
+ </p>
+ <table id='inquiry'>
+ <tr>
+ <td>
+ <label class='stripped'><%= t('.to') %></label>
+ </td>
+ <td>
+ <%= t('.the_customer_making_inquiry') %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label class='stripped'><%= t('.from') %></label>
+ </td>
+ <td>
+ <%= "#{RefinerySetting[:site_name]} &lt;no-reply@#{request.domain(RefinerySetting.find_or_set(:tld_length, 1))}&gt;".html_safe %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label class='stripped'><%= t('.subject') %></label>
+ </td>
+ <td>
+ <%= text_field_tag 'subject', InquirySetting.confirmation_subject.value,
+ :class => 'widest' %>
+ </td>
+ </tr>
+ <tr>
+ <td valign='top'>
+ <%= f.label :value, t('.message'),
+ :class => 'stripped' %>
+ </td>
+ <td>
+ <%= f.text_area :value,
+ :rows => "5",
+ :class => 'widest' %>
+ <br/>
+ <em><%= t('.note') %></em>
+ </td>
+ </tr>
+ </table>
+
+ <%= render :partial => "/shared/admin/form_actions",
+ :locals => {
+ :f => f,
+ :continue_editing => false,
+ :cancel_url => admin_inquiries_url,
+ :hide_delete => true
+ } %>
+<% end %>
24 app/views/admin/inquiry_settings/_notification_recipients_form.html.erb
@@ -0,0 +1,24 @@
+<%= form_for([:admin, @inquiry_setting], :url => (@url_override || @url)) do |f| %>
+
+ <div class='field'>
+ <span class='label_with_help'>
+ <%= f.label :value, t('.inquiry_settings_value_name') %>
+ </span>
+ <%= f.text_field :value, :class => "larger widest" %>
+ </div>
+
+ <p>
+ <%= t('.hint') %>
+ </p>
+ <p>
+ <%= t('.example') %>
+ </p>
+
+ <%= render :partial => "/shared/admin/form_actions",
+ :locals => {
+ :f => f,
+ :continue_editing => false,
+ :cancel_url => admin_inquiries_url,
+ :hide_delete => true
+ } %>
+<% end %>
5 app/views/admin/inquiry_settings/edit.html.erb
@@ -0,0 +1,5 @@
+<% if @inquiry_setting.name == "Notification Recipients" %>
+ <%= render :partial => "notification_recipients_form", :locals => {:edit => true} -%>
+<% else %>
+ <%= render :partial => "confirmation_email_form", :locals => {:edit => true} -%>
+<% end %>
34 app/views/inquiries/new.html.erb
@@ -0,0 +1,34 @@
+<% content_for :body_content_left do %>
+ <div class='inquiries'>
+ <%=raw @page[Page.default_parts.first.to_sym] %>
+
+ <%= form_for @inquiry do |f| %>
+ <%= render :partial => "/shared/admin/error_messages",
+ :locals => {
+ :object => @inquiry,
+ :include_object_name => true
+ } %>
+ <div class='field'>
+ <%= f.required_label :name %>
+ <%= f.text_field :name %>
+ </div>
+ <div class='field'>
+ <%= f.required_label :email %>
+ <%= f.text_field :email %>
+ </div>
+ <div class='field'>
+ <%= f.label :phone %>
+ <%= f.text_field :phone %>
+ </div>
+ <div class='field message_field'>
+ <%= f.required_label :message %>
+ <%= f.text_area :message, :rows => 8 %>
+ </div>
+ <div class='actions'>
+ <%= f.submit t('.send') %>
+ <%= link_to t('.privacy_policy'), "/pages/privacy-policy", :id => "privacy_link" if RefinerySetting.find_or_set(:show_contact_privacy_link, false) %>
+ </div>
+ <% end %>
+ </div>
+<% end %>
+<%= render :partial => "/shared/content_page" %>
1  app/views/inquiries/thank_you.html.erb
@@ -0,0 +1 @@
+<%= render :partial => "/shared/content_page" %>
1  app/views/inquiry_mailer/confirmation.html.erb
@@ -0,0 +1 @@
+<%= InquirySetting.confirmation_body.value.gsub("%name%", @inquiry.name) %>
18 app/views/inquiry_mailer/notification.html.erb
@@ -0,0 +1,18 @@
+<%= t('.greeting') %>,
+
+<%= t('.you_recieved_new_inquiry') %>
+
+<%= t('.inquiry_starts') %>
+
+<%= t('.from') %>: <%= @inquiry.name %>
+<%= t('.email') %>: <%= @inquiry.email %>
+<%= t('.phone') %>: <%= @inquiry.phone %>
+<%= t('.message') %>:
+<%= @inquiry.message %>
+
+<%= t('.inquiry_ends') %>
+
+<%= t('.closing_line') %>,
+<%= RefinerySetting[:site_name] %>
+
+<%= t('.ps') %>
68 config/locales/da.yml
@@ -0,0 +1,68 @@
+da:
+ plugins:
+ refinery_inquiries:
+ title: Henvendelser
+ activerecord:
+ models:
+ inquiry: Henvendelse
+ attributes:
+ inquiry:
+ to: Til
+ from: Fra
+ click_to_email: Send en e-mail til adressen
+ phone: Telefon
+ date: Dato
+ message: Besked
+ inquiries:
+ new:
+ header_message: "Der er et mindre problem"
+ message: "Følgende skal rettes:"
+ send: Send besked
+ privacy_policy: "Vi værner om dine personlige oplysninger"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: Flyt til lukkede henvendelser
+ move_inquiry_to_open: Flyt til åbne henvendelser
+ read_inquiry: Læs henvendelse
+ remove_inquiry: "Er du sikker på du vil slette denne henvendelse fra '%{name}'?"
+ title: Slet henvendelse.
+ toggle_status:
+ closed: "Henvendelsen '%{inquiry}' er lukket"
+ reopened: "Henvendelsen '%{inquiry}' er genåbnet"
+ index:
+ search_results_for: "Søgeresultat for '%{query}'"
+ no_inquiries: Du har endnu ikke modtaget nogen henvendelser.
+ show:
+ details: Detaljer
+ click_to_email: Send en e-mail til adressen
+ status: Status
+ open: "Åben"
+ closed: Lukket
+ age: Tid siden modtagelse
+ actions: Handlinger
+ back_to_all_inquiries: Tilbage til alle henvendelser
+ inquiry: Henvendelse
+ submenu:
+ update_notified: Opdatér, hvem der får besked
+ edit_confirmation_email: Redigér e-mailbekræftelse
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' er opdateret."
+ notification_recipients_form:
+ inquiry_settings_value_name: Send besked til
+ explanation: "Hver gang kontaktformularen benyttes, sender Refinery en e-mail med besked om, at der er modtaget en ny henvendelse"
+ hint: "Indtast en e-mail-adresse ovenfor. Skal beskeden sendes til mere end en person, så indtast flere adresser adskilt med kommaer."
+ example: "Fx mig@domæne.dk, ven@hotmail.com, kollega@arbejde.dk"
+ confirmation_email_form:
+ to: Til
+ from: Fra
+ subject: Emne
+ click_to_edit_subject: Klik her for at redigere emnet
+ explanation: "Hver gang kontaktformularen benyttes, sender Refinery en e-mail til den person, der udfyldte formularen, for at bekræfte henvendelsen."
+ below_edit_email_sent: Nedenfor kan du redigere e-mailen, der sendes ud.
+ the_customer_making_inquiry: Kunden, der har henvendt sig
+ message: Besked
+ note: "Bemærk: Anbring teksten %name%, der hvor du vil have kundens navn skal være i e-mailen"
+ subject_form:
+ subject_value_name: Emne
71 config/locales/de.yml
@@ -0,0 +1,71 @@
+de:
+ plugins:
+ refinery_inquiries:
+ title: Kontaktanfragen
+ activerecord:
+ models:
+ inquiry: Kontaktanfrage
+ attributes:
+ inquiry:
+ to: An
+ from: Von
+ click_to_email: E-Mail an diese Adresse schreiben
+ phone: Telefon
+ date: Datum
+ message: Nachricht
+ inquiries:
+ new:
+ header_message: "Es gab ein kleines Problem"
+ message: "Die folgenden Probleme müssen behoben werden:"
+ send: Nachricht senden
+ privacy_policy: "Ihre Privatsphäre ist uns wichtig"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: Diese Kontaktanfrage zu geschlossenen Anfragen verschieben
+ move_inquiry_to_open: Diese Kontaktanfrage zu offenen Anfragen verschieben
+ read_inquiry: Kontaktanfrage lesen
+ remove_inquiry: "Sind Sie sicher, dass Sie die Kontaktanfrage von '%{name}' wirklich löschen möchten?"
+ title: Diese Kontaktanfrage für immer löschen.
+ toggle_status:
+ closed: "Kontaktanfrage '%{inquiry}' ist geschlossen"
+ reopened: "Kontaktanfrage '%{inquiry}' ist neu geöffnet"
+ index:
+ search_results_for: Suchergebnisse für %{query}
+ open_inquiries: Offene Anfragen
+ no_inquiries: "Juhuu! Es gibt keine offenen Kontaktanfragen, da Sie bereits alle Anfragen abgearbeitet haben."
+ closed_inquiries: Geschlossene Kontaktanfragen
+ havent_closed_any_inquiries: "Sie haben noch keine Kontaktanfragen geschlossen."
+ show:
+ details: Details
+ click_to_email: E-Mail senden
+ status: Status
+ open: Offen
+ closed: Geschlossen
+ age: Alter
+ actions: Aktionen
+ back_to_all_inquiries: Zurück zu allen Kontaktanfragen
+ inquiry: Kontaktanfrage
+ submenu:
+ update_notified: Wer wird benachrichtigt aktualisieren
+ edit_confirmation_email: Bestätigungsmail bearbeiten
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' wurde erfolgreich aktualisiert."
+ notification_recipients_form:
+ inquiry_settings_value_name: Benachrichtigungen senden an
+ explanation: "Jedesmal wenn jemand Sie auf Ihrer Webseite kontaktiert, wird eine E-Mail mit einem Hinweis zur neuen Kontaktanfrage versendet."
+ hint: "Geben Sie eine E-Mail-Adresse ein. Soll die Benachrichtigung an mehrere Personen versendet werden? Geben Sie mehrere E-Mail-Adresse Komma-Separiert ein."
+ example: "z.B. me@domain.com, friend@msn.com, workmate@work.com"
+ confirmation_email_form:
+ to: An
+ from: Von
+ subject: Betreff
+ click_to_edit_subject: Klicken Sie hier, um den Betreff zu bearbeiten
+ explanation: "Jedesmal wenn jemand Sie auf Ihrer Webseite kontaktiert, wird eine E-mail an die anfragende Person zur Bestätigung der Kontaktanfrage versendet."
+ below_edit_email_sent: Unten können Sie die E-Mail bearbeiten, die versendet wird.
+ the_customer_making_inquiry: Der Kunde, der die Kontaktanfrage gestellt hat.
+ message: Nachricht
+ note: "Hinweis: Verwenden Sie den Text %name% um den Namen des Kunden in der E-Mail einzufügen."
+ subject_form:
+ subject_value_name: Betreff
76 config/locales/en.yml
@@ -0,0 +1,76 @@
+en:
+ plugins:
+ refinery_inquiries:
+ title: Inquiries
+ inquiries:
+ new:
+ send: Send message
+ privacy_policy: We value your privacy
+ admin:
+ inquiries:
+ delete: Remove this inquiry forever
+ inquiry:
+ read_inquiry: Read the inquiry
+ said: said
+ mark_as_spam: Mark as spam
+ mark_as_ham: Move to inbox
+ submenu:
+ inbox: Inbox
+ spam: Spam
+ update_notified: Update who gets notified
+ edit_confirmation_email: Edit confirmation email
+ index:
+ no_inquiries: You have not received any inquiries yet.
+ spam:
+ no_spam: Hooray! You don't have any spam.
+ show:
+ details: Details
+ age: Age
+ actions: Actions
+ back_to_all_inquiries: Back to all Inquiries
+ spam: Spam
+ spam_yes: 'yes'
+ inquiry: Inquiry
+ to: To
+ from: From
+ click_to_email: Click to email this address
+ phone: Phone
+ date: Date
+ message: Message
+ inquiry_settings:
+ notification_recipients_form:
+ inquiry_settings_value_name: Send notifications to
+ explanation: Every time someone contacts you on your website, Refinery sends out an email to say there is a new inquiry.
+ hint: When a new inquiry is submitted, Refinery will send an email notification to you.
+ example: "Enter your email address(es) like: jack@work.com, jill@office.com"
+ confirmation_email_form:
+ to: To
+ from: From
+ subject: Subject
+ click_to_edit_subject: Click here to edit the subject
+ explanation: Every time someone contacts you on your website, Refinery sends out an email to confirm the inquiry with the person who made it.
+ below_edit_email_sent: Below you can edit the email that is sent out.
+ the_customer_making_inquiry: The customer making the inquiry
+ message: Message
+ note: "Note: place the text %name% where you'd like the customer's name to appear in the email"
+ inquiry_mailer:
+ notification:
+ greeting: Hi there
+ you_recieved_new_inquiry: You just received a new inquiry on your website.
+ inquiry_starts: --- inquiry starts ---
+ inquiry_ends: --- inquiry ends ---
+ from: From
+ email: Email
+ phone: Phone
+ message: Message
+ closing_line: Kind Regards
+ ps: P.S. All your inquiries are stored in the "Inquiries" section of Refinery should you ever want to view it later there.
+ activerecord:
+ models:
+ inquiry: inquiry
+ attributes:
+ inquiry:
+ name: Name
+ email: Email
+ phone: Phone
+ message: Message
69 config/locales/es.yml
@@ -0,0 +1,69 @@
+es:
+ plugins:
+ refinery_inquiries:
+ title: Consultas
+ activerecord:
+ models:
+ inquiry: Consulta
+ attributes:
+ inquiry:
+ to: Para
+ from: De
+ click_to_email: Dale Click a este email
+ phone: Telefono
+ date: Fecha
+ name: Nombre
+ message: Mensaje
+ inquiries:
+ new:
+ header_message: "Mil disculpas hay un pequeño problema."
+ message: "Los siguientes problemas necesitan ser corregidos:"
+ send: Enviar mensaje
+ privacy_policy: "Nosotros valoramos tu privacidad"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: Cambiar esta consulta a cerrada
+ move_inquiry_to_open: Cambiar esta consulta a abierta
+ read_inquiry: Leer esta consulta
+ remove_inquiry: "Estas seguro que quieres borrar esta consulta de '%{name}'?"
+ title: Quitar esta consulta.
+ toggle_status:
+ closed: "La consulta '%{inquiry}' esta cerrada"
+ reopened: "La consulta '%{inquiry}' esta abierta"
+ index:
+ search_results_for: Resultados de la busqueda de %{query}
+ no_inquiries: No has recibido ninguna consulta aun.
+ show:
+ details: Detalles
+ click_to_email: Click al email
+ status: Estatus
+ open: Abierto
+ closed: Cerrado
+ age: Edad
+ actions: Acciones
+ back_to_all_inquiries: Regresar a todas las consultas
+ inquiry: Consulta
+ submenu:
+ update_notified: "Actualizar a quien será notificado"
+ edit_confirmation_email: "Editar email de confirmación"
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' fue actualizado exitosamente."
+ notification_recipients_form:
+ inquiry_settings_value_name: Mandar notificaciones a
+ explanation: "Cada vez que alguien se comunique con usted en su sitio web, Refinery enviara un correo electrónico respecto a esta nueva consulta."
+ hint: "Ingrese una dirección de correo. Ingrese la dirección de correo de las persona que vaya a ser notificada, si quiere que varias personas sean notificadas ingrese las direcciones de correo separadas por comas."
+ example: "Ejemplo: me@domain.com, friend@msn.com, workmate@work.com"
+ confirmation_email_form:
+ to: Para
+ from: De
+ subject: Asunto
+ click_to_edit_subject: Click aqui para modificar el asunto
+ explanation: "Cada vez que alguien se comunique con usted en su sitio web, Refinery enviara un correo electrónico respecto a esta nueva consulta."
+ below_edit_email_sent: "Abajo usted puede editar el email a donde la consulta será enviado."
+ the_customer_making_inquiry: El cliente haciendo la consulta
+ message: Mensaje
+ note: "Nota: ingrese el texto %name% donde quiera que el nombre del cliente aparezca en el email"
+ subject_form:
+ subject_value_name: Asunto
66 config/locales/fr.yml
@@ -0,0 +1,66 @@
+fr:
+ plugins:
+ refinery_inquiries:
+ title: Requêtes
+ activerecord:
+ models:
+ inquiry: Demandes de renseignements
+ attributes:
+ inquiry:
+ to: "À"
+ from: "De"
+ click_to_email: Cliquer pour envoyez un couriel à cette adresse
+ phone: Téléphone
+ date: Date
+ message: Message
+ inquiries:
+ new:
+ header_message: "Oops, il y a eu une petit erreur"
+ message: "Le problème suivant doit être corrigé:"
+ send: Envoyez le message
+ privacy_policy: "Nous respectons votre vie privée"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: Marqué cette requête comme 'fermé'
+ move_inquiry_to_open: Marqué cette requête comme 'ouverte'
+ read_inquiry: Lire la demande de renseignement
+ remove_inquiry: "Êtes-vous sûr de vouloir supprimer la demande de renseignement de '%{name}'?"
+ title: Supprimer cette demande de renseignement pour toujours.
+ toggle_status:
+ closed: "La demande de renseignement '%{inquiry}' est fermé"
+ reopened: "La demande de renseignement '%{inquiry}' est rouverte"
+ index:
+ search_results_for: "Résultat de recherche pour %{query}"
+ open_inquiries: Demande de renseignement ouverte
+ no_inquiries: "Hourra! Il n'y a pas de requête ouvertes, vous les avez toutes faites."
+ closed_inquiries: Demande de renseignement fermé
+ havent_closed_any_inquiries: "Vous n'avez pas de demande de renseignements fermé pour le moment."
+ show:
+ details: "Détails"
+ click_to_email: Cliquer pour envoyé un couriel
+ status: Statut
+ open: Ouvert
+ closed: Fermé
+ age: Age
+ actions: Actions
+ back_to_all_inquiries: Retourné à la liste de requêtes
+ inquiry: Requête
+ submenu:
+ update_notified: "Mettre à jour qui est notifié"
+ edit_confirmation_email: Modifier le couriel de confirmation
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' a été mis à jour."
+ notification_recipients_form:
+ inquiry_settings_value_name: Envoyer des notifications à
+ explanation: "Chaque fois que quelqu'un vous contact sur votre site, Refinery envoie un couriel pour dire qu'il ya une nouvelle requête."
+ hint: "Entrez une adresse e-mail ci-dessus. Voulez-vous envoyez la notification à plus d'une personne? Entrez plusieurs adresses e-mail séparées par des virgules."
+ example: "Par exemple: me@domain.com, friend@msn.com, workmate@work.com"
+ confirmation_email_form:
+ click_to_edit_subject: Cliquez ici pour modifier le sujet du couriel
+ explanation: "Chaque fois que quelqu'un vous contacts sur votre site, Refinery envoie un couriel à la personne qui l'a fait pour confirmer la requête."
+ below_edit_email_sent: Ci-dessous vous pouvez modifier le message qui est envoyé.
+ the_customer_making_inquiry: Le client qui fait la demande
+ subject_form:
+ subject_value_name: Sujet
67 config/locales/it.yml
@@ -0,0 +1,67 @@
+it:
+ plugins:
+ refinery_inquiries:
+ title: Richieste di informazioni
+ activerecord:
+ models:
+ inquiry: Inchiesta
+ attributes:
+ inquiry:
+ to: A
+ from: Da
+ click_to_email: Clicca per questo indirizzo e-mail
+ phone: Telefono
+ date: Data
+ message: Messaggio
+ inquiries:
+ new:
+ header_message: "Un problema si è verificato"
+ message: "I seguenti problemi devono essere corretti:"
+ send: Invia messaggio
+ privacy_policy: "Noi diamo valore alla tua privacy"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: Spostare questa inchiesta chiusa
+ move_inquiry_to_open: Spostare questa indagine per aprire
+ read_inquiry: Leggi l'inchiesta
+ remove_inquiry: "Sei sicuro di voler cancellare la richiesta di '%{name}'?"
+ title: Rimuovere questa indagine per sempre.
+ toggle_status:
+ closed: "Inchiesta '%{inquiry}' è chiuso"
+ reopened: "Inchiesta '%{inquiry}' si riapre"
+ index:
+ no_inquiries: Non hai ancora ricevuto alcuna richiesta in.
+ show:
+ details: Dettagli
+ click_to_email: Clicca per e-mail
+ status: Stato
+ open: Aperto
+ closed: Chiuso
+ age: Età
+ actions: Azioni
+ back_to_all_inquiries: Torna a tutte le richieste
+ inquiry: Inchiesta
+ submenu:
+ update_notified: Aggiornamento chi viene notificata
+ edit_confirmation_email: Modifica email di conferma
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' stato aggiornato con successo."
+ notification_recipients_form:
+ inquiry_settings_value_name: Invia a notifiche
+ explanation: "Ogni volta che qualcuno ti contatti sul suo sito web, Refinery invia una mail a dire che c'è una nuova indagine."
+ hint: "Inserisci un indirizzo email di cui sopra. Vuoi la notifica di andare a più di una persona? Inserisci più indirizzi email separati da virgole."
+ example: "E.g. me@domain.com, friend@msn.com, workmate@work.com"
+ confirmation_email_form:
+ to: A
+ from: Da
+ subject: Soggetto
+ click_to_edit_subject: Clicca qui per modificare l'oggetto
+ explanation: "Ogni volta che qualcuno ti contatti sul suo sito web, Refinery invia una e-mail per confermare la richiesta con la persona che ha reso."
+ below_edit_email_sent: Qui di seguito è possibile modificare l'e-mail che viene inviata.
+ the_customer_making_inquiry: Il cliente rendendo l'indagine
+ message: Messaggio
+ note: "Nota: inserire il testo %name% dove desideri che il nome del cliente a comparire nella e-mail"
+ subject_form:
+ subject_value_name: Soggetto
76 config/locales/lv.yml
@@ -0,0 +1,76 @@
+lv:
+ plugins:
+ refinery_inquiries:
+ title: Pieprasījumi
+ inquiries:
+ new:
+ send: Sūtīt ziņu
+ privacy_policy: Mēs cienam Jūsu privātumu
+ admin:
+ inquiries:
+ delete: Dzēst šo pieprasījumu
+ inquiry:
+ read_inquiry: Lasīt pieprasījumu
+ said: sacīja
+ mark_as_spam: Atzīmēt kā spamu
+ mark_as_ham: Pārvietot uz ienākošajiem
+ submenu:
+ inbox: Ienākošie
+ spam: Spams
+ update_notified: Atjaunot paziņojumu saņēmēju
+ edit_confirmation_email: Labot apstiprinājuma epastu
+ index:
+ no_inquiries: Nav saņemts neviens pieprasījums.
+ spam:
+ no_spam: Urā! Jums nav neviens pieprasījums, kas būtu spams.
+ show:
+ details: Detaļas
+ age: Vecums
+ actions: Darbības
+ back_to_all_inquiries: Atgriezties pie visiem pieprasījumiem
+ spam: Spams
+ spam_yes:
+ inquiry: Pieprasījums
+ to: Kam
+ from: 'No'
+ click_to_email: Click to email this address
+ phone: Tālrunis
+ date: Datums
+ message: Ziņa
+ inquiry_settings:
+ notification_recipients_form:
+ inquiry_settings_value_name: Sūtīt paziņojumu uz
+ explanation: Katru reizi, kad kāds ar tevi sazinās izmantojot kontaktformu, Refinery nosūta epastu par to, ka ir jauns pieprasījums.
+ hint: Kad tiek iesniegts jauns pieprasījums, tad Refinery nosūtīs paziņojumu uz šo epastu.
+ example: "Ievadi savu epasta(-u) adresi(-es) šādā formātā: janis.ozols@test.lv, juris@test.lv"
+ confirmation_email_form:
+ to: Saņēmējs
+ from: Adresāts
+ subject: Tēma
+ click_to_edit_subject: Spied šeit, lai labotu tēmu
+ explanation: Katru reizi, kad kāds sazinās ar tevi izmantojot kontakformu Refinery nosūta apstiprinājuma epastu personai, kura iesniegusi pieprasījumu.
+ below_edit_email_sent: Zemāk vari labot epasta saturu, kas tiek izsūtīts.
+ the_customer_making_inquiry: Klients, kurš izveidoja pieprasījumu
+ message: Ziņa
+ note: "Piezīme: ievieto šo tektstu %name% tur, kur tu epastā vēlies norādīt klienta vārdu"
+ inquiry_mailer:
+ notification:
+ greeting: Sveicināts(-a)
+ you_recieved_new_inquiry: Jūs nupat saņēmāt jaunu piperasījumu Jūsu saitā.
+ inquiry_starts: --- pieprasījuma sākums ---
+ inquiry_ends: --- pieprasījuma beigas ---
+ from: 'No'
+ email: Epasts
+ phone: Tālrunis
+ message: Ziņa
+ closing_line: Ar cieņu
+ ps: P.S. Ja vēlaties skatīt šo un citus pieprasījumus vēlāk, tad tos var atrast zem sadaļas "Pieprasījumi".
+ activerecord:
+ models:
+ inquiry: pieprasījums
+ attributes:
+ inquiry:
+ name: Vārds
+ email: Epasts
+ phone: Tālrunis
+ message: Ziņa
77 config/locales/nb.yml
@@ -0,0 +1,77 @@
+nb:
+ plugins:
+ refinery_inquiries:
+ title: Forespørsler
+ activerecord:
+ models:
+ inquiry: Forespørsel
+ inquiry_setting: Innstillinger for Forespørsler
+ attributes:
+ inquiry:
+ to: Til
+ from: Fra
+ click_to_email: Trykk for å sende en e-post til denne adressen
+ phone: Telefon
+ date: Dato
+ message: Melding
+ inquiries:
+ new:
+ header_message: "Ooops, det oppsto et lite problem"
+ message: "Følgende problemer må løses:"
+ send: Send melding
+ privacy_policy: "Vi respekterer ditt privatliv"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: Flytt denne forespørselen til lukket
+ move_inquiry_to_open: Flytt denne forespørselen til åpen
+ read_inquiry: Les forespørselen
+ remove_inquiry: "Er du sikker på at du ønsker å slette denne forespørselen fra '%{name}'?"
+ title: Fjern denne forespørselen permanent.
+ said: sa
+ mark_as_spam: Merk som søppel
+ mark_as_ham: Flytt til innboksen
+ toggle_status:
+ closed: "Forespørselen '%{inquiry}' er lukket"
+ reopened: "Forespørselen '%{inquiry}' er gjenåpnet"
+ submenu:
+ update_notified: Oppdater hvem som blir informert
+ edit_confirmation_email: Rediger bekreftelses e-posten
+ index:
+ search_results_for: Søkeresultater for %{query}
+ no_inquiries: Du har ikke mottatt noen forespørsler enda.
+ spam:
+ no_spam: Hurra! Du har ikke noen søppelpost.
+ show:
+ details: Detaljer
+ click_to_email: Trykk for å sende e-post
+ status: Status
+ open: Åpen
+ closed: Lukket
+ age: Alder
+ actions: Handlinger
+ back_to_all_inquiries: Tilbake til alle forespørslene
+ spam: Søppel
+ spam_yes: 'ja'
+ inquiry: Forespørsel
+ title: Fjern denne forespørselen permanent
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' ble endret."
+ notification_recipients_form:
+ inquiry_settings_value_name: Send oppdateringer til
+ explanation: "Hver gang noen kontakter deg på websiden din, så vil Refinery sende ut en e-post for å si ifra at det er ny forespørsel."
+ hint: "Når en ny forespørsel er lagt inn, så vil Refinery sende deg en e-post for å si i fra."
+ example: "Legg inn din(e) e-post adresse(r) slik: jack@jobb.no, jill@kontoret.no"
+ confirmation_email_form:
+ to: Til
+ from: Fra
+ subject: Emne
+ click_to_edit_subject: Trykk her for å redigere emnet
+ explanation: "Hver gang noen sender inn en forespørsel gjennom din webside, så sender Refinery en e-post til personen som la inn forespørselen for å bekrefte at forespørselen er mottatt."
+ below_edit_email_sent: Du kan redigere e-posten som blir sendt ut nedenfor.
+ the_customer_making_inquiry: Kunden som skrev forespørselen
+ message: Melding
+ note: "Merk: plasser teksten %name% der du ønsker at kundens navn skal vises i e-posten"
+ subject_form:
+ subject_value_name: Enme
76 config/locales/nl.yml
@@ -0,0 +1,76 @@
+nl:
+ plugins:
+ refinery_inquiries:
+ title: Contact aanvragen
+ inquiries:
+ new:
+ send: Verstuur uw vraag
+ privacy_policy: Wij respecteren uw privacy
+ admin:
+ inquiries:
+ delete: Verwijder deze vraag voorgoed
+ inquiry:
+ read_inquiry: Lees de vraag
+ said: zei
+ mark_as_spam: Markeer als spam
+ mark_as_ham: Verplaats naar de inbox
+ submenu:
+ inbox: Inbox
+ spam: Spam
+ update_notified: Wijzig wie op de hoogte wordt gesteld van vragen
+ edit_confirmation_email: Bewerk bevestigings email
+ index:
+ no_inquiries: Je hebt nog geen vragen ontvangen.
+ spam:
+ no_spam: Jeej! Je hebt geen spam.
+ show:
+ details: Details
+ age: Leeftijd
+ actions: Acties
+ back_to_all_inquiries: Terug naar alle vragen
+ spam: Spam
+ spam_yes: ja
+ inquiry: Vraag
+ to: Aan
+ from: Van
+ click_to_email: Klik hier om een e-mail te sturen
+ phone: Telefoonnummer
+ date: Datum
+ message: Bericht
+ inquiry_settings:
+ notification_recipients_form:
+ inquiry_settings_value_name: Stuur notificaties naar
+ explanation: "Iedere keer wanneer iemand het vraag formulier invult op uw website, stuurt Refinery een email waarin staat dat er een nieuwe vraag ontvangen is."
+ hint: "Vul hierboven een email adres in. Wilt u naar meerdere adressen notificaties sturen? Vul dan meerdere email adressen in gescheiden door comma's"
+ example: "Bijvoorbeeld: ik@domein.com, vrienden@msn.com, collegas@werk.com"
+ confirmation_email_form:
+ to: Aan
+ from: Van
+ subject: Onderwerp
+ click_to_edit_subject: Klik hier om het onderwerp bewerken
+ explanation: "Iedere keer wanneer iemand het vraag formulier invult op uw website, stuurt Refinery een email naar die persoon waarin staat dat de vraag ontvangen is."
+ below_edit_email_sent: Hieronder kun je de email die verzonden wordt bewerken.
+ the_customer_making_inquiry: De persoon die de heeft vraag gesteld
+ message: Bericht
+ note: "Notitie: plaats de tekst %name% overal in je email waar je de naam van de vragende persoon wilt invoegen"
+ inquiry_mailer:
+ notification:
+ greeting: Hallo
+ you_recieved_new_inquiry: Je hebt een nieuwe vraag via de website ontvangen.
+ inquiry_starts: --- begin van de vraag---
+ inquiry_ends: --- einde van de vraag---
+ from: Van
+ email: Email
+ phone: Telefoon
+ message: Bericht
+ closing_line: Vriendelijke groeten,
+ ps: P.S. Alle vragen woren opgeslagen in de "vragen" sectie van uw website.All your inquiries are stored in the "Inquiries" section of Refinery.
+ activerecord:
+ models:
+ inquiry: Vraag
+ attributes:
+ inquiry:
+ name: Naam
+ email: 'Email'
+ phone: Telefoon
+ message: Bericht
86 config/locales/pt-BR.yml
@@ -0,0 +1,86 @@
+pt-BR:
+ plugins:
+ inquiries:
+ title: Contatos
+ refinery_inquiries:
+ title: Contatos
+ activerecord:
+ models:
+ inquiry: Contatos
+ attributes:
+ inquiry:
+ name: Nome
+ phone: Fone
+ to: Para
+ from: De
+ click_to_email: Clique para enviar um email para este endereço
+ phone: Fone
+ date: Data
+ message: Mensagem
+ inquiries:
+ new:
+ header_message: "Ops, houve um pequeno problema"
+ message: "Os problemas seguintes precisam ser corrigidos:"
+ send: Enviar mensagem
+ privacy_policy: "Nós valorizamos sua privacidade"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: Mover esta mensagem para fechadas
+ move_inquiry_to_open: Mover este mensagem para abertas
+ read_inquiry: Ler a mensagem
+ remove_inquiry: "Tem certeza que deseja remover a mensagem de '%{name}'?"
+ title: Remover esta mensagem para sempre
+ said: disse
+ mark_as_spam: Marcado como spam
+ mark_as_ham: Mover para o inbox
+ toggle_status:
+ closed: "Mensagem '%{inquiry}' está fechado"
+ reopened: "Mensagem '%{inquiry}' está reaberto"
+ submenu:
+ update_notified: Atualizar quem recebe a notificação
+ edit_confirmation_email: Editar email de confirmação
+ inbox: Caixa de Entrada
+ spam: Spam
+ index:
+ search_results_for: Resultados da busca por %{query}
+ open_inquiries: Mensagens abertas
+ no_inquiries: "Urra! Não exitem mensagens abertas porque você lidou com todas elas."
+ closed_inquiries: Mensagens fechadas
+ havent_closed_any_inquiries: "Você ainda não fechou nenhuma mensagem."
+ spam:
+ no_spam: Urra! Não existem mensagens de spam.
+ show:
+ details: Detalhes
+ click_to_email: Clique para enviar email
+ status: Estado
+ open: Aberta
+ closed: Fechada
+ age: Quando
+ actions: Ações
+ back_to_all_inquiries: Voltar para todas as Mensagens
+ inquiry: Contato
+ spam: Spam
+ spam_yes: 'sim'
+ title: Remover esta mensagem para sempre
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' foi atualizada com sucesso."
+ notification_recipients_form:
+ inquiry_settings_value_name: Enviar notificações para
+ explanation: "Toda vez que alguém contactar você no seu website, o Refinery envia um email para notificar a essa pessoa o recebimento de uma mensagem."
+ hint: "Digite um endereço de email acima. Deseja que a notificação vá para mais de uma pessoa? Digite vários endereços de email separados por vírgulas."
+ example: "P.e. eu@dominio.com, amigo@msn.com, colegadetrabalho@trabalho.com"
+ confirmation_email_form:
+ click_to_edit_subject: Clique aqui para editar o assunto
+ explanation: "Toda vez que alguém contatar você no seu website, o Refinery envia um email para confirmar o recebimento da mensagem para esta pessoa."
+ below_edit_email_sent: Abaixo você pode editar o e-mail que é enviado para fora.
+ the_customer_making_inquiry: O cliente fazendo o contato
+ to: Para
+ from: De
+ subject: Assunto
+ thankyou: Obrigado pelo seu contato
+ message: Mensagem
+ note: "Nota: posicione o texto %name% onde você desejar que o nome do cliente apareça no email"
+ subject_form:
+ subject_value_name: Assunto
79 config/locales/ru.yml
@@ -0,0 +1,79 @@
+ru:
+ plugins:
+ refinery_inquiries:
+ title: "Запросы"
+ activerecord:
+ models:
+ inquiry: "Запрос"
+ inquiry_setting: "Настройки запроса"
+ attributes:
+ inquiry:
+ to: "Кому"
+ from: "От"
+ click_to_email: "Нажмите, чтобы отправить по этому адресу"
+ phone: "Телефон"
+ date: "Дата"
+ message: "Сообщение"
+ inquiries:
+ new:
+ header_message: "Упс. Возникла небольшая проблемка."
+ message: "Нужно исправить следующие ошибки:"
+ send: "Отправить сообщение"
+ privacy_policy: "Мы относимся с уважением к вашим личным данным"
+ admin:
+ inquiries:
+ inquiry:
+ move_inquiry_to_closed: "Переместить этот запрос в закрытые"
+ move_inquiry_to_open: "Переместить этот запрос в открытые"
+ read_inquiry: "Прочитать запрос"
+ remove_inquiry: "Вы уверены, что хотите удалить запрос от '{{name}}'?"
+ title: "Удалить этот запрос навсегда"
+ said: "пишет"
+ mark_as_spam: "Пометить как спам"
+ mark_as_ham: "Переместить во Входящие"
+ toggle_status:
+ closed: "Запрос '{{inquiry}}' закрыт"
+ reopened: "Запрос '{{inquiry}}' открыт заново"
+ submenu:
+ inbox: "Входящие"
+ spam: "Спам"
+ update_notified: Изменить получателей уведомлений
+ edit_confirmation_email: "Редактировать письмо-подтверждение"
+ index:
+ search_results_for: "Найти результаты для {{query}}"
+ no_inquiries: "Вы еще не получили ни одного запроса."
+ spam:
+ no_spam: "Ура! Вы не получили спам."
+ show:
+ details: "Подробности"
+ click_to_email: "Нажмите, чтобы отправить"
+ status: "Статус"
+ open: "Открыт"
+ closed: "Закрыт"
+ age: "Срок"
+ actions: "Действия"
+ back_to_all_inquiries: "Назад ко всем запросам"
+ spam: "Спам"
+ spam_yes: 'да'
+ inquiry: "Запрос"
+ title: "Удалить этот запрос навсегда"
+ inquiry_settings:
+ update:
+ updated: "'{{setting}}' были успешно обновлены."
+ notification_recipients_form:
+ inquiry_settings_value_name: "Отправить уведомления"
+ explanation: "Каждый раз, когда кто-то связывается с вами посредством вашего сайта, Refinery CMS отправляет уведомление на электронную почту."
+ hint: "Когда поступит новый запрос, Refinery CMS отправит вам уведомление на электронную почту."
+ example: "Введите адрес(а) электронной почты через запятую: anna@mail.ru, ivanov@yandex.ru"
+ confirmation_email_form:
+ to: "Кому"
+ from: "От"
+ subject: "Тема сообщения"
+ click_to_edit_subject: "Редактировать тему сообщения"
+ explanation: "Каждый раз, когда кто-то связывается с вами посредством вашего сайта, Refinery CMS отправляет ему письмо, подтверждающее принятие запроса."
+ below_edit_email_sent: Ниже вы можете отредактировать отсылаемое письмо
+ the_customer_making_inquiry: "Клиент, делающий запрос"
+ message: "Сообщение"
+ note: "Примечание: поместите текст %name% там, где вы хотите, чтобы появилось имя клиента."
+ subject_form:
+ subject_value_name: "Тема сообщения"
68 config/locales/sl.yml
@@ -0,0 +1,68 @@
+sl:
+ plugins:
+ refinery_inquiries:
+ title: Povpraševanja
+ activerecord:
+ models:
+ inquiry: Povpraševanje
+ attributes:
+ inquiry:
+ to: Za
+ from: Od
+ click_to_email: Pošlji email sporočilo
+ phone: Telefon
+ date: Datum
+ message: Sporočilo
+ inquiries:
+ new:
+ header_message: "Ups prišlo je do majhnega problema"
+ message: "Prosimo odpravite sledeče napake:"
+ send: Pošlji sporočilo
+ privacy_policy: "Cenimo vašo zasebnost"
+ admin:
+ inquiries:
+ inquiry:
+ said: pravi
+ move_inquiry_to_closed: Premakni povpraševanje v zaprto
+ move_inquiry_to_open: Premakni povpraševanje v odprto
+ read_inquiry: Preberi povpraševanje
+ remove_inquiry: "Ali ste prepričani da želite odstraniti povpraševanje od '%{name}'?"
+ title: Odstrani povpraševanje.
+ toggle_status:
+ closed: "Povpraševanje '%{inquiry}' je zaprto"
+ reopened: "Povpraševanje '%{inquiry}' je ponovno odprto"
+ index:
+ no_inquiries: Trenutno še ni nobenega povpraševanja.
+ submenu:
+ update_notified: Uredi prejemnike obvestila
+ edit_confirmation_email: Uredni potrditveni email
+ show:
+ details: Podrobnosti
+ click_to_email: Pošlji email sporočilo
+ status: Status
+ open: Odprto
+ closed: Zaprto
+ age: Starost
+ actions: Možnosti
+ back_to_all_inquiries: Nazaj na vsa povpraševanja
+ inquiry: Povpraševanje
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' je bila uspešno posodobljena."
+ notification_recipients_form:
+ inquiry_settings_value_name: Pošlji obvestilo na
+ explanation: "Vedno ko vas nekdo kontaktira na vaši spletni strani, vam Refinery pošlje email obvestilo o novem povpraševanju."
+ hint: "V zgornje polje vnesite email naslov. Želite da obvestila prejme več oseb? Vnesite več email naslovov ločenih z vejicami."
+ example: "Primer: jaz@domena.com, prijatelj@msn.com, sodelavec@work.com"
+ confirmation_email_form:
+ to: Za
+ from: Od
+ subject: Zadeva
+ click_to_edit_subject: Uredi zadevo
+ explanation: "Vedno ko vas nekdo kontaktira na vaši spletni strani mu Refinery pošlje email obvestilo o prejetem povpraševanju."
+ below_edit_email_sent: Spodaj lahko uredite vsebino email sporočila.
+ the_customer_making_inquiry: Stranka, ki je poslala povpraševanje
+ message: Sporočilo
+ note: "Opomba: vstavite tekst %name% kjer želite, da se pojavi ime stranke v email sporočilu."
+ subject_form:
+ subject_value_name: Zadeva
73 config/locales/zh-CN.yml
@@ -0,0 +1,73 @@
+zh-CN:
+ plugins:
+ refinery_inquiries:
+ title: Inquiries
+ inquiries:
+ new:
+ header_message: Whoops there was a small problem
+ message: "The following problems need to be corrected:"
+ send: Send message
+ privacy_policy: We value your privacy
+ admin:
+ inquiries:
+ inquiry:
+ read_inquiry: Read the inquiry
+ said: said
+ mark_as_spam: Mark as spam
+ mark_as_ham: Move to inbox
+ submenu:
+ inbox: Inbox
+ spam: Spam
+ update_notified: Update who gets notified
+ edit_confirmation_email: Edit confirmation email
+ index:
+ no_inquiries: You have not received any inquiries yet.
+ spam:
+ no_spam: Hooray! You don't have any spam.
+ show:
+ details: Details
+ age: Age
+ actions: Actions
+ back_to_all_inquiries: Back to all Inquiries
+ spam: Spam
+ spam_yes: 'yes'
+ inquiry: Inquiry
+ to: To
+ from: From
+ click_to_email: Click to email this address
+ phone: Phone
+ date: Date
+ message: Message
+ inquiry_settings:
+ update:
+ updated: "'%{setting}' was successfully updated."
+ notification_recipients_form:
+ inquiry_settings_value_name: Send notifications to
+ explanation: Every time someone contacts you on your website, Refinery sends out an email to say there is a new inquiry.
+ hint: When a new inquiry is submitted, Refinery will send an email notification to you.
+ example: "Enter your email address(es) like: jack@work.com, jill@office.com"
+ confirmation_email_form:
+ to: To
+ from: From
+ subject: Subject
+ click_to_edit_subject: Click here to edit the subject
+ explanation: Every time someone contacts you on your website, Refinery sends out an email to confirm the inquiry with the person who made it.
+ below_edit_email_sent: Below you can edit the email that is sent out.
+ the_customer_making_inquiry: The customer making the inquiry
+ message: Message
+ note: "Note: place the text %name% where you'd like the customer's name to appear in the email"
+ inquiry_mailer:
+ notification:
+ greeting: Hi there
+ you_recieved_new_inquiry: You just received a new inquiry on your website.
+ inquiry_starts: --- inquiry starts ---
+ inquiry_ends: --- inquiry ends ---
+ from: From
+ email: Email
+ phone: Phone
+ message: Message
+ closing_line: Kind Regards
+ ps: P.S. All your inquiries are stored in the "Inquiries" section of Refinery should you ever want to view it later there.
+ activerecord:
+ models:
+ inquiry: inquiry
20 config/routes.rb
@@ -0,0 +1,20 @@
+Refinery::Application.routes.draw do
+ get '/contact', :to => 'inquiries#new', :as => 'new_inquiry'
+ resources :contact, :as => :inquiries, :controller => 'inquiries' do
+ collection do
+ get :thank_you
+ end
+ end
+
+ scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
+ resources :inquiries do
+ collection do
+ get :spam
+ end
+ member do
+ get :toggle_spam
+ end
+ end
+ resources :inquiry_settings
+ end
+end
22 lib/inquiries.rb
@@ -0,0 +1,22 @@
+require 'refinery'
+
+module Refinery
+ module Inquiries
+ class Engine < Rails::Engine
+ config.after_initialize do
+ Refinery::Plugin.register do |plugin|
+ plugin.title = "Inquiries"
+ plugin.name = "refinery_inquiries"
+ plugin.directory = "inquiries"
+ plugin.description = "Provides a contact form and stores inquiries"
+ plugin.version = %q{0.9.8}
+ plugin.menu_match = /(refinery|admin)\/inquir(ies|y_settings)$/
+ plugin.activity = {
+ :class => InquirySetting,
+ :title => 'name'
+ }
+ end
+ end
+ end
+ end
+end
31 readme.md
@@ -0,0 +1,31 @@
+# Inquiries
+
+![Refinery Inquiries](http://refinerycms.com/system/images/0000/0626/inquiries.png)
+
+## About
+
+__Refinery gives you a simple contact form that notifies you and the customer when an inquiry is made.__
+
+In summary you can:
+
+* Collect and manage inquiries
+* Specify who is notified when a new inquiry comes in
+* Customise an auto responder email that is sent to the person making the inquiry
+
+When inquiries come in, you and the customer are notified. The inquiry will now show up as an "open" inquiry. The idea is to deal with the inquiry and then "close" it so you know it's been sorted.
+
+## How do I get Notified?
+
+Go into your 'Inquiries' tab in the Refinery admin area and click on "Update who gets notified"
+
+## How do I Edit the Automatic Confirmation Email
+
+Go into your 'Inquiries' tab in the Refinery admin area and click on "Edit confirmation email"
+
+## But I don't want a Contact Form how do I kill it?
+
+Your contact form loads because you have a page in your site that is told to not just render a normal page, but load the contact form instead.
+
+By default this page is called "Contact". Go to your "Pages" tab in the Refinery admin area and click the edit icon on "Contact". Now click on "Hide/Show Advanced Options" and you'll see that a "Custom URL" is set to ``/contact``. Simply change this to nothing, or delete the contact us page.
+
+You might also want to remove the Inquiries plugin from your backend view. To do that, you go to the "Users" tab in the Refinery admin area, edit your user, uncheck "Inquiries" from the list of plugins you can access.
17 refinerycms-inquiries.gemspec
@@ -0,0 +1,17 @@
+#version = File.read(File.expand_path("../../REFINERY_VERSION", __FILE__)).strip
+
+Gem::Specification.new do |s|
+ s.platform = Gem::Platform::RUBY
+ s.name = 'refinerycms-inquiries'
+ s.version = '0.9.8'
+ s.summary = 'Inquiry handling functionality for the Refinery CMS project.'
+ s.required_ruby_version = '>= 1.8.7'
+
+ s.files = Dir['changelog.md', 'README', 'MIT-LICENSE', 'lib/**/*']
+ s.require_path = 'lib'
+ s.requirements << 'none'
+
+ s.has_rdoc = true
+
+ s.add_dependency('refinerycms-core', '~> 0.9.8')
+end
Please sign in to comment.
Something went wrong with that request. Please try again.