竞赛通知
This commit is contained in:
parent
ae70081288
commit
ed84ec633f
|
@ -10,7 +10,7 @@
|
||||||
<%= labelled_form_for @contestnotifications, :html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %>
|
<%= labelled_form_for @contestnotifications, :html => { :id => 'contestnotifications-form', :multipart => true, :method => :put } do |f| %>
|
||||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= 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 %>
|
<% end %>
|
||||||
<div id="preview" class="wiki"></div>
|
<div id="preview" class="wiki"></div>
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" valign="top">
|
<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>
|
<span style="float: right"><%= delete_link contest_contestnotification_path(contestnotifications) if User.current.allowed_to?(:manage_contestnotifications, @contest) %> </span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left"><span class="font_lighter"> <%= l :label_update_time %>
|
<td align="left"><span class="font_lighter"> <%= l :label_update_time %>
|
||||||
<%= format_time(contestnotifications.created_at) %></span></td>
|
<%= 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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -76,7 +76,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match '/contestnotifications/preview', :controller => 'previews', :action => 'contestnotifications', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
match '/contestnotifications/preview', :controller => 'previews', :action => 'contestnotifications', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
||||||
## new added by linchun #新竞赛相关
|
## new added by linchun #新竞赛相关
|
||||||
resources :contests, only: [:index] do
|
resources :contests, only: [:index] do
|
||||||
resources :contestnotifications#, except: [:index]
|
resources :contestnotifications
|
||||||
collection do
|
collection do
|
||||||
match 'new_contest' , via: :get
|
match 'new_contest' , via: :get
|
||||||
match 'join_in_contest' , via: :post
|
match 'join_in_contest' , via: :post
|
||||||
|
|
Loading…
Reference in New Issue