forked from saurabh/orbit4-5
fix for chinese simplified and also new user added
This commit is contained in:
parent
051b165298
commit
384cc4d6f4
|
@ -21,7 +21,7 @@ class Site
|
|||
field :desktop_closed, :type => Boolean, :default => false
|
||||
field :enable_language_detection, :type => Boolean, :default => false
|
||||
field :enable_zh_cn, :type => Boolean, :default => true
|
||||
field :default_locale, :default => "en"
|
||||
field :default_locale, :default => "zh_tw"
|
||||
field :mobile_on, :type => Boolean, :default => false
|
||||
field :announcement_category, :type => Array, :default=>[]
|
||||
field :mobile_bar_color, :type => Array, :default=>[]
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<% if @site_in_use_locales.count > 1 %>
|
||||
<% if @site_in_use_locales.count > 1 || current_site.enable_zh_cn %>
|
||||
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
|
||||
<span id="language"><%= t((locale==:zh_tw ? :zh_tw_ : locale.to_s)) %></span>
|
||||
<ul>
|
||||
|
|
|
@ -246,4 +246,20 @@ if User.count==0
|
|||
user.email = "orbit@rulingcom.com"
|
||||
user.approved = true
|
||||
user.save
|
||||
|
||||
profile = MemberProfile.new
|
||||
profile.first_name_translations = {:en=>'Admin', :zh_tw=>'Admin'}
|
||||
profile.last_name_translations = {:en=>'Admin', :zh_tw=>'Admin'}
|
||||
profile.email = "service@rulingcom.com"
|
||||
profile.save
|
||||
|
||||
user = User.new
|
||||
user.workgroup = group
|
||||
user.member_profile = profile
|
||||
user.user_name = "admin"
|
||||
user.password = "Ab-5508881"
|
||||
user.email = "servicet@rulingcom.com"
|
||||
user.approved = true
|
||||
user.save
|
||||
|
||||
end
|
Loading…
Reference in New Issue