修复部分未填工作单位报错问题

This commit is contained in:
z9hang 2014-06-18 14:21:05 +08:00
parent 08ba10c32d
commit d2db58050d
3 changed files with 7 additions and 1 deletions

View File

@ -260,7 +260,9 @@
</strong><%= format_time c_project.created_at %></span> </strong><%= format_time c_project.created_at %></span>
<span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %> <span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %>
<!-- modified by zjc 添加超链接 --> <!-- modified by zjc 添加超链接 -->
<% unless c_project.nil? || c_project.user.nil? %>
</strong><%= link_to c_project.user.name,user_path(c_project.user) %></span> </strong><%= link_to c_project.user.name,user_path(c_project.user) %></span>
<% end %>
</div> </div>
<div style="padding-left: 68px"> <div style="padding-left: 68px">
@ -295,7 +297,9 @@
</strong><%= format_time c_softapplication.created_at %></span> </strong><%= format_time c_softapplication.created_at %></span>
<span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %> <span style="padding-left: 240px"><strong><%= l(:label_attendingcontest_spoksman) %>
<!-- modified by zjc 添加超链接 --> <!-- modified by zjc 添加超链接 -->
<% unless c_softapplication.nil? || c_softapplication.softapplication.nil? || c_softapplication.softapplication.user.nil? %>
</strong><%= link_to c_softapplication.softapplication.user.name,user_path(c_softapplication.softapplication.user) %></span> </strong><%= link_to c_softapplication.softapplication.user.name,user_path(c_softapplication.softapplication.user) %></span>
<% end %>
</div> </div>
<!--获奖及教师评奖--> <!--获奖及教师评奖-->

View File

@ -178,7 +178,7 @@
</tr> </tr>
<!-- end --> <!-- end -->
<% unless @course.teacher.user_extensions.nil? %> <% unless @course.teacher.user_extensions.nil? || @course.teacher.user_extensions.school.nil? %>
<tr> <tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td> <td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td>
<!-- modified by zjc 教师单位添加超链接 --> <!-- modified by zjc 教师单位添加超链接 -->

View File

@ -116,7 +116,9 @@
<tr> <tr>
<td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td> <td valign="top" style="padding-left: 8px;"><%= l(:label_teacher_work_unit) %> :</td>
<!-- modified by zjc 有@user.user_extensions.occupation改为 @user.user_extensions.school 并添加超链接 --> <!-- modified by zjc 有@user.user_extensions.occupation改为 @user.user_extensions.school 并添加超链接 -->
<% unless @user.user_extensions.nil? || @user.user_extensions.school.nil? %>
<td class="font_lighter_sidebar"><%= link_to @user.user_extensions.school,options={:controller => 'welcome',:action => 'course',:school_id => @user.user_extensions.school.id}, html_options={:method => 'get'} %></td> <td class="font_lighter_sidebar"><%= link_to @user.user_extensions.school,options={:controller => 'welcome',:action => 'course',:school_id => @user.user_extensions.school.id}, html_options={:method => 'get'} %></td>
<% end %>
</tr> </tr>
</table> </table>
</div> </div>