|
|
|
@ -2,55 +2,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div style="height: auto; padding-bottom: 10px">
|
|
|
|
|
<table width="100%" border="0">
|
|
|
|
|
<tr style="font-size: 18px">
|
|
|
|
|
<td valign="top"><strong><%= @softapplication.name %></strong></td>
|
|
|
|
|
<td style="font-size: 15px; padding-right: 0px" align="right">
|
|
|
|
|
<%= link_to '删除', softapplication_path(@softapplication), method: :delete, data: {confirm: '您确定要删除吗?'} if @softapplication.destroyable_by? User.current %>
|
|
|
|
|
<%= link_to '编辑', edit_softapplication_path(@softapplication), method: :get if @softapplication.destroyable_by? User.current %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="height: auto; padding-bottom: 10px">
|
|
|
|
|
<table width="100%" border="0">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 70px; padding-left:40px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_type)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all"><%= @softapplication.app_type_name %></td>
|
|
|
|
|
<% contest = @softapplication.contests.first %>
|
|
|
|
|
<td style="width: 70px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_contest)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all"><%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 70px; padding-left:40px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_release_person)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all"><%= @softapplication.user.name %></td>
|
|
|
|
|
<td style="width: 70px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_adaptive_system)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all"><%= @softapplication.android_min_version_available %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 70px; padding-left:40px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_download)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all">
|
|
|
|
|
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
|
|
|
|
</td>
|
|
|
|
|
<td style="width: 70px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_developers)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all"><%= @softapplication.application_developers %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 70px; padding-left:40px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_average_scores)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all"><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
|
|
|
|
<td style="width: 70px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_release_time)%>:</td>
|
|
|
|
|
<td style="width: 400px; word-wrap: break-word; word-break: break-all"><%=format_time @softapplication.created_at %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 40px">
|
|
|
|
|
<% if @project %>
|
|
|
|
|
<%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<div style="height: auto; padding-bottom: 10px" class="softapplications-div">
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="2" valign="top" width="320">
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<table width="100%" border="0">
|
|
|
|
|
<tr style="font-size: 18px">
|
|
|
|
|
<td colspan="2" valign="top"><strong><%= @softapplication.name %></strong></td>
|
|
|
|
|
<td style="font-size: 15px; padding-left: 0px">
|
|
|
|
|
<%= link_to '删除', softapplication_path(@softapplication), method: :delete, data: {confirm: '您确定要删除吗?'} if @softapplication.destroyable_by? User.current %>
|
|
|
|
|
<%= link_to '编辑', edit_softapplication_path(@softapplication), method: :get if @softapplication.destroyable_by? User.current %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 570px; padding-left:40px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_type)%>:<%= @softapplication.app_type_name %></td>
|
|
|
|
|
<% contest = @softapplication.contests.first %>
|
|
|
|
|
<td style="width: 240px; word-wrap: break-word; word-break: break-all"><%=l(:label_attendingcontestwork_belongs_contest)%>:<%= contest ? link_to(contest.name, show_attendingcontest_contest_path(contest)) : '尚未加入竞赛' %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_release_person)%>:<%= @softapplication.user.name %></td>
|
|
|
|
|
<td><%=l(:label_attendingcontestwork_adaptive_system)%>:<%= @softapplication.android_min_version_available %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 40px">
|
|
|
|
|
<span><%=l(:label_attendingcontestwork_download)%>:</span>
|
|
|
|
|
<span>
|
|
|
|
|
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current)} %><%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td><%=l(:label_attendingcontestwork_developers)%>:<%= @softapplication.application_developers %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 40px"><%=l(:label_attendingcontestwork_average_scores)%>: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
|
|
|
|
|
<td><%=l(:label_attendingcontestwork_release_time)%>:<%=format_time @softapplication.created_at %></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-left: 40px">
|
|
|
|
|
<% if @project %>
|
|
|
|
|
<%=l(:label_attendingcontestwork_deposit_project)%>:<%= link_to "#@project", project_path(@project) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="underline-contests_one"></div>
|
|
|
|
|
|
|
|
|
@ -59,7 +56,7 @@
|
|
|
|
|
<div style="font-size: 15px;"><%=l(:label_work_description)%>:</div>
|
|
|
|
|
</strong>
|
|
|
|
|
|
|
|
|
|
<div style="padding-top: 5px; padding-left:10px"><%= @softapplication.description %></div>
|
|
|
|
|
<div style="padding-top: 5px"><%= @softapplication.description %></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="underline-contests_one"></div>
|
|
|
|
|
|
|
|
|
@ -82,10 +79,9 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="float: left; padding-left: 100px; padding-top:35px ">
|
|
|
|
|
<div style="text-align: center;"><%=l(:label_final_scores)%></div>
|
|
|
|
|
<% score = @softapplication.average(:quality).try(:avg).try(:round, 2).to_f %>
|
|
|
|
|
<div style="padding-top: 1px; font-size: 15px; color: blue;text-align: center;"><%= format("%.2f" , score) %>分</div>
|
|
|
|
|
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
|
|
|
|
|
<div><%=l(:label_final_scores)%></div>
|
|
|
|
|
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>分</div>
|
|
|
|
|
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">
|
|
|
|
|