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

Conflicts:
	app/helpers/attribute_fields_helper.rb
	app/views/admin/infos/_form.html.erb
	config/locales/zh_tw.yml
This commit is contained in:
Matthew K. Fu JuYuan committed 2012-11-16 15:42:39 +08:00
commit b4a2737407
373 files changed
+10342 -6551

No files matched your search

+2 -2
View File
@@ -22,8 +22,8 @@ module Admin::AdBannersHelper
ad_banner.object_auths.new(title: type ).save
oa = ad_banner.get_object_auth_by_title(type)
end
# link_to t('announcement.bulletin.cate_auth'), edit_admin_object_auth_path(oa)
link_to t('admin.ad.cate_auth'),admin_object_auth_ob_auth_path(oa),:class => "btn btn-warning"
# link_to t(:category_auth), edit_admin_object_auth_path(oa)
link_to t(:category_auth),admin_object_auth_ob_auth_path(oa),:class => "btn btn-warning"
end
+3 -3
View File
@@ -15,9 +15,9 @@ module Admin::ItemsHelper
ret << "<div class='with_action'><i class='icons-moves'></i>"
ret << (link_to node.title, dest, :class => 'js_history')
ret << "<div class='quick-edit hide'>"
ret << (link_to t('admin.edit'), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), :class => 'js_history') if node.class.to_s.eql?('Page')
ret << (link_to t('admin.new_page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page js_history') if node.class.to_s.eql?('Page')
ret << (link_to t('admin.new_link'), new_admin_link_path(:parent_id => node.id), :class => 'new_link js_history') if node.class.to_s.eql?('Page')
ret << (link_to t(:edit), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), :class => 'js_history') if node.class.to_s.eql?('Page')
ret << (link_to t('new.page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page js_history') if node.class.to_s.eql?('Page')
ret << (link_to t('new.link'), new_admin_link_path(:parent_id => node.id), :class => 'new_link js_history') if node.class.to_s.eql?('Page')
ret << (link_to t(:delete), eval("delete_admin_#{node.class.to_s.downcase}_path(node, :authenticity_token => form_authenticity_token)"), :confirm => t('sure?'), :class => 'delete js_history')
ret << "</div>"
ret << "</div>"
+1 -1
View File
@@ -15,6 +15,6 @@ module Admin::ModuleAppsHelper
def get_auth_by(manager_obj)
showing_name = manager_obj.rule_creator==current_user ? t('me') : manager_obj.rule_creator.name
t("admin.user_role.auth.auth_by",:user_display_name => showing_name)
t("auth.auth_by",:user_display_name => showing_name)
end
end
+23
View File
@@ -0,0 +1,23 @@
module Admin::WebComponentHelper
include ActionView::Helpers::TagHelper
def alert_block_tag(title="",context="",*args)
content_tag(:div,:class=>"alert alert-block alert-error fade in") do
a = ActiveSupport::SafeBuffer.new
a << button_tag( 'x',:class=>"close",:data=>{:dismiss=>"alert"}) if (args.first[:close] rescue false)
a << content_tag(:h4,:class=>"alert-heading") do
title
end
a << content_tag(:p) do
context
end
# TODO : 可以提供更多功能
# a << content_tag(:p) do
# b = link_to("Take this action","",:class=>"btn btn-danger")
# b << link_to("Or do this","",:class=>"btn")
# b
# end
end
end
end
+5 -1
View File
@@ -262,11 +262,15 @@ module ApplicationHelper
js << "<meta property='og:description' content='#{object.subtitle}' />\n" rescue ''
js << "<meta property='og:image' content='#{object.image.url}' />\n" rescue ''
content_tag :div, :class => 'fb' do
concat social_share_button_tag(object.title, :fb_url => "http://#{request.env['HTTP_HOST']}/share/#{object.class.to_s.underscore}/#{object.id}?key=#{key}", :image => "http://#{request.env['HTTP_HOST']}#{object.image.url}")
concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image.url}")
# concat javascript_tag "$('head').append('#{j js}');"
end
end
def generate_fb_url(object,key)
"http://#{request.env['HTTP_HOST']}/share/#{object.class.to_s.underscore}/#{object.id}?key=#{key}"
end
def wrap_string_with(str,options={})
line_width = options[:line_width] || 12
wrap_mark = options[:wrap_mark] || "<br />"
+1 -1
View File
@@ -34,7 +34,7 @@ module AttributeFieldsHelper
place_holder= @panel_setting["placeholder"][key] rescue ''
result = text_area_tag(get_field_name_base + key_field, value,@markup_options.merge({:placeholder=>place_holder,:for=>key}))
add_ext= @attribute_value.address_ext[key] rescue {}
add_ext= @attribute_value.address_ext[key] rescue []
result << hidden_field_tag(get_basic_field_name_base+"[address_ext][#{key}][county]",add_ext["county"],:class=>"county_#{key}")
result << hidden_field_tag(get_basic_field_name_base+"[address_ext][#{key}][street_address]",add_ext["street_address"],:class=>"street_address_#{key}")
+1 -1
View File
@@ -45,7 +45,7 @@ module OrbitBackendHelper
end
def show_toggle_archive_btn(object)
object.disable ? t("object_disable.change_to_false") : t("object_disable.change_to_true")
object.disable ? t(:disable) : t(:enable)
end
end