修正了非本课程的用户能看见学生学号

修正了项目成员里能看见学号
This commit is contained in:
baiyu 2013-12-11 16:40:52 +08:00
parent dcb16cb789
commit 8af92ef29b
4 changed files with 12 additions and 9 deletions

View File

@ -8,11 +8,14 @@
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :class => 'avatar')) %>
<%= content_tag "div", link_to(member.user.show_name, user_path(member.user)), :class => "nomargin avatar_name" %>
<!--teacher's code disapeared moified by huang-->
<% if @project.project_type == 1 %>
<% unless member.user.user_extensions.identity ==0 %>
<!-- added by bai 加学号 -->
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @project.id).first.nil?) %>
<%= content_tag "p", "#{l(:label_bidding_user_studentcode)}#{' : '}#{member.user.user_extensions.student_id}", :class => "nomargin avatar_name" %>
<% end %>
<% if @project.project_type == 1 %>
<% end %>
<div class ="clear avatar_name"> &nbsp;
<p>
</p>

View File

@ -10,7 +10,7 @@
:title => "#{user.name}" %></td>
<td><table width="580px" border="0">
<tr> <!-- modified by bai -->
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user.show_name), :class => "project_avatar_name" %>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to(user.show_name,user_path(user)), :class => "project_avatar_name" %>
</td>
</tr>

View File

@ -7,7 +7,7 @@
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %></td>
<td><table width="580px" border="0">
<tr> <!-- modified by bai 增加了关注人的名字全称-->
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user.show_name), :class => "project_avatar_name" %>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to(user.show_name,user_path(user)), :class => "project_avatar_name" %>
</td>
</tr>
<tr> <!-- modified by bai 区别了“关注”里个人参与的项目与课程-->

View File

@ -15,12 +15,12 @@ production:
development:
adapter: mysql2
database: test
host: 10.107.17.20
database: trustie
host: 10.0.47.98
#socket: /home/pdl/redmine-2.3.1-2/mysql/tmp/mysql.sock
port: 3306
username: root
password: "1234"
password: "123456"
encoding: utf8
# Warning: The database defined as "test" will be erased and