diff --git a/app/views/contestnotifications/edit.html.erb b/app/views/contestnotifications/edit.html.erb index 3d3403818..a86a50419 100644 --- a/app/views/contestnotifications/edit.html.erb +++ b/app/views/contestnotifications/edit.html.erb @@ -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 %>
diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb index e114b610c..658d7d894 100644 --- a/app/views/contestnotifications/index.html.erb +++ b/app/views/contestnotifications/index.html.erb @@ -37,7 +37,7 @@ - <%= link_to_user(contestnotifications.author) if contestnotifications.respond_to?(:author) %><%= l(:label_project_notice) %><%= link_to h(contestnotifications.title), contest_contestnotification_path(contestnotifications) %> + <%= link_to_user(contestnotifications.author) if contestnotifications.respond_to?(:author) %><%= l(:label_project_notice) %><%#= link_to h(contestnotifications.title), contest_contestnotification_path(contestnotifications) %> <%= delete_link contest_contestnotification_path(contestnotifications) if User.current.allowed_to?(:manage_contestnotifications, @contest) %> @@ -48,7 +48,7 @@ <%= l :label_update_time %>  <%= format_time(contestnotifications.created_at) %> - <%= link_to l(:label_project_newother), contest_contestnotification_path(contestnotifications) %><%= "(#{l(:label_x_comments, :count => contestnotifications.comments_count)})" if contestnotifications.comments_count >= 0 %> + <%#= link_to l(:label_project_newother), contest_contestnotification_path(contestnotifications) %><%#= "(#{l(:label_x_comments, :count => contestnotifications.comments_count)})" if(contestnotifications.comments_count >= 0)%> diff --git a/config/routes.rb b/config/routes.rb index aba8b4e32..df0501209 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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