Merge branch 'design_team' of https://github.com/Rulingcom/orbit into design_team

Conflicts:
	vendor/built_in_modules/news/app/helpers/panel/news/back_end/news_bulletins_helper.rb
This commit is contained in:
Matthew K. Fu JuYuan committed 2012-05-18 18:50:10 +08:00
commit 661fcafe70
32 files changed
+53 -36

No files matched your search

@@ -1,7 +1,7 @@
class Admin::AdBannersController < OrbitBackendController
layout "new_admin"
before_filter :authenticate_user!
before_filter :for_app_manager,:except => [:index,:show]
before_filter :for_app_manager,:except => [:index,:show,:update,:realtime_preview]
before_filter :for_app_sub_manager
def rename
@@ -1,8 +1,8 @@
class Admin::AdImagesController < ApplicationController
class Admin::AdImagesController < OrbitBackendController
layout 'new_admin'
before_filter :authenticate_user!
before_filter :is_admin?
before_filter :for_app_sub_manager
def edit
@ad_banner = AdBanner.find params[:ad_banner_id]
@ad_image = @ad_banner.ad_images.find params[:id]
@@ -17,7 +17,6 @@ class Admin::AssetCategoriesController < OrbitBackendController
def edit
@asset_category = AssetCategory.find(params[:id])
@i18n_variable = @asset_category.i18n_variable
@url = admin_asset_categories_path(@asset_category)
end
@@ -30,7 +30,7 @@ class Admin::DashboardsController < ApplicationController
module_app_class = module_app.classify.constantize
objects = module_app_class.order_by(:updated_at, :desc).limit(10)
objects.each do |object|
a.merge!(object => object.updated_at)
a.merge!(object => object.updated_at) unless (object.archived rescue nil)
end
end
sorted_objects = a.sort {|a,b| b[1]<=>a[1]}
@@ -43,7 +43,7 @@ class Admin::DashboardsController < ApplicationController
module_app_class = module_app.classify.constantize
objects = module_app_class.order_by(:view_count, :desc).limit(10)
objects.each do |object|
a.merge!(object => object.view_count) if object.view_count > 0
a.merge!(object => object.view_count) if object.view_count > 0 && (!object.archived rescue true)
end
end
sorted_objects = a.sort {|a,b| b[1]<=>a[1]}
@@ -21,7 +21,6 @@ class Admin::InfosController < ApplicationController
def edit
@attribute = Info.find(params[:id])
@i18n_variable = @attribute.i18n_variable
render :template => 'admin/attributes/edit'
end
@@ -21,7 +21,6 @@ class Admin::RolesController < ApplicationController
def edit
@attribute = Role.find(params[:id])
@i18n_variable = @attribute.i18n_variable
render :template => 'admin/attributes/edit'
end
+1 -1
View File
@@ -181,7 +181,7 @@ module ApplicationHelper
end
def display_visitors(options={})
Impression.where(options).distinct(:session_hash).count
Impression.where(options).and(:referrer.ne => nil).distinct(:session_hash).count
end
def display_visitors_today
@@ -7,6 +7,10 @@
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
<%= f.label :transition_sec, t('admin.ad.transition_sec') %>
<%= f.text_field :transition_sec,:placeholder=>t('admin.ad.sec_place_holder'),:class=> "span3" %> <%= t("admin.ad.trans_unit_sec") %>
<%if at_least_module_manager%>
<%= f.label :best_size, t('admin.ad.best_size') %>
<%= f.text_field :best_size %> Ex: 500px x 300px
<% end -%>
<br>
<%= f.submit t("admin.ad.update_banner"), :class => 'btn' %>
<%= f.submit t("cancel"),:type=>'reset', :class => 'btn' %>
@@ -21,6 +21,13 @@
<%= f.text_field :transition_sec %> <%= t("admin.ad.trans_unit_sec") %>
</div>
</div>
<div class="control-group">
<%= f.label :best_size, t('admin.ad.best_size'),:class => "control-label" %>
<div class="controls">
<%= f.text_field :best_size %> Ex: 500px x 300px
</div>
</div>
<div class="control-group">
<%= f.label :ad_fx, t('admin.ad.ab_fx') %>
+8 -3
View File
@@ -13,11 +13,16 @@
<ul id="banner_tab" class="nav nav-tabs">
<% @ad_banners.each do |ab| %>
<%= content_tag :li ,:class => (ab == @active ? 'active' : nil) do %>
<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) } )%>
<%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("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 ) if at_least_module_manager%>
</ul>
+4 -1
View File
@@ -80,7 +80,10 @@
<!--請程式務必將圖片尺寸加入到行內裡-->
<%= image_tag @ad_image.file rescue ''%>
</div>
<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>
<% if !@ad_image.ad_banner.best_size.empty?%>
<span class="alert widgetInfo"><%= t("admin.ad.widget_info_for_ad_image_size",:best_size=> @ad_image.ad_banner.best_size) %>
</span>
<% end -%>
<div class="controls file-upload input-prepend">
<label class="control-label add-on btn" for="input-upload">
<%= t(:browse) %>