Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
367 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
//= require admin/spree_core | ||
//= require ckeditor/init | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
//= require store/spree_core | ||
//= require ckeditor/init | ||
|
||
(function($){ | ||
$(document).ready(function(){ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +0,0 @@ | ||
/* | ||
*= require admin/spree_core | ||
*= require formtastic | ||
*/ | ||
|
||
.formtastic input, .formtastic textarea, .formtastic select { | ||
font-size: 100%; | ||
padding: 5px; | ||
} | ||
|
||
.formtastic button { | ||
margin: 0; | ||
padding: 0 20px 0 0; | ||
} | ||
.formtastic button:hover { | ||
text-shadow: #FFFFFF -1px -1px 0px; | ||
} | ||
|
||
.tags { | ||
margin-right: 5px; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
/* | ||
*= require store/spree_core | ||
*/ | ||
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
module Spree | ||
class StaticPagesController < BaseController | ||
before_filter :load_obj | ||
before_filter :load_page, :only => :show | ||
rescue_from ActiveRecord::RecordNotFound, :with => :render_404 | ||
helper 'spree/taxons' | ||
|
||
respond_to :html | ||
|
||
def contacts | ||
end | ||
|
||
def show | ||
@page = Spree::StaticPage.find(params[:id]) | ||
return unless @static_page | ||
end | ||
|
||
def create_mail | ||
unless (params[:name].blank? && params[:email].blank? && params[:messaggio].blank?) | ||
Spree::ContactMailer.contacts_form(params[:name], params[:email], params[:messaggio]).deliver | ||
Spree::ContactMailer.contact_form(params[:name], params[:email], params[:messaggio]).deliver | ||
flash[:notice] = t('create_mail_static_page') | ||
else | ||
flash[:notice] = t('not_create_mail_static_page')#'Si e` verificato un problema durante l\'invio della mail. Verifica di aver compilato tutti i campi' | ||
end | ||
redirect_to contacts_url | ||
end | ||
|
||
def load_obj | ||
@static_pages = Spree::StaticPage.published | ||
private | ||
def accurate_title | ||
@static_page ? @static_page.title : super | ||
end | ||
|
||
def load_page | ||
@static_page = Spree::StaticPage.find_by_permalink!(params[:id]) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
module Spree | ||
class ContactMailer < ActionMailer::Base | ||
helper 'spree/base' | ||
|
||
default :from => Spree::Config[:store_default_email] | ||
|
||
def contacts_form(name, email, text) | ||
def contact_form(name, email, text) | ||
@name = name | ||
@email = email | ||
@messaggio = text | ||
mail(:to => "#{email} - #{name}", | ||
:subject => Spree::Config[:store_default_contact_subject]) | ||
mail(:to => Spree::Config[:store_default_email], :subject => "#{Spree::Config[:site_name]} - #{Spree::Config[:store_default_contact_subject]}") | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.