diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-03-19 22:07:29 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-03-19 22:07:33 -0400 |
commit | 6811ac91f21a434fc7d967c11e1b20f33918c6ea (patch) | |
tree | 30f39674ca96a79f8a604a9f02d571f24320e221 /lib/sisu/v3/html_promo.rb | |
parent | v3: 3.2.0 version & changelog "opened" (diff) |
v3: 3.2 branch is main (v3dv --> v3); dev (v3dv) branch directories removed
* v3dv (3.2) "merged" into v3 (previously 3.1) (& removed)
* conf/sisu/v3dv --> conf/sisu/v3
* data/sisu/v3dv --> data/sisu/v3
* lib/sisu/v3dv --> lib/sisu/v3
* bin/sisu* (v3dv references changed to v3)
* (--dev modifier (superfluous for the time being) runs main v3 branch)
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 |