2014-09-15 10:58:14 +08:00
|
|
|
|
<%
|
|
|
|
|
@nav_dispaly_contest_label = 1
|
|
|
|
|
@nav_dispaly_store_all_label = 1
|
|
|
|
|
%>
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
2014-10-15 17:24:49 +08:00
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title><%= h html_title %></title>
|
|
|
|
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
|
|
|
|
<meta name="keywords" content="issue,bug,tracker" />
|
|
|
|
|
<%= csrf_meta_tag %>
|
|
|
|
|
<%= favicon %>
|
|
|
|
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
|
|
|
|
<%= javascript_heads %>
|
|
|
|
|
<%= heads_for_theme %>
|
|
|
|
|
<%= call_hook :view_layouts_base_html_head %>
|
|
|
|
|
<%= yield :header_tags -%>
|
|
|
|
|
</head>
|
|
|
|
|
<body class="<%= h body_css_classes %>">
|
|
|
|
|
<div id="wrapper">
|
|
|
|
|
<div id="wrapper2">
|
|
|
|
|
<div id="wrapper3">
|
|
|
|
|
<%=render :partial => 'layouts/base_header'%>
|
|
|
|
|
<div id="main" class="">
|
|
|
|
|
<div class="top-content">
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<table style="font-size: 13px !important;">
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<tr>
|
2014-11-26 14:49:55 +08:00
|
|
|
|
<td class="info_font" style="width: 240px; color: #15bccf" rowspan="2">
|
|
|
|
|
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
|
|
|
|
|
<%=l(:label_contest_innovate_community)%>
|
|
|
|
|
</a>
|
2014-10-15 17:24:49 +08:00
|
|
|
|
</td>
|
|
|
|
|
<td style="width: 430px; color: #15bccf">
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<strong>
|
|
|
|
|
<%= l(:label_user_location) %> :
|
|
|
|
|
</strong>
|
2014-10-15 17:24:49 +08:00
|
|
|
|
</td>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<td rowspan="2" width="250px">
|
2014-12-19 14:45:50 +08:00
|
|
|
|
<script type="text/javascript">
|
2014-12-23 15:13:16 +08:00
|
|
|
|
function regexName1()
|
2014-12-19 14:45:50 +08:00
|
|
|
|
{
|
|
|
|
|
var name = $.trim($("#name").val());
|
|
|
|
|
if(name.length == 0)
|
|
|
|
|
{
|
2014-12-23 15:13:16 +08:00
|
|
|
|
$("#contest_name_span_head").text("<%= l(:label_search_conditions_not_null) %>");
|
|
|
|
|
$("#contest_name_span_head").css('color','#ff0000');
|
|
|
|
|
$("#contest_name_span_head").focus();
|
2014-12-19 14:45:50 +08:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-12-23 15:13:16 +08:00
|
|
|
|
$("#contest_name_span_head").text("");
|
2014-12-19 14:45:50 +08:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function submitSerch()
|
|
|
|
|
{
|
2014-12-23 15:13:16 +08:00
|
|
|
|
if(regexName1()){$("#contst_search_form").submit();}
|
2014-12-19 14:45:50 +08:00
|
|
|
|
}
|
|
|
|
|
</script>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<div class="project-search">
|
2014-12-19 14:45:50 +08:00
|
|
|
|
<%= form_tag({controller: 'contests', action: 'index'}, method: :get, :id => "contst_search_form") do %>
|
2014-12-23 15:18:55 +08:00
|
|
|
|
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => 'regexName1();', :width => "125px" %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
2014-12-19 14:45:50 +08:00
|
|
|
|
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
|
|
|
|
|
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
|
|
|
|
|
<%= l(:label_search)%>
|
|
|
|
|
</a>
|
2014-12-23 15:18:55 +08:00
|
|
|
|
<br />
|
|
|
|
|
<span id="contest_name_span_head"></span>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<td>
|
|
|
|
|
<%=link_to l(:field_homepage), home_path %> >
|
|
|
|
|
<a>
|
|
|
|
|
<%= l(:label_contest_innovate) %>
|
|
|
|
|
</a> >
|
|
|
|
|
<span title="<%= @contest.name%>">
|
|
|
|
|
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %>
|
|
|
|
|
</span>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="sidebar">
|
|
|
|
|
<div class="main_context">
|
|
|
|
|
<div class="spaceleft">
|
|
|
|
|
<div class="inf_user_image">
|
|
|
|
|
<table>
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<tr style="line-height: normal;">
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<td align="left" width="100px">
|
|
|
|
|
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
2014-10-15 17:24:49 +08:00
|
|
|
|
<td class="info_font" title="<%= @contest.name%>">
|
|
|
|
|
<%= link_to @contest.name, show_contest_contest_path(@contest) %>
|
|
|
|
|
</td>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</tr>
|
|
|
|
|
<% if User.current.login? %>
|
|
|
|
|
<tr colspan='3'>
|
|
|
|
|
<td valign="middle">
|
2014-10-15 17:24:49 +08:00
|
|
|
|
<span style="display:block; margin-left:20px;">
|
|
|
|
|
<%= new_watcher_link(@contest, User.current) unless (@contest.author.id == User.current.id) || User.current.admin? %>
|
|
|
|
|
</span>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- 竞赛的配置 -->
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<% if (@contest.author.id == User.current.id) || User.current.admin? %>
|
|
|
|
|
<tr colspan='3'>
|
|
|
|
|
<td valign="middle">
|
2014-10-15 17:24:49 +08:00
|
|
|
|
<span style="display:block; margin-left:20px;">
|
|
|
|
|
<%= link_to l(:label_contest_modify_settings), {:controller => 'contests', :action => 'settings', :id => @contest} %>
|
|
|
|
|
</span>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr colspan='3'>
|
|
|
|
|
<td valign="middle">
|
2014-10-15 17:24:49 +08:00
|
|
|
|
<span style="display:block; margin-left:20px;">
|
|
|
|
|
<%= link_to l(:label_contest_delete), {:controller => 'contests', :action => 'destroy_contest', :id => @contest},
|
|
|
|
|
data: { confirm: '你确定要删除该竞赛吗?' }, method: :delete %>
|
|
|
|
|
</span>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</table>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 参与人和参与项目的数量显示 -->
|
|
|
|
|
<div class="user_fans">
|
|
|
|
|
<table width="240" border="0">
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<tr align="center" width="80px" style="line-height: normal;">
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<!--关注人数-->
|
|
|
|
|
<td class="font_index">
|
|
|
|
|
<span id="watcher_count_span">
|
2014-10-23 11:30:34 +08:00
|
|
|
|
<%=link_to "#{@contest.watcher_users.count}",watcherlist_contest_path(@contest) %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</span>
|
|
|
|
|
</td>
|
|
|
|
|
<!--参赛作品数量-->
|
|
|
|
|
<td class="font_index">
|
|
|
|
|
<% if @contest.id == 2 or @contest.id == 3 or @contest.id == 6 %>
|
|
|
|
|
<%=link_to "#{@contest.projects.where('is_public=1').count}" %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%=link_to "#{@contest.contesting_softapplications.count}",show_attendingcontest_contest_path(@contest) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</td>
|
2014-12-30 09:48:30 +08:00
|
|
|
|
</tr>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<tr class="font_aram">
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<td align="center" width="70px">
|
|
|
|
|
<%= l(:label_contest_watchers) %>
|
|
|
|
|
</td>
|
|
|
|
|
<td align="center" width="70px">
|
|
|
|
|
<%= l(:label_contest_work) %>
|
|
|
|
|
</td>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<div class="inf_user_context" style="line-height: normal;margin-top: 10px;">
|
2014-09-15 10:58:14 +08:00
|
|
|
|
<div class="font_title_left">
|
|
|
|
|
<%= l(:label_project_overview) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="padding-bottom: 8px">
|
|
|
|
|
<% if @contest.description.size>0 %>
|
|
|
|
|
<div class="font_lighter_sidebar">
|
|
|
|
|
<%= textilizable @contest.description %>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="font_lighter_sidebar">
|
|
|
|
|
<%= l(:label_contest_description_no) %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="created_on_project">
|
2014-10-15 17:24:49 +08:00
|
|
|
|
<strong style="color: #068d9c">
|
|
|
|
|
<%= l(:label_create_time) %>:
|
|
|
|
|
</strong>
|
|
|
|
|
<%= format_time(@contest.created_on) %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!--标签-->
|
|
|
|
|
<div class="user_fans">
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
<table style="font-family:'微软雅黑'">
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<%= render :partial => 'tags/tag', :locals => {:obj => @contest, :object_flag => "7"}%>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<!--关注-->
|
|
|
|
|
<div class="user_fans">
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
<div class="font_title_left">
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<strong>
|
|
|
|
|
<%= l(:label_x_followers, :count => @contest.watcher_users.count) %>
|
|
|
|
|
</strong>
|
2014-10-08 14:57:26 +08:00
|
|
|
|
<% if show_more_fans?(@contest) %>
|
|
|
|
|
<span style="display:inline-block; font-size: 12px; float:right; margin-bottom: -4px;"><%= link_to l(:label_more), show_contest_user_contest_path(@contest) %></span>
|
|
|
|
|
<% end %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="left_wf">
|
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="padding-top: 5px">
|
|
|
|
|
<%= show_contest_fans_picture(@contest)%>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 参赛项目 -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 参赛应用-->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
<div class="user_underline"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
<% if display_main_menu?(@contest) %>
|
|
|
|
|
<div class="tabs_new">
|
|
|
|
|
<ul>
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<li>
|
|
|
|
|
<%= link_to l(:label_contest_notification), contest_contestnotifications_path(@contest), :class => link_class(:contestnotifications) %>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to l(:label_contest_joincontest), show_attendingcontest_contest_path(@contest), :class => link_class(:attendingcontests) %>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<%= link_to l(:label_contest_userresponse), show_contest_contest_path(@contest), :class => link_class(:respond) %>
|
|
|
|
|
</li>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<%= yield %>
|
|
|
|
|
<%= call_hook :view_layouts_base_content %>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<%=render :partial => 'layouts/base_footer'%>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="ajax-indicator" style="display:none;">
|
2014-12-30 09:48:30 +08:00
|
|
|
|
<span>
|
|
|
|
|
<%= l(:label_loading) %>
|
|
|
|
|
</span>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div id="ajax-modal" style="display:none;"></div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<%= call_hook :view_layouts_base_body_bottom %>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|