Merge branch 'design_team' into ldap
This commit is contained in:
commit
eba4671733
29 files changed
+191
-47
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<div class="tab-pane fade <%= "active in" if ad_banner_tab==@active%>" id=<%= ad_banner_tab.title.dehumanize %>>
|
||||
|
||||
<% if at_least_module_manager || sub_manager?(ad_banner_tab)%>
|
||||
<%= form_for ad_banner_tab,:url=> admin_ad_banner_path(ad_banner_tab),:method => :put,:class=>"input-medium" do |f| -%>
|
||||
<div class="adbanner-setup well">
|
||||
<!--<p><%#= t("admin.ad.banner_best_size") %>:</p>-->
|
||||
@@ -11,17 +11,25 @@
|
||||
<%= f.submit t("admin.ad.update_banner"), :class => 'btn' %>
|
||||
<%= f.submit t("cancel"),:type=>'reset', :class => 'btn' %>
|
||||
</div>
|
||||
<h3>圖片列表</h3>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<h3><%= t("admin.ad.picture_list")%></h3>
|
||||
<div class="adbanner-list">
|
||||
<div class="adbanner-action">
|
||||
<%= link_to t("admin.ad.new_image"),new_admin_ad_banner_ad_image_path(ad_banner_tab) ,:class => "btn btn-primary"%>
|
||||
<%= link_to t("modal.preview"), admin_realtime_preview_ad_banner_path(ad_banner_tab.id) , :class=>'preview_trigger btn btn-success'%>
|
||||
</div>
|
||||
<%if (at_least_module_manager || ad_banner_tab.cur_user_is_sub_manager_of(:edit) )%>
|
||||
<%= content_tag :div ,:class=>'adbanner-action' do%>
|
||||
<%= link_to t("admin.ad.new_image"),new_admin_ad_banner_ad_image_path(ad_banner_tab) ,:class => "btn btn-primary"%>
|
||||
<%= link_to t("modal.preview"), admin_realtime_preview_ad_banner_path(ad_banner_tab.id) , :class=>'preview_trigger btn btn-success'%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<ul class="clear">
|
||||
<%= render :partial => "ad_image_update", :collection => ad_banner_tab.ad_images,:as => :ad_image,:locals=>{:ad_banner => ad_banner_tab} %>
|
||||
</ul>
|
||||
<% if at_least_module_manager %>
|
||||
<%= show_ad_banner_permission_link ad_banner_tab%>
|
||||
<%= link_to t('admin.ad.delete_banner'),admin_ad_banner_path(ad_banner_tab),:class => 'btn',:method => :delete,:confirm => t('sure?') %>
|
||||
<% end -%>
|
||||
|
||||
<%#= render :partial => 'new_add_banner_file', :object => ad_banner_tab.ad_images.build, :locals => { :field_name => "new_ad_images[]", :f => f, :classes => "r_destroy" } %>
|
||||
</div>
|
||||
<% end -%>
|
||||
<%#= render :partial => 'preview_block',:locals=> {:ad_banner =>ad_banner_tab} %>
|
||||
</div>
|
||||
@@ -4,8 +4,10 @@
|
||||
<%= ad_image.display? ? "[#{t('admin.ad.showing')}]" : "[#{t('admin.ad.not_showing')}]" %>
|
||||
<%= "#{ad_image.post_date ||'NeedReset' }~#{ad_image.unpost_date || 'NeedReset'}" %>
|
||||
</p>
|
||||
<p>
|
||||
<%= link_to t('edit'),edit_admin_ad_banner_ad_image_path(ad_banner,ad_image),:class => 'btn btn-primary' %>
|
||||
<%= link_to t('delete'),admin_ad_banner_ad_image_path(ad_banner,ad_image),:class => 'btn',:method => :delete,:confirm => t('sure?') %>
|
||||
</p>
|
||||
<%if at_least_module_manager || sub_manager?(ad_image.ad_banner) %>
|
||||
<p>
|
||||
<%= link_to t('edit'),edit_admin_ad_banner_ad_image_path(ad_banner,ad_image),:class => 'btn btn-primary' %>
|
||||
<%= link_to t('delete'),admin_ad_banner_ad_image_path(ad_banner,ad_image),:class => 'btn',:method => :delete,:confirm => t('sure?') %>
|
||||
</p>
|
||||
<% end -%>
|
||||
</li>
|
||||
@@ -30,6 +30,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span id="ad_banner-modal-info"></span>
|
||||
<%= f.submit t('submit'), :class=>'btn btn-primary',:remote=>true %>
|
||||
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
|
||||
</div>
|
||||
|
||||
@@ -1 +1 @@
|
||||
alert("Error occures:<%= @ad_banner.errors.full_messages%>");
|
||||
$("#ad_banner-modal-info").append("<%= @ad_banner.errors.full_messages.join(',')%>");
|
||||
@@ -4,21 +4,23 @@
|
||||
<% 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 -%>
|
||||
|
||||
|
||||
<div id="post-body-content" class="clear">
|
||||
<ul id="banner_tab" class="nav nav-tabs">
|
||||
<% @ad_banners.each do |ab| %>
|
||||
<%= content_tag :li,link_to(ab.title,"##{ab.title.dehumanize}",:data=>{:toggle=>"tab"}),:class => (ab == @active ? 'active' : nil ) %>
|
||||
<%= content_tag :li,link_to(ab.title,"##{ab.title.dehumanize}",:data=>{:toggle=>"tab"}),:class => (ab == @active ? 'active' : nil ), :contenteditable=>"true" ,"data-edit-url"=>(admin_rename_ad_banner_path ab)%>
|
||||
<% end -%>
|
||||
<%#= content_tag :li,link_to(t("admin.ad.new_banner"),"#new-a-banner",:data=>{:toggle=>"modal"}),:id=>'new_ad_banner_tab_but',:class => (@active.nil? ? 'active' : nil ) %>
|
||||
<%= content_tag :li,link_to(t("admin.ad.new_banner"),"#new-a-banner",:data=>{:toggle=>"modal"}),:id=>'new_ad_banner_tab_but',:class => (@active.nil? ? 'active' : nil ) %>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-content" id="ad_banner-tab-content">
|
||||
<%= render :partial => 'ad_banner_tab',:collection => @ad_banners %>
|
||||
</div>
|
||||
<%#= render :partial => "modal_ad_banner_form"%>
|
||||
<%= render :partial => "modal_ad_banner_form"%>
|
||||
|
||||
</div>
|
||||
@@ -1,8 +1,14 @@
|
||||
$('<%= escape_javascript(content_tag(:li,link_to(@ad_banner.title,"##{@ad_banner.title}",:data=>{:toggle=>"tab"}))) %>').insertBefore("#new_ad_banner_tab_but");
|
||||
$('<%= escape_javascript(render(:partial => "ad_banner_tab",:locals => {:ad_banner_tab => @ad_banner})) %>').insertBefore($("#new-a-banner"));
|
||||
$('<%= escape_javascript(render(:partial => "ad_banner_tab",:locals => {:ad_banner_tab => @ad_banner})) %>').insertAfter($("#ad_banner-tab-content").children(".tab-pane").last());
|
||||
|
||||
$('.modal').modal('hide');
|
||||
$("#ad_banner-modal-info").empty();
|
||||
$("#new-a-banner form").each(function(){this.reset();});
|
||||
|
||||
$('#new-a-banner').unbind();
|
||||
$('#post-body-content').find(".nav.nav-tabs").children('li.active').removeClass("active");
|
||||
$("#ad_banner-tab-content").children(".tab-pane").removeClass("active");
|
||||
$('#post-body-content').find(".nav.nav-tabs").children('li[id!="new_ad_banner_tab_but"]').last().addClass("active");
|
||||
$("#ad_banner-tab-content").children(".tab-pane").last().addClass("active");
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<!--請程式務必將圖片尺寸加入到行內裡-->
|
||||
<%= image_tag @ad_image.file rescue ''%>
|
||||
</div>
|
||||
<span class="alert widgetInfo">此區塊圖片尺寸請使用580px × 225px</span>
|
||||
<span class="alert widgetInfo"><%= t("admin.ad.widget_info_for_ad_image_size",:best_size=> @ad_image.ad_banner.best_size) if !@ad_image.ad_banner.best_size.empty?%></span>
|
||||
<div class="controls file-upload input-prepend">
|
||||
<label class="control-label add-on btn" for="input-upload">
|
||||
<%= t(:browse) %>
|
||||
|
||||
Reference in new issue
Block a user