diff options
Diffstat (limited to 'lib/sisu/v3/html_promo.rb')
-rw-r--r-- | lib/sisu/v3/html_promo.rb | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/lib/sisu/v3/html_promo.rb b/lib/sisu/v3/html_promo.rb index acc924b6..f53211e9 100644 --- a/lib/sisu/v3/html_promo.rb +++ b/lib/sisu/v3/html_promo.rb @@ -56,33 +56,44 @@ ** Description: html advertising component, build here, mockup =end -module SiSU_HTML_promo +module SiSU_HTML_Promo require_relative 'sysenv' # sysenv.rb include SiSU_Env class Ad def initialize(md) @md=md - @env=SiSU_Env::Info_env.new(@md.fns,@md) - @rc=SiSU_Env::Get_init.instance.sisu_yaml.rc - @ad=SiSU_Env::Get_init.instance.ads - @vz=SiSU_Env::Get_init.instance.skin + @env=SiSU_Env::InfoEnv.new(@md.fns,@md) + @rc=SiSU_Env::GetInit.instance.sisu_yaml.rc + @ad=SiSU_Env::GetInit.instance.ads + @vz=SiSU_Env::GetInit.instance.skin @flag=@env.widget.promo? + @make=SiSU_Env::ProcessingSettings.new(@md) end def div def major - @flag[:ad] ? '<div id="pane_major">' : '' + (@make.build.html_right_pane? \ + && @flag[:ad]) \ + ? '<div id="pane_major">' + : '' end def minor - @flag[:ad] ? '<div id="pane_minor">' : '' + (@make.build.html_right_pane? \ + && @flag[:ad]) \ + ? '<div id="pane_minor">' + : '' end def close - @flag[:ad] ? '</div>' : '' + (@make.build.html_right_pane? \ + && @flag[:ad]) \ + ? '</div>' + : '' end self end - def display #(type=nil,id=nil) + def display ads_array,promo_array=[],[] - if @flag[:ad] + if @make.build.html_right_pane? \ + && @flag[:ad] ads=if @md.promo && @md.promo.length > 0 #promo set in document promo_array=@md.promo elsif @flag[:sk] #promo set in associated skin |