From 9186978551f99e457720796786763af3cf4a6c85 Mon Sep 17 00:00:00 2001 From: Spen Date: Thu, 26 Sep 2013 20:02:41 +0800 Subject: [PATCH] new ui member plugin sort fix and user show avatar fix --- app/assets/images/person.png | Bin 2036 -> 6989 bytes app/assets/images/thumb_person.png | Bin 0 -> 2036 bytes app/controllers/admin/plugins_controller.rb | 18 ++++++------- .../admin/users_new_interface_controller.rb | 9 +++++++ app/helpers/application_helper.rb | 6 +---- app/uploaders/avatar_uploader.rb | 3 +++ app/views/admin/plugins/_plugin_list.html.erb | 4 +-- .../_user_for_summary.html.erb | 2 +- .../_user_for_thumbnail.html.erb | 2 +- .../admin/users_new_interface/show.html.erb | 6 ++--- lib/orbit_app/plugin/registration.rb | 5 ++++ .../front_end/member_lists_controller.rb | 7 +++++ .../front_end/member_lists/index.html.erb | 23 +++++++++++++++-- .../front_end/member_lists/show.html.erb | 24 +++++++++--------- vendor/built_in_modules/personal_book/init.rb | 2 +- .../personal_conference/init.rb | 2 +- .../built_in_modules/personal_diploma/init.rb | 2 +- .../personal_experience/init.rb | 2 +- .../built_in_modules/personal_honor/init.rb | 2 +- .../personal_journal/config/locales/zh_tw.yml | 2 +- .../built_in_modules/personal_journal/init.rb | 2 +- vendor/built_in_modules/personal_lab/init.rb | 2 +- .../built_in_modules/personal_patent/init.rb | 2 +- .../built_in_modules/personal_project/init.rb | 2 +- .../personal_research/init.rb | 2 +- 25 files changed, 85 insertions(+), 46 deletions(-) create mode 100644 app/assets/images/thumb_person.png diff --git a/app/assets/images/person.png b/app/assets/images/person.png index f0493974cc8e8e49e1048eef058ec50949e90a6c..db1d7d2460f9f21a1b2350879baefb2c0b06f383 100644 GIT binary patch literal 6989 zcmcI|c{r8b_xC=>DJO-aL5AdTG^or|rW`{e8In1X;TSR;4w;8TDv1ou5-LRzO)?cK zP3DY6W<@eYM8@B`^*qn_`^WEjuj_rU>veJ6_rC4D_S$QG)>@yn&lnl(V`t-ILkO|! z>S!4wgojr=B4UqVKF#~^;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-_2kAG+2+sCXr z_^Vg1LIJ$Ln1`&Zz{*<>TS^}bQeUJkc4aDVruhmds=Zo4WDR44~<$=qGo3O!E9&#^e0PS--=*!Pu4(PWH zUpRgOUtw^Z1xyFs-Z5^Z){WQUgSx>7W%q5KCCjj^(&DpIB(_Kqx z!7WQW5o~zq&Vjp7VMx>lpsXcO|5(@XBs63i3i_a^nXBbM*bvYn@_%jw{x4tuKP{(b cEU4jDqV`l@$-_L1wFrK6_Zn#BY8;LHA9tNhEC2ui delta 1363 zcmZ{kYfzF26ox-PP>M)pRq~2xUedHMG)=7u0b9z*OQ|bLUO;rcQ9|Zzu+o&;w8C^t z$_+K|c}vNP4b!wxEVX8G(<051%3EMCn$5a1+fRR-_xyS0ojK<{b7VVJdR9Dt%D#qXAh>(?Zi+VIBD#o~oxQUD)kh`y zGPK+bp(CcHw1<%bT+3wTEPKb{Rzrl2g>K)(gz)vux8;>Nu1Ry*wQF!VoW34`PY}H> zEh)kLLAcl4-rj!mCO%dY6BEPd^P`T^0s^91LjCN5l9O+95jij&9ZXJu-)LgT;2`Bz z|FB$+K{-EBu!YMI1LLnFQYn1tQ{<+TbUHNqX+(JVUfUR?vGmK-lr4#--R}evw5=U& zXicT0$Sn_u63Y`#M*;J7Pzr@okkjRnDp9M|#0{E5_nU%ou!g`|R?2yf{Af|&bFICH z4;y-13VA#-nQR53pr;NN;~k_e)Ts*N#_sL5nsOuCBMYcfN#>nu`0p{7&S# zXOFH|ccz$juUckvCO$JWQ!ExEO;?A-j~NYToXpA+AUBt5WwF_JIyz9D7Fh5W9q{({ z9{9__QQq0vDU%&^N{EDW5!Rxm(6gAPd*RzuQQoZ9w{x3FLy=hQr7Dp~)b(hj#%o{g zz<^)92gQ35*&Tj8i oGyQ>j6coQ}AguA52!H@;^6WdL;<6F2Vf9gxNfhF3pUBhy0%baA9RL6T diff --git a/app/assets/images/thumb_person.png b/app/assets/images/thumb_person.png new file mode 100644 index 0000000000000000000000000000000000000000..f0493974cc8e8e49e1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>v[1][2],"front_partial_path"=>v[1][3]} } + + @profile_data = [] @teacher_data = [] @student_data = [] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 425a85f9..2963e6eb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -271,11 +271,7 @@ module ApplicationHelper end def show_avatar(user) - if (user.avatar? rescue false) - image_tag(user.avatar.thumb.url) - else - image_tag "person.png" - end + image_tag(user.avatar.thumb.url) end # NTU link diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index 2d55e675..c2aa3d7b 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -21,6 +21,9 @@ class AvatarUploader < CarrierWave::Uploader::Base # def default_url # "/images/fallback/" + [version_name, "default.png"].compact.join('_') # end + def default_url + [version_name, (Site.first.default_image.file.url rescue "person.png")].compact.join('_') + end # Process files as they are uploaded: # process :scale => [200, 300] diff --git a/app/views/admin/plugins/_plugin_list.html.erb b/app/views/admin/plugins/_plugin_list.html.erb index f583f92e..2a6255e3 100644 --- a/app/views/admin/plugins/_plugin_list.html.erb +++ b/app/views/admin/plugins/_plugin_list.html.erb @@ -7,8 +7,8 @@ <%= link_to t(:all_plugin_summary)%> <% end -%> <% @plugins.each do |plugin| %> - <%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.name ? "active" : nil) do %> - <%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.name) %> + <%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %> + <%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.app_name) %> <% end -%> <% end -%> diff --git a/app/views/admin/users_new_interface/_user_for_summary.html.erb b/app/views/admin/users_new_interface/_user_for_summary.html.erb index 6ed3506d..de5a8879 100644 --- a/app/views/admin/users_new_interface/_user_for_summary.html.erb +++ b/app/views/admin/users_new_interface/_user_for_summary.html.erb @@ -15,7 +15,7 @@ <%= link_to(content_tag(:i, nil, :class => 'icon-key'),'#',:class=>"key" ) if is_admin?%> <%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_summary, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %> - <%= show_avatar(user_for_summary) %> + <%= image_tag(user_for_summary.avatar) %>

<%= link_to user_for_summary.name,admin_users_new_interface_path(user_for_summary)%>

diff --git a/app/views/admin/users_new_interface/_user_for_thumbnail.html.erb b/app/views/admin/users_new_interface/_user_for_thumbnail.html.erb index 71cb2e8c..e3557110 100644 --- a/app/views/admin/users_new_interface/_user_for_thumbnail.html.erb +++ b/app/views/admin/users_new_interface/_user_for_thumbnail.html.erb @@ -16,7 +16,7 @@ <%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_thumbnail, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %>
- <%= show_avatar(user_for_thumbnail) %> + <%= image_tag(user_for_thumbnail.avatar) %>

<%= link_to user_for_thumbnail.name,admin_users_new_interface_path(user_for_thumbnail)%>

\ No newline at end of file diff --git a/app/views/admin/users_new_interface/show.html.erb b/app/views/admin/users_new_interface/show.html.erb index 07be2bf1..216177e2 100644 --- a/app/views/admin/users_new_interface/show.html.erb +++ b/app/views/admin/users_new_interface/show.html.erb @@ -50,9 +50,9 @@ Module List