Class: Forge::IndexController

Inherits:
ForgeController show all
Defined in:
lib/forge/app/controllers/forge/index_controller.rb

Instance Method Summary collapse

Methods inherited from ForgeController

#get_menu_items, #load_help, #set_crumbs, #set_title, #uses_ckeditor

Methods inherited from ApplicationController

#app_init

Instance Method Details

#indexObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/forge/app/controllers/forge/index_controller.rb', line 2

def index
  @warnings = []
  @warnings << "You haven't entered a title. &nbsp;<small><a href='/forge/settings'>[Correct This]</a></small>".html_safe if MySettings.site_title.blank?
  @warnings << "You haven't entered a URL. &nbsp;<small><a href='/forge/settings'>[Correct This]</a></small>".html_safe if MySettings.site_url.blank?
  @warnings << "You haven't entered an email address to receive contact messages. &nbsp;<small><a href='/forge/settings'>[Correct This]</a></small>".html_safe  if MySettings.contact_email.blank?
  @warnings << "You haven't entered an email address from which to send contact messages and other site notices. &nbsp;<small><a href='/forge/settings'>[Correct This]</a></small>".html_safe  if MySettings.from_email.blank?
  @warnings << "You haven't entered an email address from which to send dispatches. &nbsp;<small><a href='/forge/settings'>[Correct This]</a></small>".html_safe if MySettings.dispatch_email.blank? && @menu_items.include?("dispatches")
  @warnings << "You haven't entered the Google Analytics code. &nbsp;<small><a href='/forge/settings'>[Correct This]</a></small>".html_safe if MySettings.google_analytics.blank?
  @warnings << "You haven't entered an email address from which to send order receipts. &nbsp;<small><a href='/forge/settings'>[Correct This]</a></small>".html_safe if MySettings.receipt_email.blank? && @menu_items.include?("products")
  
  favicon = File.join(Rails.root, 'public', 'favicon.ico')
  @warnings << "You have not included a custom favicon." if !File.exist?(favicon) || File.read(favicon).size == 0
end