This commit is contained in:
z9hang 2014-05-23 11:50:48 +08:00
commit ad5ac329f2
5 changed files with 11 additions and 11 deletions

View File

@ -209,7 +209,7 @@ private
end
def read_authorize
if @attachment.container_type == "HomeworkAttach"
if @attachment.container_type == "HomeworkAttach" || @attachment.container_type == 'Bid'
true
#User.current.allowed_to?(:view_homework_attaches, @attachment.project) ? true : deny_access
else

View File

@ -200,7 +200,7 @@ class User < Principal
#选择项目成员时显示的用户信息文字
def userInfo
info=self.name + ' (' + self.login + ')';
info=self.nickname + ' (' + self.realname + ')';
end
###添加留言 fq
@ -368,6 +368,10 @@ class User < Principal
end
end
def nickname(formatter = nil)
login
end
def name(formatter = nil)
login
end

View File

@ -176,7 +176,7 @@
<tr>
<td><%= l(:label_bidding_user_homework) %> :
<% unless b_project.user.nil? %>
<%= link_to(b_project.user.lastname+b_project.user.firstname, user_path(b_project.user)) %>
<%= link_to(b_project.user.name, user_path(b_project.user)) %>
<% end %>
</td>
</tr>
@ -194,7 +194,7 @@
<%= l(:label_bidding_user) %>
<% end %>
<% unless b_project.user.nil? %>
<%= b_project.user.lastname %><%= b_project.user.firstname %>
<%= b_project.user.name %>
<% end %></strong>
<!-- added by bai 加入学号 -->
<p><strong>

View File

@ -72,11 +72,9 @@
<% else %>
<%= content_tag('span', "#{l(:default_role_manager)}: ") %>
<% end %>
<!-- end -->
<!-- <%= content_tag('span', "#{l(:default_role_manager)}: ") %> -->
<% @admin = @project.project_infos%>
<% if @admin.size > 0 %>
<%= content_tag('a', @admin.collect{|u| link_to(u.user.lastname+u.user.firstname, user_path(u.user_id))}.join(", ").html_safe) %>
<%= content_tag('a', @admin.collect{|u| link_to(u.user.name, user_path(u.user_id))}.join(", ").html_safe) %>
<% end %>
<% if(@project.project_type==1)%>
&nbsp;&nbsp;&nbsp;<%= l(:label_course_college) %>

View File

@ -102,7 +102,7 @@
<% end %>
</span>
<span class='font_bolder'>
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
<%= link_to(course.try(:teacher).try(:realname), user_path(course.teacher)) %>
<%#=course.try(:teacher).try(:name)%>
</span>
</div>
@ -154,8 +154,7 @@
<%= course.school.name.try(:gsub, /(.+)$/, '\1:') %>
</span>
<span class='font_bolder'>
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
<%#=course.try(:teacher).try(:name)%>
<%= link_to(course.try(:teacher).try(:realname), user_path(course.teacher)) %>
</span>
</div>
<div class='desc_item text_nowrap' style="width: 310px;">
@ -199,7 +198,6 @@
</span>
<span class='font_bolder'>
<%= link_to(course.try(:teacher).try(:name), user_path(course.teacher)) %>
<%#=course.try(:teacher).try(:name)%>
</span>
</div>
<div class='desc_item text_nowrap' style="width: 310px;">