spree_mini_contact 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/contacts_controller.rb +1 -1
- data/app/helpers/admin/contacts_helper.rb +1 -1
- data/app/mailer/contact_mailer.rb +1 -1
- data/app/views/admin/contacts/index.html.erb +6 -6
- data/app/views/admin/contacts/show.html.erb +31 -31
- data/app/views/admin/shared/_contact_tabs.html.erb +8 -8
- data/app/views/contact_mailer/message_email.text.erb +7 -7
- data/app/views/contacts/new.html.erb +13 -31
- data/config/locales/en.yml +22 -20
- metadata +5 -5
@@ -13,7 +13,7 @@ class ContactsController < Spree::BaseController
|
|
13
13
|
respond_to do |format|
|
14
14
|
if @contact.valid? && @contact.save
|
15
15
|
ContactMailer.message_email(@contact).deliver
|
16
|
-
format.html { redirect_to(contact_path, :notice => t("message_sent")) }
|
16
|
+
format.html { redirect_to(contact_path, :notice => t("mini_contact.message_sent")) }
|
17
17
|
else
|
18
18
|
format.html { render :action => "new" }
|
19
19
|
end
|
@@ -3,7 +3,7 @@ class ContactMailer < ActionMailer::Base
|
|
3
3
|
def message_email(message)
|
4
4
|
opts = {}
|
5
5
|
opts[:to] = message.email
|
6
|
-
opts[:subject] = "#{t('message_from')} #{Spree::Config[:site_name]}"
|
6
|
+
opts[:subject] = "#{t('mini_contact.message_from')} #{Spree::Config[:site_name]}"
|
7
7
|
@message = message
|
8
8
|
mail(opts)
|
9
9
|
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<h1><%= t("contacts")%></h1>
|
1
|
+
<h1><%= t("mini_contact.contacts")%></h1>
|
2
2
|
|
3
3
|
<table class="index">
|
4
4
|
<tr>
|
5
5
|
<%= hook :admin_contact_index_headers do %>
|
6
|
-
<th><%= t("name") %></th>
|
7
|
-
<th><%= t("email") %></th>
|
8
|
-
<th><%= t("phone") %></th>
|
9
|
-
<th><%= t("subject") %></th>
|
6
|
+
<th><%= t("mini_contact.name") %></th>
|
7
|
+
<th><%= t("mini_contact.email") %></th>
|
8
|
+
<th><%= t("mini_contact.phone") %></th>
|
9
|
+
<th><%= t("mini_contact.subject") %></th>
|
10
10
|
<% end %>
|
11
11
|
<th>
|
12
12
|
<%= hook :admin_contact_index_header_actions %>
|
@@ -31,4 +31,4 @@
|
|
31
31
|
</td>
|
32
32
|
</tr>
|
33
33
|
<% end %>
|
34
|
-
</table>
|
34
|
+
</table>
|
@@ -1,40 +1,40 @@
|
|
1
|
-
<h1><%= "#{t('contacts')} #{t('from')} #{@contact.name}" %></h1>
|
1
|
+
<h1><%= "#{t('mini_contact.contacts')} #{t('mini_contact.from')} #{@contact.name}" %></h1>
|
2
2
|
|
3
3
|
<%= render :partial => 'admin/shared/contact_tabs', :locals => {:current => "Contact Details"} %>
|
4
4
|
|
5
5
|
<%= hook :admin_contact_show do %>
|
6
|
-
<div class="adr">
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</div>
|
6
|
+
<div class="adr">
|
7
|
+
<h4><%= t("mini_contact.name") %></h4>
|
8
|
+
<p>
|
9
|
+
<%= @contact.name %><br />
|
10
|
+
</p>
|
11
|
+
</div>
|
12
12
|
|
13
|
-
<div class="adr">
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
</div>
|
13
|
+
<div class="adr">
|
14
|
+
<h4><%= t("mini_contact.email") %></h4>
|
15
|
+
<p>
|
16
|
+
<%= @contact.email %><br />
|
17
|
+
</p>
|
18
|
+
</div>
|
19
19
|
|
20
|
-
<div class="adr">
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
</div>
|
20
|
+
<div class="adr">
|
21
|
+
<h4><%= t("mini_contact.phone") %></h4>
|
22
|
+
<p>
|
23
|
+
<%= @contact.phone %><br />
|
24
|
+
</p>
|
25
|
+
</div>
|
26
26
|
|
27
|
-
<div class="adr">
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
</div>
|
27
|
+
<div class="adr">
|
28
|
+
<h4><%= t("mini_contact.subject") %></h4>
|
29
|
+
<p>
|
30
|
+
<%= @contact.subject %><br />
|
31
|
+
</p>
|
32
|
+
</div>
|
33
33
|
|
34
|
-
<div class="adr">
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
</div>
|
34
|
+
<div class="adr">
|
35
|
+
<h4><%= t("mini_contact.message") %></h4>
|
36
|
+
<p>
|
37
|
+
<%= @contact.message %>
|
38
|
+
</p>
|
39
|
+
</div>
|
40
40
|
<% end %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% content_for :sidebar do %>
|
2
2
|
<ul class="sidebar">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
<%= hook :admin_contact_tabs do %>
|
4
|
+
<li<%== ' class="active"' if current == 'Contact List' %>>
|
5
|
+
<%= link_to t("mini_contact.contact_list"), collection_url() %>
|
6
|
+
</li>
|
7
|
+
<li<%== ' class="active"' if current == 'Contact Details' %>>
|
8
|
+
<%= link_to t("mini_contact.contact_details"), object_url(@contact) %>
|
9
|
+
</li>
|
10
|
+
<% end %>
|
11
11
|
</ul>
|
12
12
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<%= t('
|
1
|
+
<%= t('mini_contact.greeting') %>
|
2
2
|
|
3
|
-
<%= t('name') %>: <%= @message.name %>
|
4
|
-
<%= t('email') %>: <%= @message.email %>
|
5
|
-
<%= t('phone') %>: <%= @message.phone %>
|
6
|
-
<%= t('subject') %>: <%= @message.subject %>
|
3
|
+
<%= t('mini_contact.name') %>: <%= @message.name %>
|
4
|
+
<%= t('mini_contact.email') %>: <%= @message.email %>
|
5
|
+
<%= t('mini_contact.phone') %>: <%= @message.phone %>
|
6
|
+
<%= t('mini_contact.subject') %>: <%= @message.subject %>
|
7
7
|
|
8
8
|
<%= @message.message %>
|
9
9
|
|
10
|
-
<%= t('
|
11
|
-
<%= Spree::Config[:site_name] %>
|
10
|
+
<%= t('mini_contact.footer') %>
|
11
|
+
<%= Spree::Config[:site_name] %>
|
@@ -1,31 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%=
|
5
|
-
<%=
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</div>
|
15
|
-
<div class="field">
|
16
|
-
<%= f.label :phone, t("phone") %><br />
|
17
|
-
<%= f.text_field :phone %>
|
18
|
-
</div>
|
19
|
-
<div class="field">
|
20
|
-
<%= f.label :subject, t("subject") %><br />
|
21
|
-
<%= f.text_field :subject %>
|
22
|
-
</div>
|
23
|
-
<div class="field">
|
24
|
-
<%= f.label :message, t("message") %><br />
|
25
|
-
<%= f.text_area :message %>
|
26
|
-
</div>
|
27
|
-
<div class="action"><%= f.submit t("send_message"), :class => "button primary" %></div>
|
28
|
-
<% end %>
|
29
|
-
<% end %>
|
30
|
-
<% end %>
|
31
|
-
</div>
|
1
|
+
<%= form_for(@contact) do |f| %>
|
2
|
+
<%= f.label :name, t("mini_contact.name") %>
|
3
|
+
<%= f.text_field :name %>
|
4
|
+
<%= f.label :email, t("mini_contact.email") %>
|
5
|
+
<%= f.text_field :email %>
|
6
|
+
<%= f.label :phone, t("mini_contact.phone") %>
|
7
|
+
<%= f.text_field :phone %>
|
8
|
+
<%= f.label :subject, t("mini_contact.subject") %>
|
9
|
+
<%= f.text_field :subject %>
|
10
|
+
<%= f.label :message, t("mini_contact.message") %>
|
11
|
+
<%= f.text_area :message %>
|
12
|
+
<%= f.submit t("mini_contact.send_message"), :class => "button primary" %>
|
13
|
+
<% end %>
|
data/config/locales/en.yml
CHANGED
@@ -1,22 +1,24 @@
|
|
1
1
|
en:
|
2
|
-
contacts: Contacts
|
3
|
-
contact: Contact us
|
4
|
-
name: Name
|
5
|
-
email: Email
|
6
|
-
sent: Sent
|
7
|
-
view: View
|
8
|
-
message: Message
|
9
|
-
order_number: Order number
|
10
|
-
optionnal: optional
|
11
|
-
name: Name
|
12
|
-
email: Email
|
13
|
-
phone: Phone
|
14
|
-
subject: Subject
|
15
|
-
contact_details: Contact details
|
16
|
-
contact_list: Contacts list
|
17
2
|
send_message: Send message
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
3
|
+
mini_contact:
|
4
|
+
contacts: Contacts
|
5
|
+
contact: Contact us
|
6
|
+
name: Name
|
7
|
+
email: Email
|
8
|
+
sent: Sent
|
9
|
+
view: View
|
10
|
+
message: Message
|
11
|
+
order_number: Order number
|
12
|
+
optionnal: optional
|
13
|
+
name: Name
|
14
|
+
email: Email
|
15
|
+
phone: Phone
|
16
|
+
subject: Subject
|
17
|
+
contact_details: Contact details
|
18
|
+
contact_list: Contacts list
|
19
|
+
send_message: Send message
|
20
|
+
message_sent: Thank You - Your email has been sent!
|
21
|
+
from: from
|
22
|
+
message_from: Message from
|
23
|
+
greeting: Thank you for your enquiry. Our staff will get back to you shortly. Please see your submission below.
|
24
|
+
footer: Regards,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_mini_contact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,19 +9,19 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_core
|
16
|
-
requirement: &
|
16
|
+
requirement: &5834380 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
21
|
+
version: '0.60'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *5834380
|
25
25
|
description: ! ' Basically the easiest way to implement a contact form.
|
26
26
|
|
27
27
|
'
|