[openstreetmap/openstreetmap-website] Add support for rotating banners, add banners for SOTM, SOTMUS (#1240)

Tom Hughes notifications at github.com
Tue Jun 21 18:41:48 UTC 2016


> +  end
> +
> +  if val.to_i <= queuePos
> +    bannerSym = k
> +    cookieStr = c
> +    queuePos = val.to_i
> +  end
> +end
> +
> +unless bannerSym.nil?
> +  banner = active_banners[bannerSym]
> +  cookies[cookieStr.to_sym] = active_banners.length   # bump to end of queue
> +%>
> +<%= link_to (image_tag banner[:img], :alt => banner[:alt], :title => banner[:alt]), banner[:link] %>
> +<div class="close-wrap" id="<%= cookieStr %>"><span class="icon close"></span></div>
> +<% end %>

Well if it needs localising it's better to look it up in the normal translation strings - just lookup the banner name in a suitable scope I guess?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1240/files/933335a0ea28f274bc7301c18611bcd90709fd99#r67927476
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160621/60826a81/attachment.html>


More information about the rails-dev mailing list