45 lines
1.1 KiB
Ruby
45 lines
1.1 KiB
Ruby
|
|
class SupportController < ApplicationController
|
||
|
|
|
||
|
|
before_filter(:only => [:show]){ |c| c.find_product("support_url", UrlDestination['support']) }
|
||
|
|
before_filter :init_objects
|
||
|
|
|
||
|
|
#layout "legal", :only => [:disclaimer, :privacy_policy]
|
||
|
|
|
||
|
|
# index a show nejde kesovat kvuli get parametru subject
|
||
|
|
caches_page :disclaimer, :privacy_policy, :eula, :customer_service
|
||
|
|
|
||
|
|
def index
|
||
|
|
end
|
||
|
|
|
||
|
|
def show
|
||
|
|
render :action => "index"
|
||
|
|
end
|
||
|
|
|
||
|
|
def disclaimer
|
||
|
|
@static_page = StaticPage['disclaimer']
|
||
|
|
end
|
||
|
|
|
||
|
|
def privacy_policy
|
||
|
|
@static_page = StaticPage['privacy-policy']
|
||
|
|
end
|
||
|
|
|
||
|
|
def eula
|
||
|
|
@static_page = StaticPage['eula']
|
||
|
|
end
|
||
|
|
|
||
|
|
def customer_service
|
||
|
|
@static_page = StaticPage['customer-service']
|
||
|
|
end
|
||
|
|
|
||
|
|
private
|
||
|
|
|
||
|
|
def init_objects
|
||
|
|
@dextronet_faqs = FaqCategory.top_dextronet_faqs
|
||
|
|
@products = Product.all_ordered.delete_if { |r| r.code == 'better-listview-express' }
|
||
|
|
@support_request = SupportRequest.new
|
||
|
|
@support_request.support_request_origin = SupportRequestOrigin['support']
|
||
|
|
@support_request.product = @product
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|