From 4630576146cbcd371f97c9ea584655657ab1a631 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 21 Dec 2015 10:30:39 +0800 Subject: [PATCH 1/9] =?UTF-8?q?issue=E7=9A=84=E5=88=9B=E5=BB=BA=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E4=B8=8D=E9=9C=80=E8=A6=81=E6=8F=90=E7=A4=BAsucess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index a132ec295..9b81ac775 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -185,7 +185,7 @@ class IssuesController < ApplicationController respond_to do |format| format.html { render_attachment_warning_if_needed(@issue) - flash[:notice] = l(:label_successful_create) + #flash[:notice] = l(:label_successful_create) #flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("#{@issue.subject}", issue_path(@issue), :title => @issue.subject)) #flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject)) if params[:continue] From 60381fded5cac5a2accf22f9fa4b9c2b6ff6ae9e Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 21 Dec 2015 11:14:27 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 62d3ff8a5..847484e3c 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -49,7 +49,7 @@ <%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %> <%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> <%#= content_tag 'span', :id => "issue_description_and_toolbar" do %> - <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'87%', :resizeType => 0, :no_label => true,at_id: @project.id, at_type: @project.class.to_s %> + <%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'85%', :resizeType => 0, :no_label => true,at_id: @project.id, at_type: @project.class.to_s %> <%# end %> <%#= wikitoolbar_for 'issue_description' %> <% end %> From 31cbf3fbcec51084baef1410e012f933b8f23c44 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 21 Dec 2015 11:19:34 +0800 Subject: [PATCH 3/9] =?UTF-8?q?onchange=E5=87=BD=E6=95=B0=E5=8E=BB?= =?UTF-8?q?=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 847484e3c..464104335 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -7,7 +7,7 @@ <%= f.select :tracker_id, @issue.project.trackers.collect { |t| [t.name, t.id] }, {:required => true, :no_label => true}, - :onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", + #:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')", :class => "w90" %> <% end %> From ab1397d98274b624db14c3b653b2c94ba287fbfd Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Dec 2015 13:53:22 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/repository.rb | 2 +- lib/redmine/scm/adapters/abstract_adapter.rb | 2 +- lib/redmine/scm/adapters/gitlab_adapter.rb | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index 571bba1b9..f50f37f31 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -107,7 +107,7 @@ class Repository < ActiveRecord::Base def scm unless @scm @scm = self.scm_adapter.new(url, root_url, - login, password, path_encoding, project_id) + login, password, path_encoding) if root_url.blank? && @scm.root_url.present? update_attribute(:root_url, @scm.root_url) end diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 2dd520b92..3e51f2d4d 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -80,7 +80,7 @@ module Redmine end def initialize(url, root_url=nil, login=nil, password=nil, - path_encoding=nil, project_id) + path_encoding=nil) @url = url @login = login if login && !login.empty? @password = (password || "") if @login diff --git a/lib/redmine/scm/adapters/gitlab_adapter.rb b/lib/redmine/scm/adapters/gitlab_adapter.rb index 7b2d18310..32429fe35 100644 --- a/lib/redmine/scm/adapters/gitlab_adapter.rb +++ b/lib/redmine/scm/adapters/gitlab_adapter.rb @@ -13,12 +13,10 @@ module Redmine attr_accessor :is_default end - def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil, project_id) + def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil) super @g = Gitlab.client - r = Repository.where("url =? and project_id =?", url, project_id).first - @project = r.project.gpid - # @project = Repository.find_by_url(url).project.gpid + @project = Repository.find_by_url(url).project.gpid @path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding end From c381ce177f2b1dff4ddde70e123418a93595ff4b Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Dec 2015 14:00:09 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=A4=AA=E9=95=BF=E4=B8=8D=E8=83=BD=E5=8F=91=E7=9A=84=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/models/news.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/news.rb b/app/models/news.rb index 53581a536..a7407c91f 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -41,7 +41,7 @@ class News < ActiveRecord::Base validates_presence_of :title, :description validates_length_of :title, :maximum => 60 validates_length_of :summary, :maximum => 255 - validates_length_of :description, :maximum => 10000 + # validates_length_of :description, :maximum => 10000 acts_as_attachable :delete_permission => :manage_news acts_as_searchable :columns => ['title', 'summary', "#{table_name}.description"], :include => :project From 1a549eda4667a12a0019c760519474c54a73110c Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 21 Dec 2015 14:33:28 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/repository.rb | 2 +- lib/redmine/scm/adapters/abstract_adapter.rb | 2 +- lib/redmine/scm/adapters/gitlab_adapter.rb | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index f50f37f31..571bba1b9 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -107,7 +107,7 @@ class Repository < ActiveRecord::Base def scm unless @scm @scm = self.scm_adapter.new(url, root_url, - login, password, path_encoding) + login, password, path_encoding, project_id) if root_url.blank? && @scm.root_url.present? update_attribute(:root_url, @scm.root_url) end diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 3e51f2d4d..2dd520b92 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -80,7 +80,7 @@ module Redmine end def initialize(url, root_url=nil, login=nil, password=nil, - path_encoding=nil) + path_encoding=nil, project_id) @url = url @login = login if login && !login.empty? @password = (password || "") if @login diff --git a/lib/redmine/scm/adapters/gitlab_adapter.rb b/lib/redmine/scm/adapters/gitlab_adapter.rb index 32429fe35..7b2d18310 100644 --- a/lib/redmine/scm/adapters/gitlab_adapter.rb +++ b/lib/redmine/scm/adapters/gitlab_adapter.rb @@ -13,10 +13,12 @@ module Redmine attr_accessor :is_default end - def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil) + def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil, project_id) super @g = Gitlab.client - @project = Repository.find_by_url(url).project.gpid + r = Repository.where("url =? and project_id =?", url, project_id).first + @project = r.project.gpid + # @project = Repository.find_by_url(url).project.gpid @path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding end From e8511a6210896d1d9c2c2354f87e2b2472087a7f Mon Sep 17 00:00:00 2001 From: houxiang Date: Mon, 21 Dec 2015 16:00:35 +0800 Subject: [PATCH 7/9] modify the gemfile conflict by hx --- Gemfile | 5 +---- db/schema.rb | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 2b50f6e97..5fe70bc76 100644 --- a/Gemfile +++ b/Gemfile @@ -44,13 +44,10 @@ group :development do gem 'grape-swagger' gem 'better_errors', '~> 1.1.0' gem 'rack-mini-profiler', '~> 0.9.3' -<<<<<<< HEAD - #gem 'win32console' -======= if RUBY_PLATFORM =~ /w32/ gem 'win32console' end ->>>>>>> 1dae37f613838b2ada8b8f872abec71b256cb1ad + end group :development, :test do diff --git a/db/schema.rb b/db/schema.rb index 27de276b1..c86c3002c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1554,6 +1554,7 @@ ActiveRecord::Schema.define(:version => 20151217051447) do end add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id" + add_index "student_works", ["homework_common_id"], :name => "index" create_table "student_works_evaluation_distributions", :force => true do |t| t.integer "student_work_id" From 21461fb5833f67820c46e3e7d187810b4254a235 Mon Sep 17 00:00:00 2001 From: houxiang Date: Mon, 21 Dec 2015 16:45:16 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86=E4=BB=A5?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=96=B9=E6=B3=95=E8=B0=83=E7=94=A8=20by=20?= =?UTF-8?q?=E4=BE=AF=E7=BF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 0b2b6bd1c..e939511b6 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -351,7 +351,7 @@ update @changesets = g.commits(@project.gpid, :ref_name => @rev) # @changesets = @repository.latest_changesets(@path, @rev) # @changesets_count = @repository.latest_changesets(@path, @rev).count - @changesets_all_count = changesets_num(@project) + @changesets_all_count = @project.gpid.nil? ? 0 : g.commits_total_count(@project.gpid).count @changesets_latest_coimmit = @changesets[0] @properties = @repository.properties(@path, @rev) @repositories = @project.repositories From a5cc1390f214180e045834b2b1bb11ddba2690f4 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 21 Dec 2015 17:00:01 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=8C=BF=E8=AF=84?= =?UTF-8?q?=E6=89=93=E5=88=86=E6=97=B6=E5=BF=85=E9=A1=BB=E5=A1=AB=E5=86=99?= =?UTF-8?q?=E8=AF=84=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_add_score.html.erb | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/app/views/student_work/_add_score.html.erb b/app/views/student_work/_add_score.html.erb index 0258b3b83..052443155 100644 --- a/app/views/student_work/_add_score.html.erb +++ b/app/views/student_work/_add_score.html.erb @@ -1,9 +1,10 @@ -<%= form_for('new_form', :remote => true, :method => :post,:url => add_score_student_work_path(work.id)) do |f|%> +<%= form_for('new_form', :remote => true, :method => :post,:url => add_score_student_work_path(work.id),:id=>'add_score_'+work.id.to_s) do |f|%>
  • 评价: - <%= f.text_area 'user_message', :class => 'hwork_ping_text', :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %> + <%= f.text_area 'user_message', :class => 'hwork_ping_text', :id => 'score_comment_'+work.id.to_s, :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %>
  • +

  • 评分: @@ -16,7 +17,19 @@ <%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %> <%end%> - 提交 + 提交
  • -<% end%> \ No newline at end of file +<% end%> + \ No newline at end of file