#1295取消竞赛创建这的关注功能

This commit is contained in:
sw 2014-10-15 17:24:49 +08:00
parent e765445279
commit d541309455
2 changed files with 93 additions and 68 deletions

View File

@ -67,8 +67,13 @@
<% if User.current.login? %> <!--added by linchun-->
<tr colspan='3'>
<td valign="middle">
<span style="display:block; margin-left:20px;"><%= join_in_contest(@bid, User.current)%></span>
<span style="display:block; margin-left:20px;"><span class="icon-fav icon"></span><%= watcher_link(@bid, User.current) %></span>
<span style="display:block; margin-left:20px;">
<%= join_in_contest(@bid, User.current)%>
</span>
<span style="display:block; margin-left:20px;">
<span class="icon-fav icon"></span>
<%= watcher_link(@bid, User.current) %>
</span>
</td>
</tr>
<% end %>
@ -86,10 +91,14 @@
<div class="user_fans">
<table width="240" border="0">
<tr align="center" width="80px">
<td class="font_index"><%=link_to "#{@bid.join_in_contests.count}",:controller => "bids",
:action => "show_participator" %></td>
<td class="font_index"><%=link_to "#{@bid.projects.where('is_public=1').count}", :controller => 'bids',
:action => 'show_project' %></td>
<td class="font_index">
<%=link_to "#{@bid.join_in_contests.count}",:controller => "bids",
:action => "show_participator" %>
</td>
<td class="font_index">
<%=link_to "#{@bid.projects.where('is_public=1').count}", :controller => 'bids',
:action => 'show_project' %>
</td>
<tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_participator) %></td>
<td align="center" width="70px"> <%= l(:label_bidding_project) %></td>

View File

@ -13,11 +13,9 @@
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
<%= 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 %>">
@ -26,12 +24,15 @@
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<div id="main" class="">
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf"><%=l(:label_contest_innovate_community)%></td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td class="info_font" style="width: 240px; color: #15bccf">
<%=l(:label_contest_innovate_community)%>
</td>
<td style="width: 430px; color: #15bccf">
<strong><%= l(:label_user_location) %> : </strong>
</td>
<td rowspan="2" width="250px">
<div class="project-search">
<%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %>
@ -43,10 +44,14 @@
</td>
</tr>
<tr>
<td style="padding-left: 8px"><%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %></td>
<td style="padding-left: 8px">
<%=link_to request.host()+"/contests", :controller=>'contests', :action=>'index' %>
</td>
<td><%=link_to l(:field_homepage), home_path %> >
<%=link_to l(:label_contest_innovate), :controller=>'contests', :action=>'index' %> >
<span title="<%= @contest.name%>"><%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %></span>
<span title="<%= @contest.name%>">
<%= link_to h(truncate(@contest.name, length: 20, omission: '...')), show_contest_contest_path(@contest) %>
</span>
</td>
</tr>
</table>
@ -61,17 +66,19 @@
<td align="left" width="100px">
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
</td>
<td>
<table>
<tr>
<td class="info_font" title="<%= @contest.name%>"><%= link_to @contest.name, show_contest_contest_path(@contest) %></td>
<td class="info_font" title="<%= @contest.name%>">
<%= link_to @contest.name, show_contest_contest_path(@contest) %>
</td>
</tr>
<% if User.current.login? %>
<tr colspan='3'>
<td valign="middle">
<!-- <span style="display:block; margin-left:20px; margin-bottom: 5px"><%= join_in_competition(@contest, User.current)%></span> -->
<span style="display:block; margin-left:20px;"><%= new_watcher_link(@contest, User.current) %></span>
<span style="display:block; margin-left:20px;">
<%= new_watcher_link(@contest, User.current) unless (@contest.author.id == User.current.id) || User.current.admin? %>
</span>
</td>
</tr>
<% end %>
@ -80,12 +87,17 @@
<% if (@contest.author.id == User.current.id) || User.current.admin? %>
<tr colspan='3'>
<td valign="middle">
<span style="display:block; margin-left:20px;"><%= link_to l(:label_contest_modify_settings), {:controller => 'contests', :action => 'settings', :id => @contest} %></span>
<span style="display:block; margin-left:20px;">
<%= link_to l(:label_contest_modify_settings), {:controller => 'contests', :action => 'settings', :id => @contest} %>
</span>
</td>
</tr>
<tr colspan='3'>
<td valign="middle">
<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>
<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>
</td>
</tr>
<% end %>
@ -116,7 +128,6 @@
</tr>
<tr class="font_aram">
<!-- <td align="center" width="70px"> <%= l(:label_participate) %></td> -->
<td align="center" width="70px"> <%= l(:label_contest_watchers) %></td>
<td align="center" width="70px"> <%= l(:label_contest_work) %></td>
@ -128,13 +139,22 @@
<div class="inf_user_image">
<table>
<tr>
<td><%= l(:lable_contest_user) %>:&nbsp;<%= link_to(@user.name, user_path(@user))%></td>
<td>
<%= l(:lable_contest_user) %>:&nbsp;
<%= link_to(@user.name, user_path(@user))%>
</td>
</tr>
<tr>
<td><%= l(:label_bids_reward_method) %><%= @contest.budget%></td>
<td>
<%= l(:label_bids_reward_method) %>
<%= @contest.budget%>
</td>
</tr>
<tr>
<td><%= l(:label_limit_time) %> : <%= @contest.deadline%></td>
<td>
<%= l(:label_limit_time) %> :
<%= @contest.deadline%>
</td>
</tr>
</table>
</div>
@ -156,7 +176,10 @@
</div>
<% end %>
<div class="created_on_project">
<strong style="color: #068d9c"><%= l(:label_create_time) %></strong><%= format_time(@contest.created_on) %>
<strong style="color: #068d9c">
<%= l(:label_create_time) %>
</strong>
<%= format_time(@contest.created_on) %>
</div>
</div>
<div class="user_underline"></div>
@ -173,7 +196,6 @@
</tr>
</table>
</div>
<!--关注-->
<div class="user_fans">
<div class="user_underline"></div>
@ -193,22 +215,16 @@
</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">