diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index fa2784f22..308cb62ca 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -91,7 +91,11 @@ class MyController < ApplicationController end @se = @user.extensions - @se.school_id = params[:occupation] if params[:occupation] + if params[:occupation].to_i.to_s == params[:occupation] + @se.school_id = params[:occupation] + else + @se.occupation = params[:occupation] + end @se.gender = params[:gender] @se.location = params[:province] if params[:province] @se.location_city = params[:city] if params[:city] diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 637c92db3..dfa485a70 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -227,6 +227,7 @@ module IssuesHelper strings = [] values_by_field = {} details.each do |detail| + unless detail.property == 'attachment' if detail.property == 'cf' field_id = detail.prop_key field = CustomField.find_by_id(field_id) @@ -242,6 +243,7 @@ module IssuesHelper end end strings << show_detail(detail, no_html, options) + end end values_by_field.each do |field_id, changes| detail = JournalDetail.new(:property => 'cf', :prop_key => field_id) diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 04501532d..fafa79d32 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -223,7 +223,7 @@ <% unless @user.user_extensions.nil? %> - <% unless @user.user_extensions.identity == 2 %> + <% if @user.user_extensions.identity == 0 || @user.user_extensions.identity == 1 %> <%= l(:field_occupation) %>: <% unless @user.user_extensions.school.nil? %> @@ -231,38 +231,59 @@ <% end %> - <% end %> + <% elsif @user.user_extensions.identity == 3 %> + + <%= l(:field_occupation) %>: + + <%= @user.user_extensions.occupation %> + + + <% end %> - <%= l(:label_location) %>:<%= @user.user_extensions.location %><%= @user.user_extensions.location_city %> + <%= l(:label_location) %>:<%= @user.user_extensions.location %><%= @user.user_extensions.location_city %> <% if @user.user_extensions.identity == 0 %> - - <%= l(:label_technical_title) %>: + + <%= l(:label_technical_title) %>: <% end %> - <% if( (@user.user_extensions.identity == 1) && (is_watching?(@user) ) )%> + <% if @user.user_extensions.identity == 1 %> + <% if(is_watching?(@user) ) %> - - <%= l(:label_bidding_user_studentcode)%>: + + <%= l(:label_bidding_user_studentcode)%>: <%= @user.user_extensions.student_id %> - <% end %> - <% else%> - - <%= l(:field_occupation) %>: - + <% else %> + + + <%= l(:label_identity)%>: + + + <%= l(:label_account_student) %> + + + + <% end %> + <% elsif @user.user_extensions.identity == 3 %> - <%= l(:label_location) %>: + + <%= l(:label_identity)%>: + + + <%= l(:label_account_developer) %> + - <% end %> + <% end %> + <% end %> diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index fc712933c..3b4221da6 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -3,6 +3,7 @@ @nav_dispaly_main_project_label = 1 @nav_dispaly_main_contest_label = 1 %> <% @nav_dispaly_forum_label = 1%> + -

<%= l(:label_location) %> +

<%= l(:label_location) %>