3 :alt => 'State of the Map US 2016',
4 :link => 'http://stateofthemap.us/',
5 :img => 'banners/sotmus-2016.jpg'
8 :alt => 'State of the Map 2016',
9 :link => 'http://2016.stateofthemap.org/',
10 :img => 'banners/sotm-2016.jpg'
16 queuePos = active_banners.length
18 # pick least recently seen banner that is not hidden
19 active_banners.each_key do |k|
20 c = '_osm_banner_' + k.to_s
21 val = cookies[c.to_sym] || 0
25 cookies[c.to_sym] = val.to_i - 1
28 if val.to_i <= queuePos
36 banner = active_banners[bannerSym]
37 cookies[cookieStr.to_sym] = active_banners.length # bump to end of queue
39 <%= link_to (image_tag banner[:img], :alt => banner[:alt], :title => banner[:alt]), banner[:link] %>
40 <div class="close-wrap" id="<%= cookieStr %>"><span class="icon close"></span></div>