From 57776d67c570e4328e186589cb8544a2873147c3 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 16 Oct 2014 11:09:45 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 24 +++++++++---------- app/controllers/application_controller.rb | 2 +- app/controllers/bids_controller.rb | 4 ++-- app/controllers/contests_controller.rb | 2 +- app/controllers/courses_controller.rb | 2 +- app/controllers/homework_attach_controller.rb | 2 +- app/controllers/users_controller.rb | 2 +- app/controllers/welcome_controller.rb | 14 +++-------- app/helpers/application_helper.rb | 2 +- app/views/layouts/base_courses.html.erb | 2 +- lib/redmine.rb | 2 +- 11 files changed, 25 insertions(+), 33 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 369bb8ec7..7b4e326ad 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -144,9 +144,9 @@ class AdminController < ApplicationController #首页定制 def first_page_made if request.get? - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') elsif request.post? - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') @first_page.web_title = params[:web_title] @first_page.description = params[:first_page][:description] #@first_page.title = params[:title] @@ -179,11 +179,11 @@ class AdminController < ApplicationController def course_page_made if request.get? - @course_page = FirstPage.where("page_type = 'course'").first - @first_page = FirstPage.where("page_type = 'project'").first + @course_page = FirstPage.find_by_page_type('course') + @first_page = FirstPage.find_by_page_type('project') elsif request.post? - @first_page = FirstPage.where("page_type = 'project'").first - @course_page = FirstPage.where("page_type = 'course'").first + @first_page = FirstPage.find_by_page_type('project') + @course_page = FirstPage.find_by_page_type('course') @first_page.web_title = params[:web_title] @course_page.web_title = params[:web_title] @course_page.title = params[:course_title] @@ -215,12 +215,12 @@ class AdminController < ApplicationController def contest_page_made if request.get? - @contest_page = FirstPage.where("page_type = 'contest'").first - @first_page = FirstPage.where("page_type = 'project'").first + @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.where("page_type = 'project'").first - @contest_page = FirstPage.where("page_type = 'contest'").first + @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] @@ -255,10 +255,10 @@ class AdminController < ApplicationController def web_footer_made if request.get? @organizer = WebFooterOranizer.first - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') #@notification = ContestNotification.all.first; elsif request.post? - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') @first_page.web_title = params[:web_title] @organizer = WebFooterOranizer.first if @organizer.nil? diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index ef6bd7582..7f3dc0203 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -754,7 +754,7 @@ class ApplicationController < ActionController::Base #查找首页相关信息 def find_first_page - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') if @first_page.nil? @first_page = FirstPage.new @first_page.page_type = 'project' diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index cce93d86a..a050eb7f2 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -1011,7 +1011,7 @@ class BidsController < ApplicationController #验证是否显示课程 def can_show_course - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') if @first_page.show_course == 2 render_404 end @@ -1019,7 +1019,7 @@ class BidsController < ApplicationController #验证是否显示竞赛 def can_show_contest - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') if @first_page.show_contest == 2 render_404 end diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index f3b471a6a..204dcc201 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -707,7 +707,7 @@ class ContestsController < ApplicationController #验证是否显示竞赛 def can_show_contest - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') if @first_page.show_contest == 2 render_404 end diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 01945358d..766967e38 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -696,7 +696,7 @@ class CoursesController < ApplicationController #验证是否显示课程 def can_show_course - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') if @first_page.show_course == 2 render_404 end diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index 030c8d1b1..27a221266 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -356,7 +356,7 @@ class HomeworkAttachController < ApplicationController #验证是否显示课程 def can_show_course - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') if @first_page.show_course == 2 render_404 end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d05447d06..9d1bb1472 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -821,7 +821,7 @@ class UsersController < ApplicationController #验证是否显示课程 def can_show_course - @first_page = FirstPage.where("page_type = 'project'").first + @first_page = FirstPage.find_by_page_type('project') if @first_page.show_course == 2 render_404 end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 2e1d5349f..2a5792e36 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -25,8 +25,6 @@ class WelcomeController < ApplicationController before_filter :entry_select, :only => [:index] def index - #@first_page = FirstPage.where("page_type = 'project'").first - #@show_course = @first_page.show_course if @first_page.nil? || @first_page.sort_type.nil? @projects = find_miracle_project(10, 3,"score desc") else @@ -61,12 +59,7 @@ class WelcomeController < ApplicationController end def course - @course_page = FirstPage.where("page_type = 'course'").first - #if params[:school_id] - # @school_id = params[:school_id] - #elsif User.current.logged? && User.current.user_extensions.try(:school) - # @school_id = User.current.user_extensions.school.try(:id) - #end + @course_page = FirstPage.find_by_page_type('course') @school_id = params[:school_id] || User.current.user_extensions.school.try(:id) @logoLink ||= logolink() end @@ -74,7 +67,7 @@ class WelcomeController < ApplicationController def logolink() - @course_page = FirstPage.where("page_type = 'course'").first + @course_page = FirstPage.find_by_page_type('course') logo = get_avatar?(@course_page) id = params[:school_id] logo_link = "" @@ -110,7 +103,7 @@ class WelcomeController < ApplicationController def contest - @contest_page = FirstPage.where("page_type = 'contest'").first + @contest_page = FirstPage.find_by_page_type('contest') @contest_notifications = Contestnotification.order("created_at desc").limit(5) end @@ -150,7 +143,6 @@ class WelcomeController < ApplicationController private # 判断网站的入口,是课程 course 则跳过index去渲染 course 方法 def entry_select - #@first_page = FirstPage.where("page_type = 'project'").first url = request.original_url.gsub('/','') if url.include?(Setting.host_course.gsub('/','')) if @first_page.show_course == 1 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cdb71170d..bcba064ec 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -652,7 +652,7 @@ module ApplicationHelper if(args == ["/"]) args = [] end - first_page = FirstPage.where("page_type = 'project'").first + first_page = FirstPage.find_by_page_type('project') if args.empty? title = @html_title || [] title << @project.name if @project diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 91ab68fdf..1c1e6dbd2 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -189,7 +189,7 @@
- <% if @course.description && @course.description.lstrip.rstrip.size>0 %> + <% if @course.description && !@course.description.blank? %>
<%= textilizable @course.description %> diff --git a/lib/redmine.rb b/lib/redmine.rb index 708d25829..db91d7a54 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -415,7 +415,7 @@ Redmine::MenuManager.map :course_menu do |menu| end Redmine::MenuManager.map :user_menu do |menu| menu.push :activity, {:controller => 'users', :action => 'show', :host => Setting.user_domain } - menu.push :user_course, {:controller => 'users', :action => 'user_courses'},:if => Proc.new {|c| FirstPage.where("page_type = 'project'").first.show_course != 2} + menu.push :user_course, {:controller => 'users', :action => 'user_courses'},:if => Proc.new {|c| FirstPage.find_by_page_type('project').show_course != 2} #menu.push :user_homework, {:controller => 'users', :action => 'user_homeworks'} by huang menu.push :user_project, {:controller => 'users', :action => 'user_projects', :host => Setting.project_domain} # menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'} by huang From 43f2cc71ce3d5b40812ba205c7b9248a36bf1bf0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 16 Oct 2014 15:06:43 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=20#1237=E4=BF=AE=E5=A4=8D=E5=85=AC?= =?UTF-8?q?=E5=85=B1=E8=B4=B4=E5=90=A7=E6=9C=89=E5=BA=8F/=E6=97=A0?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/stylesheets/nyan.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index 0b5e32f2f..1693b3a09 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -718,6 +718,8 @@ div.actions input[type="text"] { margin-bottom: 40px; background-color: #F8F8F8; border-radius: 3px; + word-break: break-all; + word-wrap: break-word; } .memo-timestamp { From 258967263e6721a14b83d3b2b61ddac05cdb5fcb Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 16 Oct 2014 15:07:36 +0800 Subject: [PATCH 3/9] =?UTF-8?q?1=E3=80=81=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E3=80=822=E3=80=81=E5=BE=88=E5=A4=9A=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=87=E9=A2=98=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 4 +++- app/views/contests/new_contest.html.erb | 3 ++- app/views/contests/show_attendingcontest.html.erb | 2 +- app/views/contests/show_contest.html.erb | 2 +- app/views/courses/feedback.html.erb | 3 ++- app/views/courses/homework.html.erb | 1 + app/views/courses/show.html.erb | 2 +- app/views/files/_course_file.html.erb | 3 +-- app/views/layouts/base_homework.html.erb | 2 +- app/views/users/show.html.erb | 1 + app/views/users/user_courses.html.erb | 3 ++- app/views/users/user_newfeedback.html.erb | 2 +- app/views/users/user_projects.html.erb | 1 + config/routes.rb | 2 +- 14 files changed, 19 insertions(+), 12 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index a050eb7f2..d9b28c08a 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -225,7 +225,8 @@ class BidsController < ApplicationController respond_to do |format| layout_file = '' case @bid.reward_type - when 3 + when 3 + html_title(l(:label_question_student)) layout_file = 'base_homework' when 1 layout_file = 'base_bids' @@ -523,6 +524,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { + html_title(l(:label_homework_info)) render :layout => 'base_homework' } elsif @bid.reward_type == 1 diff --git a/app/views/contests/new_contest.html.erb b/app/views/contests/new_contest.html.erb index 019c8c1db..9aa70d370 100644 --- a/app/views/contests/new_contest.html.erb +++ b/app/views/contests/new_contest.html.erb @@ -9,4 +9,5 @@ <%= submit_tag l(:button_create) %> <%= javascript_tag "$('#bid_name').focus();" %> <% end %> -
\ No newline at end of file +
+<% html_title(l(:label_newtype_contest)) -%> \ No newline at end of file diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index 9d5b08ea9..053630a8e 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -312,4 +312,4 @@ - +<% html_title(l(:label_contest_joincontest)) -%> diff --git a/app/views/contests/show_contest.html.erb b/app/views/contests/show_contest.html.erb index cc1210751..3654fa6a1 100644 --- a/app/views/contests/show_contest.html.erb +++ b/app/views/contests/show_contest.html.erb @@ -44,4 +44,4 @@ <%= pagination_links_full @feedback_pages %> - +<% html_title(l(:label_user_response)) -%> diff --git a/app/views/courses/feedback.html.erb b/app/views/courses/feedback.html.erb index a5d7326e0..574061034 100644 --- a/app/views/courses/feedback.html.erb +++ b/app/views/courses/feedback.html.erb @@ -102,4 +102,5 @@ function checkMaxLength() { - \ No newline at end of file + +<% html_title(l(:label_course_feedback)) -%> \ No newline at end of file diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb index acbbaeb4b..52d97cfbf 100644 --- a/app/views/courses/homework.html.erb +++ b/app/views/courses/homework.html.erb @@ -57,3 +57,4 @@ function showSubH(/* ... */){ } +<% html_title(l(:label_homework)) -%> \ No newline at end of file diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index a6575784d..6ea67c7cd 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -119,6 +119,6 @@ <%= pagination_links_full @events_pages %> - +<% html_title(l(:label_course_overview)) -%> diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 55a36e125..cb0084b25 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -69,5 +69,4 @@
<%= render :partial => 'course_show_all_attachment' %>
- -<% html_title(l(:label_attachment_plural)) -%> \ No newline at end of file +<% html_title(l(:label_course_file)) -%> \ No newline at end of file diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 87893e5c4..01813bf52 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -8,7 +8,7 @@ - <%=h l(:label_active_homework) << " - Trustie" %> + <%=h html_title %> <%= csrf_meta_tag %> <%= favicon %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index bc485325c..3d2b7b0f0 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -480,3 +480,4 @@ }); }); +<% html_title(l(:label_activity)) -%> \ No newline at end of file diff --git a/app/views/users/user_courses.html.erb b/app/views/users/user_courses.html.erb index 6a4d7afdd..16f6414d9 100644 --- a/app/views/users/user_courses.html.erb +++ b/app/views/users/user_courses.html.erb @@ -30,4 +30,5 @@ $(document).ready(function() { }) }); }); - \ No newline at end of file + +<% html_title(l(:label_user_course)) -%> \ No newline at end of file diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb index d6337e1d0..6086c0242 100644 --- a/app/views/users/user_newfeedback.html.erb +++ b/app/views/users/user_newfeedback.html.erb @@ -15,4 +15,4 @@ - \ No newline at end of file +<% html_title(l(:label_responses)) -%> \ No newline at end of file diff --git a/app/views/users/user_projects.html.erb b/app/views/users/user_projects.html.erb index b312ed0d4..1129af514 100644 --- a/app/views/users/user_projects.html.erb +++ b/app/views/users/user_projects.html.erb @@ -63,3 +63,4 @@ $('[mode=watched]').click(function(event) {window.location.href='<%=watch_projects_user_url(type: 1)%>'; }); }); +<% html_title(l(:label_user_project)) -%> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index dedf15dfe..04b3cd1fc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -580,7 +580,7 @@ RedmineApp::Application.routes.draw do match 'permissions', :via => [:get, :post] end end - resources :web_footer_companies, :only => [:index, :new, :edit, :create,:update,:destroy] + resources :web_footer_companies, :except => :show resources :enumerations, :except => :show match 'enumerations/:type', :to => 'enumerations#index', :via => :get From ef10ccb76f45e35f6490105fd1da0e67c26bef56 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Oct 2014 08:59:14 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=AA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=94=A8=E6=88=B7=E4=B8=8D=E5=8F=AF=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8A=A0=E5=85=A5=E8=AF=BE=E7=A8=8B=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=8A=A0=E5=85=A5=E7=9B=B8=E5=BA=94=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 ++ app/views/courses/_set_join.js.erb | 14 ++++++++------ app/views/welcome/_more_course.html.erb | 5 +++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 696511100..a4e5d6fff 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -39,6 +39,8 @@ class CoursesController < ApplicationController else @state = 3 end + else + @state = 4 end respond_to do |format| # format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} diff --git a/app/views/courses/_set_join.js.erb b/app/views/courses/_set_join.js.erb index 8b5c1fb36..fb9b9924e 100644 --- a/app/views/courses/_set_join.js.erb +++ b/app/views/courses/_set_join.js.erb @@ -3,16 +3,18 @@ <% end %> <% if @state %> <% if @state == 0 %> - alert("加入成功") + alert("加入成功"); <% elsif @state == 1 %> - alert("密码错误") + alert("密码错误"); <% elsif @state == 2 %> - alert("课程已过期\n请联系课程管理员重启课程。(在配置课程处)") + alert("课程已过期\n请联系课程管理员重启课程。(在配置课程处)"); <% elsif @state == 3 %> alert("您已经加入了课程"); - <% elsif @state == 3 %> - alert("您已经的课程不存在") + <% elsif @state == 4 %> + alert("您已经的课程不存在"); + <% elsif @state == 4 %> + alert("您还未登录"); <% else %> - alert("未知错误,请稍后再试") + alert("未知错误,请稍后再试"); <% end %> <% end %> diff --git a/app/views/welcome/_more_course.html.erb b/app/views/welcome/_more_course.html.erb index a5464c27c..66f15fdf2 100644 --- a/app/views/welcome/_more_course.html.erb +++ b/app/views/welcome/_more_course.html.erb @@ -4,7 +4,8 @@ :class => 'icon icon-add') if User.current.allowed_to?(:add_course,nil, :global => true) %> <% end %>      + <%= link_to l(:label_course_join_student), join_private_courses_courses_path ,:remote => true, :class => 'icon icon-add' %> +      <% end %> -<%= link_to l(:label_course_join_student), join_private_courses_courses_path ,:remote => true, :class => 'icon icon-add' %> -     + <%= link_to l(:label_more), {:controller => 'courses', :action => 'index', :school_id => school_id} %> \ No newline at end of file From 364fd53076fdb92ddb98259f868a3d5b7647948d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Oct 2014 09:14:23 +0800 Subject: [PATCH 5/9] =?UTF-8?q?#1371=E4=BF=AE=E5=A4=8D=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E8=BF=9B=E5=85=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=8A=A5=E9=94=99=E7=9A=84BUG=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E6=96=B9=E6=A1=88=EF=BC=9A=E9=9A=90=E8=97=8F=E6=8E=89?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=85=8D=E7=BD=AE=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E7=9F=A5=E9=81=93=E6=9C=89=E4=BB=80=E4=B9=88=E7=94=A8?= =?UTF-8?q?=E3=80=82=E3=80=82=E3=80=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/settings/_display.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/settings/_display.html.erb b/app/views/settings/_display.html.erb index 71c44be03..c375adc1a 100644 --- a/app/views/settings/_display.html.erb +++ b/app/views/settings/_display.html.erb @@ -3,7 +3,7 @@

<%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme %>

-

<%= setting_select :default_language, :Chinese简体中文 => :zh, :English => :en %>

+

<%= setting_select :default_language, lang_options_for_select(false) %>

<%= setting_select :start_of_week, [[day_name(1),'1'], [day_name(6),'6'], [day_name(7),'7']], :blank => :label_language_based %>

<% locale = User.current.language.blank? ? ::I18n.locale : User.current.language %> @@ -11,7 +11,7 @@

<%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [::I18n.l(Time.now, :locale => locale, :format => f), f]}, :blank => :label_language_based %>

-

<%= setting_select :user_format, @options[:user_format] %>

+

<%#= setting_select :user_format, @options[:user_format] %>

<%= setting_check_box :gravatar_enabled %>

From 215d8f0e0cc1b30309103590d22f11ac9d42ce01 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Oct 2014 09:35:48 +0800 Subject: [PATCH 6/9] =?UTF-8?q?#1370=E4=BF=AE=E5=A4=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E6=A0=B7=E5=BC=8F=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/tags/_show_attachments.html.erb | 2 +- public/stylesheets/application.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/tags/_show_attachments.html.erb b/app/views/tags/_show_attachments.html.erb index 83fb857f4..4accf4f64 100644 --- a/app/views/tags/_show_attachments.html.erb +++ b/app/views/tags/_show_attachments.html.erb @@ -7,7 +7,7 @@ -
+
<%= l(:label_attachment) %>:  <%= file.filename %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 8e6d5f439..417be6a4b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1390,7 +1390,7 @@ a.toggle-all:hover {text-decoration:none;} table.list tbody tr:hover { background-color:#ffffdd; } table.list tbody tr.group:hover { background-color:inherit; } -table td {padding:2px;word-break: break-all;word-wrap: break-word;} +table td {padding:2px;} table p {margin:0;} .odd {background-color:#f6f7f8;} .even {background-color: #fff;} From 852c5258663ef24db2b15a8e89d359e6b769fd00 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Oct 2014 09:50:38 +0800 Subject: [PATCH 7/9] =?UTF-8?q?#1369=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=89=88=EF=BC=9A403=E3=80=81404=E9=A1=B5=E9=9D=A2=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E2=80=9C=E5=90=8E=E9=80=80=E4=B8=80=E6=AD=A5=E2=80=9D?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=94=A8=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/common/403.html | 2 +- app/views/common/404.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/common/403.html b/app/views/common/403.html index 8462570e4..39df9d70e 100644 --- a/app/views/common/403.html +++ b/app/views/common/403.html @@ -31,7 +31,7 @@ a:hover{ } 没有访问权限!建议您

diff --git a/app/views/common/404.html b/app/views/common/404.html index 5a3eaec9f..f4ec0e8f0 100644 --- a/app/views/common/404.html +++ b/app/views/common/404.html @@ -31,7 +31,7 @@ a:hover{ } 页面不见了!建议您

From f7ac267b42e440c2ba6e838e55f10cf216f3b41e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Oct 2014 13:51:18 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E8=BF=98=E5=8E=9F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 1 + app/controllers/settings_controller.rb | 1 + app/controllers/trackers_controller.rb | 1 + app/controllers/web_footer_companies_controller.rb | 2 ++ app/controllers/wiki_controller.rb | 1 + app/views/settings/_display.html.erb | 2 +- 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a4e5d6fff..fb332a963 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -103,6 +103,7 @@ class CoursesController < ApplicationController else respond_to do |format| format.html { + settings render :action => 'settings' } format.api { render_validation_errors(@course) } diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index 19a0669f3..a3f07e21a 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -24,6 +24,7 @@ class SettingsController < ApplicationController before_filter :require_admin def index + edit render :action => 'edit' end diff --git a/app/controllers/trackers_controller.rb b/app/controllers/trackers_controller.rb index 66a7eec03..988f03952 100644 --- a/app/controllers/trackers_controller.rb +++ b/app/controllers/trackers_controller.rb @@ -57,6 +57,7 @@ class TrackersController < ApplicationController redirect_to trackers_url return end + new render :action => 'new' end diff --git a/app/controllers/web_footer_companies_controller.rb b/app/controllers/web_footer_companies_controller.rb index b61a58189..4c5748e40 100644 --- a/app/controllers/web_footer_companies_controller.rb +++ b/app/controllers/web_footer_companies_controller.rb @@ -20,6 +20,7 @@ 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 @@ -41,6 +42,7 @@ 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/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb index 2acbd660a..de9e53554 100644 --- a/app/controllers/wiki_controller.rb +++ b/app/controllers/wiki_controller.rb @@ -68,6 +68,7 @@ class WikiController < ApplicationController def show if @page.new_record? if User.current.allowed_to?(:edit_wiki_pages, @project) && editable? && !api_request? + edit render :action => 'edit' else render_404 diff --git a/app/views/settings/_display.html.erb b/app/views/settings/_display.html.erb index c375adc1a..1ae5a351a 100644 --- a/app/views/settings/_display.html.erb +++ b/app/views/settings/_display.html.erb @@ -11,7 +11,7 @@

<%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [::I18n.l(Time.now, :locale => locale, :format => f), f]}, :blank => :label_language_based %>

-

<%#= setting_select :user_format, @options[:user_format] %>

+

<%= setting_select :user_format, @options[:user_format] %>

<%= setting_check_box :gravatar_enabled %>

From 045d124faa2aa5186c11acd006c02faab928517a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 17 Oct 2014 13:55:29 +0800 Subject: [PATCH 9/9] =?UTF-8?q?#1374=20=E4=BF=AE=E5=A4=8D=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE--=E8=AE=A8=E8=AE=BA=E5=8C=BA=EF=BC=9A=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=B8=96=E5=AD=90=E5=8D=B4=E8=BF=94=E5=9B=9E404?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E4=B8=94=E5=AF=BC=E8=88=AA=E6=A0=8F=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E7=9A=84BUG=20=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88?= =?UTF-8?q?=EF=BC=9A=E5=88=A0=E9=99=A4=E5=B8=96=E5=AD=90=E5=90=8E=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 0fe5f1a3e..8d6943f02 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -141,7 +141,7 @@ class MessagesController < ApplicationController if @message.parent redirect_to board_message_url(@board, @message.parent, :r => r) else - redirect_to board_message_url(@project, @board) + redirect_to project_boards_url(@project) end elsif @course if @message.parent