SEO work and resources page
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user