2013-10-19 11:35:33 +00:00
|
|
|
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class="orbit-cycle-slideshow" data-cycle-timeout="<%= @ad_banner.timeout_millisecond %>" data-cycle-random='true' style="z-index: 0">
|
2013-10-19 11:10:43 +00:00
|
|
|
<% @ad_banner.ad_images.can_display.each do |image| %>
|
2013-10-19 11:35:33 +00:00
|
|
|
<%= image_tag image.file.url, width: @ad_banner.width, height: @ad_banner.height %>
|
2012-12-19 19:21:50 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="newlist clear">
|
|
|
|
<% @bulletins.each do |bulletin| %>
|
|
|
|
<div class="newitem">
|
|
|
|
<div class="newpic">
|
|
|
|
<%= image_tag bulletin.image.url %>
|
|
|
|
</div>
|
|
|
|
<h3 class="newstitle">
|
2013-01-16 00:14:42 +00:00
|
|
|
<%= link_to bulletin.title, mobile_announcement_content_path(:app => params[:app], :id => bulletin) %>
|
2012-12-19 19:21:50 +00:00
|
|
|
</h3>
|
|
|
|
<p class="newsDate"><%= display_date(bulletin.postdate) %></p>
|
|
|
|
<div class="newsummary"><%= bulletin.subtitle %></div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2013-01-11 10:34:20 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type='text/javascript'>
|
2013-10-19 11:10:43 +00:00
|
|
|
$(function(){
|
|
|
|
if($("#slideshow-<%= @ad_banner.title.dehumanize %> img").length > 1){
|
|
|
|
var a = [];
|
|
|
|
<% @ad_banner.ad_images.can_display.each do |image| %>
|
|
|
|
a.push("<%= image.file.url %>");
|
|
|
|
<% end %>
|
|
|
|
$.preload(a, 2, function(){
|
|
|
|
$('.orbit-cycle-slideshow').cycle();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
$("#slideshow-<%= @ad_banner.title.dehumanize %> img").show()
|
|
|
|
}
|
|
|
|
});
|
2012-12-19 19:21:50 +00:00
|
|
|
</script>
|