diff --git a/app/helpers/bids_helper.rb b/app/helpers/bids_helper.rb index 274775a53..103dbccfa 100644 --- a/app/helpers/bids_helper.rb +++ b/app/helpers/bids_helper.rb @@ -125,4 +125,14 @@ module BidsHelper end @users.count end + + def im_watching_student_id? bid + people = [] + people << bid.author + bid.join_in_contests.each do |jic| + people << jic.user + end + people.include?(User.current) + end + end \ No newline at end of file diff --git a/app/views/bids/_list_projects.html.erb b/app/views/bids/_list_projects.html.erb index e1b8815b0..6947f8ceb 100644 --- a/app/views/bids/_list_projects.html.erb +++ b/app/views/bids/_list_projects.html.erb @@ -152,7 +152,11 @@
<%= l(:label_bidding_user_studentcode) %> : <%= b_project.user.user_extensions.student_id %> | ++ <% if (im_watching_student_id? @bid) && user.user_extensions.identity.to_i.eql?(1) %> + <%= l(:label_bidding_user_studentcode) %> : <%= b_project.user.user_extensions.student_id %> + <% end %> + | |||||||||||||||
<%= l(:label_bidding_user_homework) %> :
@@ -171,7 +175,11 @@
<%= b_project.user.lastname %><%= b_project.user.firstname %>
<% end %>
- <%= l(:label_bidding_user_studentcode) %> :<%= b_project.user.user_extensions.student_id%> ++ <% if (im_watching_student_id? @bid) && b_project.user.user_extensions.identity.to_i.eql?(1) %> + <%= l(:label_bidding_user_studentcode) %> : <%= b_project.user.user_extensions.student_id %> + <% end %> + |
diff --git a/app/views/bids/show_participator.html.erb b/app/views/bids/show_participator.html.erb
index 4a2bcab45..e19340ee2 100644
--- a/app/views/bids/show_participator.html.erb
+++ b/app/views/bids/show_participator.html.erb
@@ -3,56 +3,63 @@
<%= link_to image_tag(url_to_avatar(user), :class => "avatar"), - user_path(user), - :title => "#{user.show_name}" %> | -
|