调整竞赛列表页面中部分统计数字的超链接
This commit is contained in:
parent
589a21204c
commit
733497fef8
|
@ -1459,6 +1459,19 @@ module ApplicationHelper
|
|||
end
|
||||
html.html_safe
|
||||
end
|
||||
|
||||
def show_contest_softapplication(contest)
|
||||
html = ''
|
||||
if contest.softapplications.where('is_public = 1').count == 0
|
||||
html << (content_tag "p", l(:label_no_contest_softapplication), :class => "font_lighter")
|
||||
else
|
||||
contest.softapplications.where('is_public = 1').take(12).each do |softapplication|
|
||||
html << (link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar")
|
||||
end
|
||||
end
|
||||
html.html_safe
|
||||
end
|
||||
|
||||
def show_contest_fans_picture(obj)
|
||||
html = ''
|
||||
if obj.watcher_users.count == 0
|
||||
|
|
|
@ -18,10 +18,9 @@
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><span class="font_lighter"><%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to contest.contesting_projects.count %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to contest.contesting_softapplications.count %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_response, :count => contest.commit) %>(<strong><span style="font-size: 17px"><%= link_to contest.commit, respond_path(contest) %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_watchers, :count => contest.watcher_users.count) %>(<strong><span style="font-size: 17px"><%= link_to contest.watcher_users.count, respond_path(contest) %></span></strong>)</span>
|
||||
<td><span class="font_lighter"><%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_projects.count, show_project_contest_path(contest)) %></span></strong>)</span>
|
||||
<span class="font_lighter"><%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<strong><span style="font-size: 17px"><%= link_to(contest.contesting_softapplications.count, show_softapplication_contest_path(contest)) %></span></strong>)</span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<%= render_flash_messages %>
|
||||
|
||||
<table width="100%" border="0" style="padding-left: 15px">
|
||||
<td width="15%" class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %></td> <!--标注参赛应用及数量-->
|
||||
<td width="15%" class="font_lighter" style="font-size: 15px;"><%= l(:label_contest_softapplication) %>(<%= contesting_softapplication.count%>)</td> <!--标注参赛应用及数量-->
|
||||
<% if User.current.logged? %>
|
||||
<td width="85%">
|
||||
<div class='icon icon-add'> <!--标注我要参加及添加图标-->
|
||||
|
|
|
@ -197,15 +197,15 @@
|
|||
<div class="user_underline"></div>
|
||||
<div class="font_title_left">
|
||||
<strong><%= l(:label_contest_application) %></strong>
|
||||
<% if show_more_contest_project?(@contest) %>
|
||||
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'contests', :action => 'show_project'%></span>
|
||||
<% if show_more_contest_softapplication?(@contest) %>
|
||||
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), :controller => 'contests', :action => 'show_softapplication'%></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="left_wf">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="padding-top: 5px">
|
||||
<%= show_contest_project(@contest) %>
|
||||
<%= show_contest_softapplication(@contest) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<br />
|
||||
<br />
|
||||
<fieldset style="width: 500px">
|
||||
<legend>上传应用软件包或应用截图</legend>
|
||||
<legend>上传应用软件包和应用截图</legend>
|
||||
<%= render_flash_messages %>
|
||||
<p id="put-bid-form-partial">
|
||||
<%= render :partial => 'attachments/form' %>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<!-- <%= image_tag(url_to_avatar(@user), :class => "avatar2") %> -->
|
||||
<div style="height: 120px">
|
||||
<div style="height: 135px">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50" >
|
||||
</td>
|
||||
|
@ -31,8 +31,6 @@
|
|||
<td>应用下载:
|
||||
<% options = {:author => true, :deletable => @softapplication.user.eql?(User.current) } %>
|
||||
<%= render :partial => 'attachments/app_link', :locals => {:attachments => @app_items, :options => options} %>
|
||||
|
||||
|
||||
</td>
|
||||
<td>开发人员:<%= @softapplication.application_developers %></td>
|
||||
</tr>
|
||||
|
@ -49,7 +47,7 @@
|
|||
</div>
|
||||
<div class="underline-contests_one"></div>
|
||||
|
||||
<div style="height: 180px">
|
||||
<div style="height: 240px">
|
||||
<div style="font-size: 15px">软件截图:</div>
|
||||
<div class="softapplication-img">
|
||||
<% @image_results.take(4).each do |attachment| %>
|
||||
|
|
|
@ -1842,4 +1842,5 @@ zh:
|
|||
label_softapplication_name_condition: 25个汉字以内(50个字符)
|
||||
label_user_login_softapplication_board: 您还没有登录,请登录后参与应用评价。
|
||||
label_contest_description_no: 暂无描述。
|
||||
label_no_contest_softapplication: 暂无参赛应用
|
||||
|
Loading…
Reference in New Issue