2014-04-28 02:23:24 +00:00
|
|
|
<% unless @ad_banner.nil? %>
|
2014-01-16 10:15:00 +00:00
|
|
|
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class="orbit-cycle-slideshow" data-cycle-timeout="<%= @ad_banner.timeout_millisecond %>" data-cycle-fx="<%= @ad_banner.ad_fx %>" data-cycle-random='true' style="z-index: 0">
|
|
|
|
<% @ad_banner.ad_images.can_display.each do |image| %>
|
|
|
|
<%= image_tag image.file.url, width: @ad_banner.width, height: @ad_banner.height %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2014-04-28 02:23:24 +00:00
|
|
|
<% end %>
|
|
|
|
|
2014-01-16 10:15:00 +00:00
|
|
|
<div class="newlist clear">
|
|
|
|
<% @bulletins.each do |bulletin| %>
|
|
|
|
<div class="newitem">
|
|
|
|
<div class="newpic">
|
|
|
|
<%= image_tag bulletin.image.url %>
|
|
|
|
</div>
|
|
|
|
<h3 class="newstitle">
|
|
|
|
<%= link_to bulletin.title, mobile_announcement_content_path(:app => params[:app], :id => bulletin) %>
|
|
|
|
</h3>
|
|
|
|
<p class="newsDate"><%= display_date(bulletin.postdate) %></p>
|
|
|
|
<div class="newsummary"><%= bulletin.subtitle %></div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2014-04-28 02:23:24 +00:00
|
|
|
|
|
|
|
<% unless @ad_banner.nil? %>
|
2014-01-16 10:15:00 +00:00
|
|
|
<script type='text/javascript'>
|
|
|
|
$(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()
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2014-04-28 02:23:24 +00:00
|
|
|
<% end %>
|