竞赛通知

This commit is contained in:
wanglinchun 2014-06-04 20:57:53 +08:00
parent ae70081288
commit ed84ec633f
3 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
<%= labelled_form_for @contestnotifications, :html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<%= preview_link preview_news_path(:project_id => @contest, :id => @contestnotifications), 'contestnotifications-form' %>
<%= preview_link preview_contestnotifications_path(:project_id => @contest, :id => @contestnotifications), 'contestnotifications-form' %>
<% end %>
<div id="preview" class="wiki"></div>

View File

@ -37,7 +37,7 @@
<tr>
<td colspan="2" valign="top">
<strong><%= link_to_user(contestnotifications.author) if contestnotifications.respond_to?(:author) %></strong><span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_notice) %></span><span><%= link_to h(contestnotifications.title), contest_contestnotification_path(contestnotifications) %></span>
<strong><%= link_to_user(contestnotifications.author) if contestnotifications.respond_to?(:author) %></strong><span style="margin-left: 4px;" class="font_lighter"><%= l(:label_project_notice) %></span><span><%#= link_to h(contestnotifications.title), contest_contestnotification_path(contestnotifications) %></span>
<span style="float: right"><%= delete_link contest_contestnotification_path(contestnotifications) if User.current.allowed_to?(:manage_contestnotifications, @contest) %> </span>
</td>
</tr>
@ -48,7 +48,7 @@
<tr>
<td align="left"><span class="font_lighter"> <%= l :label_update_time %>
&nbsp;<%= format_time(contestnotifications.created_at) %></span></td>
<td width="350" align="right" class="a"><%= link_to l(:label_project_newother), contest_contestnotification_path(contestnotifications) %><%= "(#{l(:label_x_comments, :count => contestnotifications.comments_count)})" if contestnotifications.comments_count >= 0 %></td>
<td width="350" align="right" class="a"><%#= link_to l(:label_project_newother), contest_contestnotification_path(contestnotifications) %><%#= "(#{l(:label_x_comments, :count => contestnotifications.comments_count)})" if(contestnotifications.comments_count >= 0)%></td>
</tr>
</table>
</td>

View File

@ -76,7 +76,7 @@ RedmineApp::Application.routes.draw do
match '/contestnotifications/preview', :controller => 'previews', :action => 'contestnotifications', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
## new added by linchun #新竞赛相关
resources :contests, only: [:index] do
resources :contestnotifications#, except: [:index]
resources :contestnotifications
collection do
match 'new_contest' , via: :get
match 'join_in_contest' , via: :post