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]
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 8eb6a6860..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 = 0
+ @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
@@ -383,10 +383,10 @@ update
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s)
#add by hx
- rep_count = commit_count(@project)
+ #rep_count = commit_count(@project)
#页面传递必须要str类型,但是Paginator的初始化必须要num类型,需要类型转化
- @commits_count = rep_count
+ @commits_count = params[:commit_count].to_i
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
@commit = g.commit(@project.gpid,@rev)
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
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb
index 62d3ff8a5..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 %>
@@ -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 %>
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index da7f79dd8..e5f331d6c 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -51,9 +51,8 @@
<%= @repository.branches.count %> 个分支
-
-
- <%=link_to"提交明细", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %>
+
+ <%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %> 提交
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
diff --git a/db/schema.rb b/db/schema.rb
index 8e946c493..52c7755e9 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1569,6 +1569,7 @@ ActiveRecord::Schema.define(:version => 20151218110033) 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"