Updated ADBanner with fixes on index page, ADImage with fixes
Conflicts: app/views/admin/ad_banners/index.html.erb app/views/admin/ad_images/_form.html.erb vendor/built_in_modules/ad_banner/init.rb
This commit is contained in:
1 parent
a5c800d3fe
commit
a2e9aa2e0b
14 files changed
+414
-157
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<div class="content">
|
||||
<%= form_for(:ad_banner, :url => admin_ad_banners_path) do |f| %>
|
||||
<fieldset>
|
||||
<legend>Ad Banner</legend>
|
||||
<label>Banner Name</label>
|
||||
<%= f.text_field :title, :class=>"input-large", :placeholder=>"Banner Name" %>
|
||||
<span class="help-block">Banner Name only english</span>
|
||||
<label for="timeout">Ste</label>
|
||||
<%= f.text_field :transition_sec, :class => 'input-large', :placeholder => 'Time' %>
|
||||
<span class="help-block">Please enter the number of seconds</span>
|
||||
<label>Best Size</label>
|
||||
<%= f.text_field :best_size, :class=>"input-large", :placeholder=>"Banner Size" %>
|
||||
<span class="help-block">Best Size EX:120x30 </span>
|
||||
<label>Effect</label>
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
<div class="preview">
|
||||
<%= image_tag "slideshow_preview_A.png", :width=>220 %>
|
||||
<%= image_tag "slideshow_preview_B.png", :width=>220 %>
|
||||
</div>
|
||||
<span class="help-block">Effect</span>
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="content">
|
||||
<%= form_for(:ad_banner, :url => admin_ad_banners_path, :remote => true) do |f| %>
|
||||
<fieldset>
|
||||
<legend>Ad Banner</legend>
|
||||
<label>Banner Name</label>
|
||||
<%= f.text_field :title, :class=>"input-large", :placeholder=>"Banner Name" %>
|
||||
<span class="help-block">Banner Name only english</span>
|
||||
<label for="timeout">Ste</label>
|
||||
<%= f.text_field :transition_sec, :class => 'input-large', :placeholder => 'Time' %>
|
||||
<span class="help-block">Please enter the number of seconds</span>
|
||||
<label>Best Size</label>
|
||||
<%= f.text_field :best_size, :class=>"input-large", :placeholder=>"Banner Size" %>
|
||||
<span class="help-block">Best Size EX:120x30 </span>
|
||||
<label>Effect</label>
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
<div class="preview">
|
||||
<%= image_tag "slideshow_preview_A.png", :width=>220 %>
|
||||
<%= image_tag "slideshow_preview_B.png", :width=>220 %>
|
||||
</div>
|
||||
<span class="help-block">Effect</span>
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -1,34 +1,51 @@
|
||||
<% content_for :page_specific_css do -%>
|
||||
<%#= stylesheet_link_tag "admin/ad_banner_preview" %>
|
||||
<% end -%>
|
||||
<% content_for :page_specific_javascript do -%>
|
||||
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>
|
||||
<%= javascript_include_tag "inc/modal-preview" %>
|
||||
<%= javascript_include_tag "lib/contenteditable" %>
|
||||
|
||||
<% end -%>
|
||||
<% set_default_index do
|
||||
objects @ad_banners
|
||||
|
||||
|
||||
<div id="post-body-content" class="clear">
|
||||
<ul id="banner_tab" class="nav nav-tabs">
|
||||
<% @ad_banners.each do |ab| %>
|
||||
<%= content_tag :li ,:class => (ab == @active ? 'active' : nil) do %>
|
||||
<%if at_least_module_manager%>
|
||||
<i class="icons-pencil"></i>
|
||||
<%= link_to(ab.title,"##{ab.title.dehumanize}",:contenteditable=>"false",:data=>{:toggle=>"tab" ,'edit-url' =>(admin_rename_ad_banner_path ab) } )%>
|
||||
<% else %>
|
||||
<%= link_to(ab.title,"##{ab.title.dehumanize}",:data=>{:toggle=>"tab" } )%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li,link_to(t('new.banner'),"#new-a-banner",:data=>{:toggle=>"modal"}),:id=>'new_ad_banner_tab_but',:class => (@active.nil? ? 'active' : nil ) if at_least_module_manager%>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="ad_banner-tab-content">
|
||||
<%= render :partial => 'ad_banner_tab',:collection => @ad_banners %>
|
||||
</div>
|
||||
<%= render :partial => "modal_ad_banner_form"%>
|
||||
|
||||
quick_edit_link type: 'edit',
|
||||
link: 'edit_admin_ad_banner_path'
|
||||
quick_edit_link type: 'detail'
|
||||
quick_edit_link type: "add image",
|
||||
link: 'new_admin_ad_banner_ad_image_path'
|
||||
quick_edit_link type: "Images",
|
||||
link: 'admin_ad_banner_ad_images_path'
|
||||
|
||||
field type: 'field',
|
||||
db_field: 'title',
|
||||
translation: 'title',
|
||||
sort: 'title',
|
||||
link: 'admin_ad_banner_path',
|
||||
quick_edit: true,
|
||||
header_class: 'span5'
|
||||
|
||||
field type: 'field',
|
||||
db_field: 'ad_fx',
|
||||
translation: 'ad_fx',
|
||||
sort: 'ad_fx',
|
||||
link: 'admin_ad_banner_path',
|
||||
quick_edit: true,
|
||||
header_class: 'span5'
|
||||
|
||||
field db_field: 'best_size',
|
||||
translation: 'best_size',
|
||||
header_class: 'span5'
|
||||
|
||||
|
||||
filter_field type: 'objects',
|
||||
values: @tags,
|
||||
translation: 'tags',
|
||||
object_field: 'name'
|
||||
|
||||
end %>
|
||||
<%= render 'admin/default_index/index' %>
|
||||
|
||||
<!-- footer -->
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add_new), "#add-banner", :class => "btn btn-primary open-slide"%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="add-banner" class="nano" style="display:none">
|
||||
<%= render 'new' %>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
<%= render 'new' %>
|
||||
@@ -0,0 +1 @@
|
||||
$('#view-page .content').html("<%= j render 'new' %>");
|
||||
Reference in new issue
Block a user