From 5950f0404ba75c13047a6f09720deab95f08be99 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 27 Jan 2015 11:35:19 +0800 Subject: [PATCH] =?UTF-8?q?#1832=20=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=97=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 +++ app/views/layouts/base_users.html.erb | 45 +++++++++++++++------------ 2 files changed, 29 insertions(+), 20 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index caf29ba90..1face5c38 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1961,4 +1961,8 @@ module ApplicationHelper end confirm_info end + + def get_technical_title user + #user.user_extensions.technical_title + end end diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index f241875bd..dbd6503b0 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -267,27 +267,32 @@ <% end %> - - - <%= l(:label_location) %>: - - - <%= @user.user_extensions.location %> - <%= @user.user_extensions.location_city %> - - - - <% if @user.user_extensions.identity == 0 %> - - <%= l(:label_technical_title) %>: - - - - - <% end %> - + <% unless @user.user_extensions.location.empty?%> + + + + <%= l(:label_location) %>: + + + <%= @user.user_extensions.location %> + <%= @user.user_extensions.location_city %> + + + <% end %> + <% unless @user.user_extensions.technical_title.nil?%> + + <% if @user.user_extensions.identity == 0 %> + + <%= l(:label_technical_title) %>: + + + + + <% end %> + + <%end%> <% if @user.user_extensions.identity == 1 %> - <% if(is_watching?(@user) ) %> + <% if(is_watching?(@user) ) && !@user.user_extensions.student_id.empty? %> <%= l(:label_bidding_user_studentcode)%>: