应用页面添加所属竞赛及相应链接

This commit is contained in:
wanglinchun 2014-04-22 20:23:15 +08:00
parent 05c0d2a5ac
commit 0bdb3eb118
1 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,8 @@
</tr>
<tr>
<td>所属类别:<%= @softapplication.app_type_name %></td>
<td>发布时间:<%=format_time @softapplication.created_at %></td>
<% contest = @softapplication.contests.first %>
<td>所属竞赛:<%= contest ? link_to(contest.name, show_contest_contest_path(contest)) : '尚未加入竞赛'%></td>
</tr>
<tr>
<td>发布人员:<%= @softapplication.user.name %></td>
@ -42,7 +43,7 @@
</tr>
<tr>
<td>平均评分: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
<td></td>
<td>发布时间:<%=format_time @softapplication.created_at %></td>
</tr>