diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index f3b8b421a..fb6c2e8fe 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -217,21 +217,17 @@ class AdminController < ApplicationController if request.get? @contest_page = FirstPage.find_by_page_type('contest') @first_page = FirstPage.find_by_page_type('project') - @notification = ContestNotification.first; elsif request.post? @first_page = FirstPage.find_by_page_type('project') @contest_page = FirstPage.find_by_page_type('contest') - @notification = ContestNotification.first; @first_page.web_title = params[:web_title] @contest_page.web_title = params[:web_title] @contest_page.title = params[:contest_title] @contest_page.image_width = params[:image_width] @contest_page.image_height = params[:image_height] @contest_page.description = params[:contest_description] - @notification.title = params[:contest_notification_title] - @notification.content = params[:contest_notification][:content] - if @first_page.save && @contest_page.save && @notification.save + if @first_page.save && @contest_page.save respond_to do |format| format.html { flash[:notice] = l(:notice_successful_update) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 21adfa19e..7e6e3d04a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -33,7 +33,7 @@ class UsersController < ApplicationController before_filter :require_admin, :except => [:show, :index, :search, :tag_save, :tag_saveEx,:user_projects, :user_newfeedback, :user_comments, :watch_bids, :watch_contests, :info, :user_watchlist, :user_fanslist,:update, :user_courses, :user_homeworks, :watch_projects, :show_score, :topic_score_index, :project_score_index, :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index, - :activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities] + :activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities,:user_projects_index] #edit has been deleted by huang, 2013-9-23 before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses, :user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments, diff --git a/app/controllers/web_footer_companies_controller.rb b/app/controllers/web_footer_companies_controller.rb index 4c5748e40..b61a58189 100644 --- a/app/controllers/web_footer_companies_controller.rb +++ b/app/controllers/web_footer_companies_controller.rb @@ -20,7 +20,6 @@ class WebFooterCompaniesController < ApplicationController redirect_to web_footer_companies_url else flash[:error] = "#{l :web_footer_company_create_fail}: #{@company.errors.full_messages[0]}" - new render :action => 'new' end end @@ -42,7 +41,6 @@ class WebFooterCompaniesController < ApplicationController redirect_to web_footer_companies_url else flash[:error] = "#{l :web_footer_company_update_fail}: #{@company.errors.full_messages[0]}" - edit render :action => 'edit' end end diff --git a/app/views/admin/_tab_partial.html.erb b/app/views/admin/_tab_partial.html.erb new file mode 100644 index 000000000..86191fdb5 --- /dev/null +++ b/app/views/admin/_tab_partial.html.erb @@ -0,0 +1,8 @@ +
@@ -38,26 +31,7 @@ <%= text_area_tag 'contest_description',@contest_page.description,:rows => 8, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
-- - -
-- <%= text_field_tag 'contest_notification_title', params[:label_contest_notification_title], :value => @notification.title,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> -
- - <%= text_area 'contest_notification', 'content', :value => @notification.content,:cols => 80, :rows => 15, :class => 'wiki-edit' %> - <%= wikitoolbar_for 'contest_notification_content' %> - - -diff --git a/app/views/admin/first_page_made.html.erb b/app/views/admin/first_page_made.html.erb index e4403457c..d8fbc0533 100644 --- a/app/views/admin/first_page_made.html.erb +++ b/app/views/admin/first_page_made.html.erb @@ -5,14 +5,7 @@ <%= text_field_tag 'web_title', params[:wbe_title],:value => @first_page.web_title, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
-diff --git a/app/views/admin/web_footer_made.html.erb b/app/views/admin/web_footer_made.html.erb index 52f7cd5eb..65e77631c 100644 --- a/app/views/admin/web_footer_made.html.erb +++ b/app/views/admin/web_footer_made.html.erb @@ -5,14 +5,7 @@ <%= text_field_tag 'web_title', params[:wbe_title],:value => @first_page.web_title, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
-<%= link_to @course.name,course_path(@course) %> | ||
<%= link_to files_count, course_files_path(@course) %> | ||
- <%= l(:label_x_base_courses_teacher, :count => teacherCount(@course)) %> | <%= l(:label_x_base_courses_student, :count => studentCount(@course)) %> - | <%= l(:label_x_course_data, :count => files_count) %> @@ -168,7 +162,6 @@ <% unless @course.teacher.user_extensions.nil? || @course.teacher.user_extensions.school.nil? %> |
<%= l(:label_teacher_work_unit) %> : | -<%= @course.teacher.user_extensions.school %> | - <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment}, + <%= link_to_if_authorized image_tag('delete.png'), delete_news_comments_path(id: @news, comment: comment), :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %> diff --git a/config/routes.rb b/config/routes.rb index 91f96bfb2..a20ab8ef6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -460,7 +460,8 @@ RedmineApp::Application.routes.draw do resources :news, :only => [:index, :show, :edit, :update, :destroy] match '/news/:id/comments', :to => 'comments#create', :via => :post - match '/news/:id/comments/:comment_id', :to => 'comments#destroy', :via => :delete + #match '/news/:id/comments/:comment_id', :to => 'comments#destroy', :via => :delete + delete '/news/:id/comments/:comment_id', :to => 'comments#destroy', as: :delete_news_comments resources :versions, :only => [:show, :edit, :update, :destroy] do post 'status_by', :on => :member |