个人主页职称
This commit is contained in:
parent
bfd13bf98a
commit
ca0c7a4fb0
|
@ -2254,6 +2254,21 @@ module ApplicationHelper
|
|||
technical_title
|
||||
end
|
||||
|
||||
def get_user_roll identity
|
||||
technical_title = ""
|
||||
case identity.to_s
|
||||
when "0"
|
||||
technical_title = l(:label_account_identity_teacher)
|
||||
when "1"
|
||||
technical_title = l(:label_account_identity_student)
|
||||
when "2"
|
||||
technical_title = l(:label_account_identity_enterprise)
|
||||
when "3"
|
||||
technical_title = l(:label_account_identity_developer)
|
||||
end
|
||||
technical_title
|
||||
end
|
||||
|
||||
|
||||
def ie8?
|
||||
request.env["HTTP_USER_AGENT"] =~ /MSIE 8.0/
|
||||
|
|
|
@ -50,9 +50,11 @@
|
|||
<span class="<%= @user.user_extensions.gender == 1 ? 'homepageImageSexWomen' : 'homepageImageSexMan' %> "></span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<p class="mb20 c_dark f14">
|
||||
<%= get_technical_title @user %>
|
||||
</p>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<p class="mb20 c_dark f14">
|
||||
<%= get_user_roll @user.user_extensions.identity %>
|
||||
</p>
|
||||
<% end%>
|
||||
<div id="watch_user_btn_div">
|
||||
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue