2011-03-27 22:56:15 +02:00
|
|
|
class PagesController < ApplicationController
|
2014-05-09 02:01:41 +02:00
|
|
|
layout 'application', :except => [:home, :social_home]
|
2011-03-27 22:56:15 +02:00
|
|
|
|
2014-02-17 18:05:39 +01:00
|
|
|
def home
|
|
|
|
@menu = 'home'
|
|
|
|
@title = 'Internet of Things'
|
2014-05-09 02:01:41 +02:00
|
|
|
render layout: 'home'
|
2014-02-17 18:05:39 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def social_home; ; end
|
|
|
|
|
|
|
|
def features
|
|
|
|
@menu = 'features'
|
|
|
|
end
|
|
|
|
|
|
|
|
def about
|
|
|
|
@menu = 'about'
|
|
|
|
end
|
|
|
|
|
|
|
|
def headers
|
|
|
|
end
|
2011-03-27 22:56:15 +02:00
|
|
|
|
2014-05-09 02:01:41 +02:00
|
|
|
# post contact email
|
|
|
|
def contact_us
|
|
|
|
# if no email address
|
|
|
|
if params[:email].blank? || params[:email].index('@').blank?
|
|
|
|
flash[:alert] = t(:contact_us_no_email)
|
|
|
|
# if no message
|
|
|
|
elsif params[:message].blank?
|
|
|
|
flash[:alert] = t(:contact_us_no_message)
|
|
|
|
# else send email
|
|
|
|
else
|
|
|
|
Mailer.contact_us(params[:email], params[:message]).deliver
|
|
|
|
flash[:notice] = t(:contact_us_success)
|
|
|
|
end
|
|
|
|
|
|
|
|
redirect_to root_path
|
|
|
|
end
|
|
|
|
|
2011-03-27 22:56:15 +02:00
|
|
|
end
|
2014-02-17 18:05:39 +01:00
|
|
|
|