From ad9f9bbf5c6fb57dcecdab1a3ed6838b7a92d552 Mon Sep 17 00:00:00 2001 From: chris2tof Date: Sat, 19 Nov 2011 21:47:18 +0800 Subject: [PATCH] Final Ray's modifications --- app/assets/images/Thumbs.db | Bin 61440 -> 62976 bytes app/assets/images/icon.png | Bin 5317 -> 6608 bytes app/assets/images/orbitbar.png | Bin 198 -> 1010 bytes app/assets/images/switch.png | Bin 0 -> 2182 bytes app/assets/stylesheets/member.css.erb | 67 +++++++++++++++++- app/models/user/user.rb | 2 +- app/models/user/user_attribute_model.rb | 2 +- .../_attribute_model.html.erb | 18 ++--- .../user_attribute_models/_form.html.erb | 4 +- .../admin/user_attribute_models/edit.html.erb | 19 ++--- .../user_attribute_models/index.html.erb | 56 ++++----------- .../admin/user_attribute_models/new.html.erb | 19 ++--- .../toggle_enable.js.erb | 3 +- app/views/admin/users/_form.html.erb | 2 +- app/views/admin/users/edit.html.erb | 17 ++--- app/views/admin/users/index.html.erb | 12 ---- app/views/admin/users/new.html.erb | 17 ++--- app/views/admin/users/show.html.erb | 10 --- app/views/layouts/member.html.erb | 9 ++- 19 files changed, 122 insertions(+), 135 deletions(-) create mode 100644 app/assets/images/switch.png diff --git a/app/assets/images/Thumbs.db b/app/assets/images/Thumbs.db index 964d8da85783f56f9ecc8eb37c507b9a78a62bf2..f9d32b5f625bf17a3cde65784f73ba03f1ea1bdd 100644 GIT binary patch delta 1721 zcmYk(c{JNu6bJBMgou6XprTZ*r`9BDUt*X+L+!;(wG3))s9l^&Y(?zSqSYZ^$_+m4Tr^ zr1-zsI2{H-Ss?hgFwhCe0y+nwL5~2pNXQb*R{zbGkQrn~)uQTC-NcL##bE1+7(=jl z91%hRa|uuilmX>H1yBi80o4E%xB^@SYJggx4!8zf2kLD@r>)ODH zR7)Vyo&UZER3X0ickHl1Te0^kR~bn)Nf61nySey+ZUE>Y5#Zdl%TT6vTOTC_ySq5~ z2f0qv&U>i`9D34^9Wn{YUw%T_n~D9d9Tj`BsJO4SxLD#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J6QyDd+0iS(}#^*Wty--Znv*7}zBs;{p{etv$rFyqJ-3H&s@ zUf;cW^JZRNKA!cmWy|^n%Gi9q5x{ZpPk(>SOiN4q>-O#29{~?wBj@~=0%i2@jRu3^ zbZ2MhO9q4CoL>Vxlb)V_%4)SPHAQWxk!h27h?) z;DKl7&Yec1(WnORVT`TioF9sD)Fj{&5sn@`nlH=pX{}Z}SKR=LqQGD56sT)8oMN#f)G@5G8`RO>lFNlEa+u)pE)oQg%Wm&!!0Q_x@ zMpGFKyigpb7Xmeaq9`{t8qEsM`F}ZqD?x5YEuRZwjA^{!|CxYk3IRXZYEIsN7@*~x zUrEp$k$@lTQd$CjjPQjfLBJJCuHv@dj_5(jxBLo$@bSRkRZ&qf0Fg#as=Lqvug($Z1isnlzC?)*zH#Bgg;$RsKTi4i`J;Xf@JvQV#-)LQfpNqYMUjc< zRdwtTB?|b3g@xyahlh!XXk=tW-2jHHtgKHz{P4p-;4S`vTa+l^yIijGYPh}zm^W|U z$k5QxIPkJ8KOmyoK%*v6qJLZLDBt7poYv`d53^WTuU>^L%gE2qS0`1z(r7fR7-J%h z7|&TvA~JeBo^$F3P)nBOds?lwnlUEQi1B{IWsF_b>2ymy9?!J^;BRZS+R9+yh2k*1 z5U2rUS-z>&YF9AEL>e&}$rPUpVvK3L;6)lSS@3-g06@za6KTXm!WtKPJo^6t5&`nN T2ReRV00000NkvXXu0mjfaySi2 diff --git a/app/assets/images/orbitbar.png b/app/assets/images/orbitbar.png index 6cb3d6bb03a5b2277cfb0eb34f424387822c2935..4f27a0a274441b22f1d002bcc52b6b3ededdd6bc 100644 GIT binary patch literal 1010 zcmaJ=PiWIn9L|_bH<{axD#$bQrcGYDc5TA4t!wtDxQx*iR$<7}kzeqo!(|IzUC384W%9@Lqgn@Giq%5s~(nvE_Zhb&Q4Aah< znJmew(~^!YP75%cZ#k6BFhe80qv<6?Kn@j5TV}t$-C%)f$n1Png{qT8MRTg+qPfaU zMz54~(O^f0!H_Re0Sgfg_|}r`Nxsb1bS1hDj(HZ;AfzO-$ELFCEJ$J(fhY$hJzKo|;;7s5P@g#;)?V-gfV{bOk~*T_q0WuhL7?qs$|h$HcQxm@PT0~~e> zyda7q55s&o9HNMjw_+2`57}OSLqS2F?wSrUu?+%6Er*wh%u=VvDOgTZ*7oXUq6Oo9 z&EW+O1}Qaws``JZWi`D6y-3-P{jVjI- zF~MFDJ0Lk1g4bZlWbOXa&omkrm{cw~;a7Vhhw#mdw^(VlDORT%)y@ zcuOu%&G5m+{&mrfBicQ|ve~wD(`03WI{pfH~+f*;#y!iU@_OpeB z{q5(&t3Nlls@2`TY1rO*sdw`nn;kvX|A1+qfStXIOxumsgPpVAo(8WlH9n)f99z8m E2d&yi=l}o! delta 41 vcmeywevEN~2NOfa9h&142*0HT=DgP*1Ru2$^ZnOu6{1-oD!M<8N&^H diff --git a/app/assets/images/switch.png b/app/assets/images/switch.png new file mode 100644 index 0000000000000000000000000000000000000000..e4b1930a89b9b450ffb6a9e496b458cb1e4e7a66 GIT binary patch literal 2182 zcmaJ@YgiL!8cn%hRbq;G0mdLokz6JONMce@2oSlL0z#^Ygk%B%l8MP+B0MaJRYYxp zg%zWS4}yXMqGDw!C|wn4gB80!mYwIB`EKW&_kF+j{FoeW zXn?iFItvU2W6cTl3qwa2^xb4;f_~?jDqD0|i?De}I4nYxd^v>KE`;MCfFt3@LtzkK zc<8|Q5EFwj#ET<%2rndGAS1c~f}tW@#-n$Qa)srWJyNF*g_74)GCK9s$G2OSi~PfDu@c0LuX1 za1SB~M2V$BSgCl24+&v#qzZ&D6+j$679Ld~ip4?(Z99$T=}QJd(3cK^Y>-BF2k9Pk zvKJlnq=KFvOI$x#kRpMk$P!ohCzrA;chL$G85-FSl8X;QLVr0d0p69&5HFX@4uAh; z_1<%Z%jbd?vP>N$G#S!jWB;qsOIxUW7N;L57+GzCn?LGV)K0pD#BcFo2mV;;Oj<4j#-BnFpfueIDC;; zbX~HL{nR?*Do&pOaLm(fBuA-DKH8C;wk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z$pHcrM>o~6YYOtH-E!?$kTy1T8W+1L*A)2sMe_b@hn@y~$64)wdXBR1) repeat left top; margin-bottom:20px; @@ -173,6 +181,9 @@ h1 { .main_list li.list_item:hover { border:1px solid #3699dd; } +.main_list li.disable { + opacity:0.6; +} .main_list li.list_item:hover span { line-height:38px; } @@ -206,6 +217,13 @@ h1 { #main .action a.delete{ background-position:-38px top; } +#main a.switch{ + background:url(<%= asset_path 'switch.png' %>) no-repeat left 3px; + width:40px; +} +#main .disable a.switch{ + background:url(<%= asset_path 'switch.png' %>) no-repeat left bottom; +} #main .action a.show:hover{ background-position:left -19px; } @@ -238,19 +256,37 @@ h1 { #add_new a:hover { background-position: -54px 3px; } +.buttom { + float:right; +} #confirm a{ background-position:4px -70px; } #confirm a:hover{ background-position: 4px -51px; } +#create a{ + background-image: none; + padding: 0 10px; +} +#update a{ + background-position:4px -112px; +} +#update a:hover{ + background-position:4px -89px; +} +#back a{ + background-position:4px -156px; +} +#back a:hover{ + background-position:4px -133px; +} .buttom a { - margin-bottom: 20px; + margin:0 0 20px 10px; background-image:url(<%= asset_path 'icon.png' %>); background-repeat:no-repeat; font-size:12px; color:#FFF; - float:right; display:inline-block; padding:0 10px 0 25px; background-color: rgba(0, 0, 0, 0.75); @@ -279,6 +315,21 @@ h1 { position:absolute; top:-30px; } +#porfile .user_mail { + text-align: center; + background:url(<%= asset_path 'upload_but.png' %>) repeat-x left top; + border:none; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + padding:3px 10px 1px; + margin-top:10px; + width:110px; + height: 21px; + font-size: 12px; + color:#666666; + text-shadow: 0 1px 0 #FFFFFF; +} #porfile label { display:block; text-shadow: 0 1px 0 #FFFFFF; @@ -326,6 +377,7 @@ h1 { margin-left:180px; } #person { + text-align:center; left: 265px; position: fixed; top: 75px; @@ -340,7 +392,16 @@ h1 { -webkit-box-shadow: 0px 0px 4px #180902;/* Safari 和 Chrome */ box-shadow: 0px 0px 4px #180902; /* Opera 10.5 + */ } +#person .mail { + color: #FFFFFF; + font-size: 12px; + text-shadow:0px 1px 0px #333; + font-weight:bold; + background:url(<%= asset_path 'line.png' %>) repeat-x left top; + padding-top:10px; +} #upload, #edit{ + margin: 0 auto; display:block; text-shadow: 0 1px 0 #FFFFFF; background:url(<%= asset_path 'upload_but.png' %>) repeat-x left top; diff --git a/app/models/user/user.rb b/app/models/user/user.rb index f582dc04..31e182ac 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -52,7 +52,7 @@ class User infos = self.user_infos.detect {|info| info.key.to_s.eql?('profile') } if infos first_name = infos.attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil - last_name = infos.attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil + last_name = infos.attribute_values.detect {|value| value.key.to_s.eql?('family_name') }[I18n.locale.to_s] rescue nil return "#{first_name} #{last_name}" else return nil diff --git a/app/models/user/user_attribute_model.rb b/app/models/user/user_attribute_model.rb index a70c9f85..c8aea4b2 100644 --- a/app/models/user/user_attribute_model.rb +++ b/app/models/user/user_attribute_model.rb @@ -53,7 +53,7 @@ class UserAttributeModel end def is_disabled? - self.disabled + self.disabled.blank? ? false : self.disabled end def get_enabled_attribute_models diff --git a/app/views/admin/user_attribute_models/_attribute_model.html.erb b/app/views/admin/user_attribute_models/_attribute_model.html.erb index 10dac715..819f584b 100644 --- a/app/views/admin/user_attribute_models/_attribute_model.html.erb +++ b/app/views/admin/user_attribute_models/_attribute_model.html.erb @@ -20,17 +20,13 @@ <% if attribute_model.new_record? %> <%= t(:delete) %> <% else %> - - <% if attribute_model.is_built_in? %> - - <%= t(:disable) %> - <%= t(:enable) %> - - <%= hidden_field_tag "user_#{@attribute}_model[attribute_models][][disabled]", attribute_model.is_disabled? , :class => 'built_in_state' %> - <% else %> - <%= t(:delete) %> - <%= hidden_field_tag "user_#{@attribute}_model[attribute_models][][should_destroy]", nil , :class => 'should_destroy' %> - <% end %> + <% if attribute_model.is_built_in? %> + + <%= hidden_field_tag "user_#{@attribute}_model[attribute_models][][disabled]", attribute_model.is_disabled? , :class => 'built_in_state' %> + <% else %> + <%= t(:delete) %> + <%= hidden_field_tag "user_#{@attribute}_model[attribute_models][][should_destroy]", nil , :class => 'should_destroy' %> + <% end %> <%= f.hidden_field :id %> <%= f.hidden_field :key %> <% end %> diff --git a/app/views/admin/user_attribute_models/_form.html.erb b/app/views/admin/user_attribute_models/_form.html.erb index f7325ec2..beb9c5df 100644 --- a/app/views/admin/user_attribute_models/_form.html.erb +++ b/app/views/admin/user_attribute_models/_form.html.erb @@ -1,5 +1,5 @@
-

User Role

+

<%= t("admin.user_#{@attribute}") %>

@@ -68,7 +68,7 @@ }); $('#attributes_block a.change_built_in').click(function(){ - $(this).children().toggle(); + $(this).parent().toggleClass('disable'); var $am = $(this).next('.built_in_state') $am.attr('value', ($am.attr('value') == "false") ? "true" : "false"); }); diff --git a/app/views/admin/user_attribute_models/edit.html.erb b/app/views/admin/user_attribute_models/edit.html.erb index f3dedbec..810da772 100644 --- a/app/views/admin/user_attribute_models/edit.html.erb +++ b/app/views/admin/user_attribute_models/edit.html.erb @@ -1,21 +1,14 @@ -<% content_for :body_id do %>roles_list<% end -%> - -<% content_for :secondary do %> -
-

Member Setup

-
    -
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • -
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • -
-
-<% end -%> +<% content_for :body_id do %><%= "#{@attribute}s_list" %><% end -%>
<%= form_for @user_attribute_model, :url => eval("admin_user_#{@attribute}_model_path(@user_role_model)") do |f| %> <%= f.error_messages %> <%= render :partial => "admin/user_attribute_models/form", :locals => { :f => f, :is_new => false } %> -
- <%= f.submit t('update') %> <%= link_back %> +
+ <%= link_to t('update'), "#", :onclick=>"$('#edit_user_role_model_#{@user_attribute_model.id}').submit()" %> +
+
+ <%= link_back %>
<% end -%>
\ No newline at end of file diff --git a/app/views/admin/user_attribute_models/index.html.erb b/app/views/admin/user_attribute_models/index.html.erb index f50885a9..58ab9bc7 100644 --- a/app/views/admin/user_attribute_models/index.html.erb +++ b/app/views/admin/user_attribute_models/index.html.erb @@ -1,60 +1,32 @@ -<% content_for :body_id do %>roles_list<% end -%> - -<% content_for :secondary do %> -
-

Member Setup

-
    -
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • -
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • -
-
-<% end -%> - - +<% content_for :body_id do %><%= "#{@attribute}s_list" %><% end -%>
- <%= link_to t('admin.new_user_role'), new_admin_user_role_model_path %> + <%= link_to t("admin.new_user_#{@attribute}"), eval("new_admin_user_#{@attribute}_model_path") %>
  • - Roles + <%= t("admin.#{@attribute}") %> Action
  • <% @user_attribute_models.each do |user_attribute_model| %> -
  • - <%= user_attribute_model.i18n_variable[I18n.locale] %> +
  • clear"> + <%= user_attribute_model.i18n_variable[I18n.locale] %> + <%= link_to t(:edit), eval("edit_admin_user_#{@attribute}_model_path(user_attribute_model)"), :class => 'edit' %> - <%= link_to t(:delete), eval("admin_user_#{@attribute}_model_path(user_attribute_model)"), :class => 'delete', :confirm => t('sure?'), :method => :delete unless user_attribute_model.is_built_in? %> + <% if user_attribute_model.is_built_in? %> + <%= link_to t(:enable), eval("admin_user_#{@attribute}_model_path(user_attribute_model, :authenticity_token => form_authenticity_token, :user_#{@attribute}_model => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{user_attribute_model.id}", :style => "display:#{user_attribute_model.is_disabled? ? 'none' : ''}", :class => 'switch' %> + <%= link_to t(:disable), eval("admin_user_#{@attribute}_model_path(user_attribute_model, :authenticity_token => form_authenticity_token, :user_#{@attribute}_model => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{user_attribute_model.id}", :style => "display:#{user_attribute_model.is_disabled? ? '' : 'none'}", :class => 'switch' %> + <% else %> + <%= link_to t(:delete), eval("admin_user_#{@attribute}_model_path(user_attribute_model)"), :class => 'delete', :confirm => t('sure?'), :method => :delete %> + <% end %> +
  • <% end %>
- <%= link_to t('admin.new_user_role'), new_admin_user_role_model_path %> + <%= link_to t("admin.new_user_#{@attribute}"), eval("new_admin_user_#{@attribute}_model_path") %>
diff --git a/app/views/admin/user_attribute_models/new.html.erb b/app/views/admin/user_attribute_models/new.html.erb index 1bd58d00..aaa6a032 100644 --- a/app/views/admin/user_attribute_models/new.html.erb +++ b/app/views/admin/user_attribute_models/new.html.erb @@ -1,21 +1,14 @@ -<% content_for :body_id do %>roles_list<% end -%> - -<% content_for :secondary do %> -
-

Member Setup

-
    -
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • -
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • -
-
-<% end -%> +<% content_for :body_id do %><%= "#{@attribute}s_list" %><% end -%>
<%= form_for @user_attribute_model, :url => eval("admin_user_#{@attribute}_models_path") do |f| %> <%= f.error_messages %> <%= render :partial => "admin/user_attribute_models/form", :locals => { :f => f, :is_new => true } %> -
- <%= f.submit t('create') %> <%= link_back %> +
+ <%= link_to t('create'), "#", :onclick=>"$('#new_user_attribute_model').submit()" %> +
+
+ <%= link_back %>
<% end -%>
diff --git a/app/views/admin/user_attribute_models/toggle_enable.js.erb b/app/views/admin/user_attribute_models/toggle_enable.js.erb index a78a00db..153c24a8 100644 --- a/app/views/admin/user_attribute_models/toggle_enable.js.erb +++ b/app/views/admin/user_attribute_models/toggle_enable.js.erb @@ -1,2 +1,3 @@ $("#enable_<%= @user_attribute_model.id %>").toggle(); -$("#disable_<%= @user_attribute_model.id %>").toggle(); \ No newline at end of file +$("#disable_<%= @user_attribute_model.id %>").toggle(); +$("#attribute_<%= @user_attribute_model.id %>").toggleClass('disable'); \ No newline at end of file diff --git a/app/views/admin/users/_form.html.erb b/app/views/admin/users/_form.html.erb index ff222438..68431349 100644 --- a/app/views/admin/users/_form.html.erb +++ b/app/views/admin/users/_form.html.erb @@ -7,7 +7,7 @@ <%#= file_field_tag 'file' %> <%#= hidden_field_tag :avatar_cache %> Choose a file... - <%= f.text_field :email %> + <%= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value='E-Mail';}", :value => "E-Mail", :class => 'user_mail' %> diff --git a/app/views/admin/users/edit.html.erb b/app/views/admin/users/edit.html.erb index 43053c4f..2e114f21 100644 --- a/app/views/admin/users/edit.html.erb +++ b/app/views/admin/users/edit.html.erb @@ -1,21 +1,14 @@ <% content_for :body_id do %>user_list<% end -%> -<% content_for :secondary do %> -
-

Member Setup

-
    -
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • -
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • -
-
-<% end -%> -
<%= form_for @user, :url => admin_user_path(@user), :html => { :multipart => true } do |f| %> <%= f.error_messages %> <%= render :partial => 'form', :locals => { :f => f } %> -
- <%= f.submit t('update') %> <%= link_back %> +
+ <%= link_to t('update'), "#", :onclick=>"$('#edit_user_#{@user.id}').submit()" %> +
+
+ <%= link_back %>
<% end -%>
\ No newline at end of file diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb index 72c8179d..7ac2ddf7 100644 --- a/app/views/admin/users/index.html.erb +++ b/app/views/admin/users/index.html.erb @@ -1,17 +1,5 @@ <% content_for :body_id do %>user_list<% end -%> -<% content_for :secondary do %> -
-

Member Setup

-
    -
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • -
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • -
-
-<% end -%> - - -
<%= flash_messages %>
diff --git a/app/views/admin/users/new.html.erb b/app/views/admin/users/new.html.erb index 9a3a866f..a3864046 100644 --- a/app/views/admin/users/new.html.erb +++ b/app/views/admin/users/new.html.erb @@ -1,21 +1,14 @@ <% content_for :body_id do %>user_list<% end -%> -<% content_for :secondary do %> -
-

Member Setup

-
    -
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • -
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • -
-
-<% end -%> -
<%= form_for @user, :url => admin_users_path, :html => { :multipart => true } do |f| %> <%= f.error_messages %> <%= render :partial => 'form', :locals => { :f => f } %> -
- <%= f.submit t('create') %> <%= link_back %> +
+ <%= link_to t('create'), "#", :onclick=>"$('#new_user').submit()" %> +
+
+ <%= link_back %>
<% end -%>
diff --git a/app/views/admin/users/show.html.erb b/app/views/admin/users/show.html.erb index 7e4b5ab6..cc6fafff 100644 --- a/app/views/admin/users/show.html.erb +++ b/app/views/admin/users/show.html.erb @@ -1,15 +1,5 @@ <% content_for :body_id do %>user_list<% end -%> -<% content_for :secondary do %> -
-

Member Setup

-
    -
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • -
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • -
-
-<% end -%> -
diff --git a/app/views/layouts/member.html.erb b/app/views/layouts/member.html.erb index 5cffe7b4..91615d71 100644 --- a/app/views/layouts/member.html.erb +++ b/app/views/layouts/member.html.erb @@ -31,7 +31,14 @@ - <%= yield :secondary %> +
+

Member Setup

+
    +
  • <%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %>
  • +
  • <%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %>
  • +
  • <%= link_to content_tag(:span, t('admin.list_user_infos')), admin_user_info_models_path %>
  • +
+