1 parent
2608b72d65
commit
f530eb7112
6 files changed
+1
-49
No files matched your search
@@ -15,4 +15,4 @@ $('a.remove_mark').live("click",function(){
|
||||
$(this).next().remove();
|
||||
$(this).remove();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
@@ -16,15 +16,6 @@ class AdBanner
|
||||
|
||||
embeds_many :ad_images, :cascade_callbacks => true
|
||||
|
||||
FX_TYPES = ["blindX","blindY","blindZ","cover","curtainX","curtainY","fade","fadeZoom","growX","growY","scrollUp","scrollDown","scrollLeft","scrollRight","scrollHorz","scrollVert","shuffle","slideX","slideY","toss","turnUp","turnDown","turnLeft","turnRight","uncover","wipe","zoom"]
|
||||
|
||||
def display?
|
||||
if (self.post_date <= Date.today && (self.unpost_date.nil? || self.unpost_date>= Date.today))
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def new_ad_images=(*attrs)
|
||||
attrs[0].each do |attr| #Loop by JSs,Themes,Imgs
|
||||
unless attr[:file].nil?
|
||||
|
||||
@@ -13,13 +13,4 @@ class AdImage
|
||||
|
||||
embedded_in :ad_banner
|
||||
|
||||
def get_delay_time
|
||||
time = ''
|
||||
if self.time_to_next.nil?
|
||||
time = '1000'
|
||||
else
|
||||
time = (self.time_to_next.to_i * 1000).to_s
|
||||
end
|
||||
time
|
||||
end
|
||||
end
|
||||
@@ -24,7 +24,6 @@
|
||||
<%= f.label :unpost_date, t('admin.unpost_date') %>
|
||||
<%= f.date_select :unpost_date, :order => [:year, :month, :day], :use_month_numbers => true %>
|
||||
|
||||
<%= f.date_select :unpost_date, :order => [:year, :month, :day], :use_month_numbers => true,:prompt => { :day => t('form.date_unlimited'), :month => t('form.date_unlimited'), :year => t('form.date_unlimited') } %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :context, t('admin.context') %>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<td><%= t('admin.unpost_date') %></td>
|
||||
<td><%= t('admin.context') %></td>
|
||||
<td><%= t('admin.direct_to_after_click') %></td>
|
||||
<td><%= t('admin.now_display?') %></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<% @ad_banners.each do |ad_banner| %>
|
||||
@@ -29,12 +28,9 @@
|
||||
<td><%= ad_banner.picture_position %></td>
|
||||
<td><%= ad_banner.post_date %></td>
|
||||
<td><%= ad_banner.unpost_date %></td>
|
||||
<td><%= ad_banner.unpost_date.nil?? t('form.date_unlimited'): ad_banner.unpost_date %></td>
|
||||
<td><%= ad_banner.context %></td>
|
||||
<td><%= ad_banner.direct_to_after_click %></td>
|
||||
<td class="action">
|
||||
<td><%= ad_banner.display? %></td>
|
||||
<td class="action">
|
||||
<%= link_to t(:show), admin_ad_banner_path(ad_banner), :class => 'show' %>
|
||||
<%= link_to t(:edit), edit_admin_ad_banner_path(ad_banner), :class => 'edit' %>
|
||||
<%= link_to t(:delete), admin_ad_banner_path(ad_banner), :confirm => t('sure?'), :method => :delete, :class => 'delete' %>
|
||||
|
||||
Reference in new issue
Block a user