SEO work and resources page

This commit is contained in:
Godwin
2014-07-13 11:08:01 -06:00
parent 0c26817c02
commit 08aecce225
27 changed files with 164 additions and 29 deletions
@@ -187,9 +187,6 @@ class ConferencesController < ApplicationController
if current_user
@host_privledge = :admin
end
#if !@conference
# raise ActionController::RoutingError.new('Not Found')
#end
end
def set_conference_registration
+16 -2
View File
@@ -1,13 +1,16 @@
include ApplicationHelper
class PagesController < ApplicationController
#skip_before_filter :verify_authenticity_token, only: [:translate]
#skip_before_filter :verify_authenticity_token, only: [:translate]
def home
@conferences = Conference.all
@conferences = Conference.all
@conference = Conference.find(:first, :order => "start_date DESC")
end
def resources
end
def translate
key = params[:translationkey]
value = params[:translationvalue]
@@ -51,12 +54,18 @@ class PagesController < ApplicationController
end
def translations
if !current_user
raise ActiveRecord::PremissionDenied
end
@lang = params[:lang]
@translations = I18n.backend.get_translation_info
I18n.config.enforce_available_locales = false
end
def translation_list
if !current_user
raise ActiveRecord::PremissionDenied
end
total = 0
complete = 0
@completeness = Hash.new
@@ -78,6 +87,11 @@ class PagesController < ApplicationController
}
end
def robots
robot = is_production? && !is_test_server? ? 'live' : 'dev'
render :text => File.read("config/robots-#{robot}.txt"), :content_type => 'text/plain'
end
private
def store_translations(locale, data, options = {})
escape = options.fetch(:escape, true)