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/files_controller.rb b/app/controllers/files_controller.rb index 89ad42c17..313afa1c7 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -113,7 +113,7 @@ class FilesController < ApplicationController end if order_by.count == 1 - sort += "#{Attachment.table_name}.#{attribute} desc " + sort += "#{Attachment.table_name}.#{attribute} asc " elsif order_by.count == 2 sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " end 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;" %>
-diff --git a/app/views/files/_course_show_all_attachment.html.erb b/app/views/files/_course_show_all_attachment.html.erb index 15ef36580..3ce583cb8 100644 --- a/app/views/files/_course_show_all_attachment.html.erb +++ b/app/views/files/_course_show_all_attachment.html.erb @@ -17,7 +17,7 @@ <%#= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc', :scope => "col", :id => "vzebra-comedy") %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %> <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> - <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype",:class => "tableth") %> + <%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%> <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index bfb8d11d5..edc90f8cc 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -67,7 +67,6 @@
<%= 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 diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index c20617ce5..1a1d11363 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -69,6 +69,10 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) { }) .fail(function(result) { progressSpan.text(result.statusText); + if($("#network_issue")) + { + $("#network_issue").show(); + } }).always(function() { ajaxUpload.uploading--; fileSpan.removeClass('ajax-loading'); |