diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1face5c38..8254c5313 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1963,6 +1963,15 @@ module ApplicationHelper end def get_technical_title user - #user.user_extensions.technical_title + if user.user_extensions.technical_title == "Professor" || user.user_extensions.technical_title == "教授" + technical_title = l(:label_technicl_title_professor) + elsif user.user_extensions.technical_title == "Associate professor" || user.user_extensions.technical_title == "副教授" + technical_title = l(:label_technicl_title_associate_professor) + elsif user.user_extensions.technical_title == "Lecturer" || user.user_extensions.technical_title == "讲师" + technical_title = l(:label_technicl_title_lecturer) + elsif user.user_extensions.technical_title == "Teaching assistant" || user.user_extensions.technical_title == "助教" + technical_title = l(:label_technicl_title_teaching_assistant) + end + technical_title end end diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index dbd6503b0..3b2bd8dfe 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -21,8 +21,6 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - <% title1 = @user.user_extensions.technical_title %> - <% language1 = @user.language %> -
+