forked from saurabh/orbit4-5
fixed delete and update user issue and also the language switch
This commit is contained in:
parent
2c06c03f4d
commit
856b590e1b
|
@ -18,17 +18,14 @@
|
|||
/* Font Awesome styles
|
||||
------------------------------------------------------- */
|
||||
/* includes sprites.less reset */
|
||||
.ui-icon,
|
||||
[class^="icon-"],
|
||||
[class*=" icon-"] {
|
||||
font-family: 'FontAwesome';
|
||||
}
|
||||
.ui-icon,
|
||||
[class^="icons-"],
|
||||
[class*=" icons-"] {
|
||||
font-family: 'entypo';
|
||||
}
|
||||
.ui-icon,
|
||||
[class^="icon"],
|
||||
[class*=" icon"] {
|
||||
font-weight: normal;
|
||||
|
@ -46,7 +43,6 @@
|
|||
|
||||
|
||||
}
|
||||
.ui-icon,
|
||||
[class^="icon"]:before,
|
||||
[class*=" icon"]:before {
|
||||
text-decoration: inherit;
|
||||
|
@ -54,7 +50,6 @@
|
|||
speak: none;
|
||||
}
|
||||
/* makes sure icons active on rollover in links */
|
||||
a .ui-icon,
|
||||
a [class^="icon"],
|
||||
a [class*=" icon"] {
|
||||
display: inline-block;
|
||||
|
@ -64,8 +59,6 @@ a [class*=" icon"] {
|
|||
vertical-align: -10%;
|
||||
font-size: 1.3333333333333333em;
|
||||
}
|
||||
.btn .ui-icon
|
||||
.nav .ui-icon,
|
||||
.btn [class^="icon"],
|
||||
.nav [class^="icon"],
|
||||
.btn [class*=" icon"],
|
||||
|
@ -74,22 +67,18 @@ a [class*=" icon"] {
|
|||
/* keeps button heights with and without icons the same */
|
||||
line-height: .6em;
|
||||
}
|
||||
.btn .ui-icon.icon-spin,
|
||||
.nav .ui-icon.icon-spin,
|
||||
.btn [class^="icon"].icon-spin,
|
||||
.nav [class^="icon"].icon-spin,
|
||||
.btn [class*=" icon"].icon-spin,
|
||||
.nav [class*=" icon"].icon-spin {
|
||||
display: inline-block;
|
||||
}
|
||||
li .ui-icon,
|
||||
li [class^="icon"],
|
||||
li [class*=" icon"] {
|
||||
display: inline-block;
|
||||
width: 1.25em;
|
||||
text-align: center;
|
||||
}
|
||||
li .ui-icon.icon-large,
|
||||
li [class^="icon"].icon-large,
|
||||
li [class*=" icon"].icon-large {
|
||||
/* increased font size for icon-large */
|
||||
|
@ -100,7 +89,6 @@ ul.icons {
|
|||
list-style-type: none;
|
||||
text-indent: -0.75em;
|
||||
}
|
||||
ul.icons li .ui-icon,
|
||||
ul.icons li [class^="icon"],
|
||||
ul.icons li [class*=" icon"] {
|
||||
width: .75em;
|
||||
|
|
|
@ -69,9 +69,13 @@ class Admin::SitesController < OrbitAdminController
|
|||
elsif params[:site][:enable_language_detection].eql?("1")
|
||||
Site.update_all({:default_locale => nil})
|
||||
end
|
||||
|
||||
if !@site.in_use_locales.include?I18n.locale
|
||||
I18n.locale = @site.in_use_locales.first
|
||||
redirect_to admin_site_preference_path(current_site)
|
||||
else
|
||||
redirect_to :back
|
||||
end
|
||||
end
|
||||
|
||||
def update_manager
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ class User
|
|||
has_many :authorizations
|
||||
belongs_to :member_profile
|
||||
has_one :facebook, :autosave => true, :dependent => :destroy
|
||||
has_one :desktop, :autosave => true, :dependent => :destroy
|
||||
has_one :desktop, :dependent => :destroy
|
||||
|
||||
|
||||
validates :user_name, presence: true, uniqueness: true
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<% locale = session[:zh_cn] ? :zh_cn : I18n.locale %>
|
||||
<span id="language"><%= t((locale==:zh_tw ? :zh_tw_ : locale.to_s)) %></span>
|
||||
<ul>
|
||||
<% @site_valid_locales.each do |l| %>
|
||||
<% @site_in_use_locales.each do |l| %>
|
||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
|
||||
<a href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue