From 3476731b83a418fa31153866e64245a6ecb16554 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Wed, 9 Dec 2015 09:59:13 +0800
Subject: [PATCH 001/105] =?UTF-8?q?=E5=B0=86at=20js=20data=E6=95=B4?=
=?UTF-8?q?=E5=90=88=E5=88=B0=E6=96=87=E4=BB=B6=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/at_controller.rb | 25 +++++++++++++++++++++++
app/controllers/issues_controller.rb | 29 ++++++++++-----------------
app/helpers/application_helper.rb | 10 +--------
app/views/at/show.js.erb | 8 ++++++++
app/views/issues/show.html.erb | 2 +-
config/routes.rb | 3 ++-
public/assets/kindeditor/at/config.js | 5 ++---
7 files changed, 50 insertions(+), 32 deletions(-)
create mode 100644 app/controllers/at_controller.rb
create mode 100644 app/views/at/show.js.erb
diff --git a/app/controllers/at_controller.rb b/app/controllers/at_controller.rb
new file mode 100644
index 000000000..92506d4e8
--- /dev/null
+++ b/app/controllers/at_controller.rb
@@ -0,0 +1,25 @@
+#coding=utf-8
+
+class AtController < ApplicationController
+ respond_to :js
+
+ def show
+ type = params[:type]
+ case type
+ when "Issue"
+ @users = find_issue(params)
+ else
+ end
+ end
+
+ private
+ def find_issue(params)
+ #1. issues list persons
+ #2. project persons
+ issue = Issue.find(params[:id])
+ journals = issue.journals
+ at_persons = journals.map(&:user) + issue.project.users
+ at_persons.uniq{|u| u.id}.delete_if{|u| u.id == User.current.id}
+ end
+
+end
\ No newline at end of file
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 7cdc838e2..6f441c29a 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -142,24 +142,17 @@ class IssuesController < ApplicationController
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
- #id name email
- #1. issues list persons
- #2. project persons
- @at_persons = @journals.map(&:user) + @issue.project.users
- @at_persons = @at_persons.uniq{|u| u.id}.delete_if{|u| u.id == User.current.id}
- @at_persons = nil
-
- respond_to do |format|``
- format.html {
- retrieve_previous_and_next_issue_ids
- render :template => 'issues/show', :layout => @project_base_tag#by young
- }
- format.api
- format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
- format.pdf {
- pdf = issue_to_pdf(@issue, :journals => @journals)
- send_data(pdf, :type => 'application/pdf', :filename => filename_for_content_disposition("#{@project.identifier}-#{@issue.id}.pdf") )
- }
+ respond_to do |format|
+ format.html {
+ retrieve_previous_and_next_issue_ids
+ render :template => 'issues/show', :layout => @project_base_tag#by young
+ }
+ format.api
+ format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
+ format.pdf {
+ pdf = issue_to_pdf(@issue, :journals => @journals)
+ send_data(pdf, :type => 'application/pdf', :filename => filename_for_content_disposition("#{@project.identifier}-#{@issue.id}.pdf") )
+ }
end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index ba8fe4f53..227de930f 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -2624,15 +2624,7 @@ int main(int argc, char** argv){
opt = {enable_at: true, prettify: false, init_activity: false}.merge default_opt
ss = ''
if opt[:enable_at]
- ss = '"
+ ss += %Q||
end
ss += javascript_include_tag("/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg')
diff --git a/app/views/at/show.js.erb b/app/views/at/show.js.erb
new file mode 100644
index 000000000..df253f237
--- /dev/null
+++ b/app/views/at/show.js.erb
@@ -0,0 +1,8 @@
+(function(){
+ window.atPersonLists = [];
+ <% @users && @users.each_with_index do |person,index| %>
+ var o = {id: <%=index%>, name: '<%=person.show_name%>', login: '<%=person.login%>', searchKey: '<%=person.get_at_show_name%>'};
+ atPersonLists.push(o);
+ <% end %>
+
+})();
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 80d3aaac1..67d1186c4 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -1,5 +1,5 @@
<%= content_for(:header_tags) do %>
-<%= import_ke(enable_at: true) %>
+<%= import_ke(enable_at: {id: @issue.id, type: 'Issue'}) %>
<% end %>
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index 44f3e5a64..b7cc1a0c2 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -34,7 +34,7 @@
}
}
$(function() {
- init_activity_KindEditor_data(<%= @memo.id%>,null,"87%");
+ init_activity_KindEditor_data(<%= @memo.id%>,null,"87%", "<%=@memo.class.to_s%>");
});
function del_confirm(){
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index 0f39b73d2..e06c04775 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -27,7 +27,7 @@
}
}
$(function() {
- init_activity_KindEditor_data(<%= @topic.id%>,null,"85%");
+ init_activity_KindEditor_data(<%= @topic.id%>,null,"85%", "<%=@topic.class.to_s%>");
showNormalImage('message_description_<%= @topic.id %>');
});
diff --git a/app/views/messages/quote.js.erb b/app/views/messages/quote.js.erb
index eee820c61..b0e8ecb85 100644
--- a/app/views/messages/quote.js.erb
+++ b/app/views/messages/quote.js.erb
@@ -11,7 +11,7 @@ if($("#reply_message_<%= @message.id%>").length > 0) {
$(function(){
$('#reply_subject').val("<%= raw escape_javascript(@subject) %>");
$('#quote_quote').val("<%= raw escape_javascript(@temp.content.html_safe) %>");
- init_activity_KindEditor_data(<%= @message.id%>,null,"85%");
+ init_activity_KindEditor_data(<%= @message.id%>,null,"85%", "<%=@message.class.to_s%>");
});
}else if($("#reply_to_message_<%= @message.id%>").length >0) {
$("#reply_to_message_<%= @message.id%>").replaceWith("
");
diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb
index ac80de3b4..518479344 100644
--- a/app/views/messages/reply.js.erb
+++ b/app/views/messages/reply.js.erb
@@ -3,4 +3,4 @@
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
<%end%>
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
\ No newline at end of file
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
\ No newline at end of file
diff --git a/app/views/org_document_comments/_reply_form.html.erb b/app/views/org_document_comments/_reply_form.html.erb
index 7871b910d..8808ff8b7 100644
--- a/app/views/org_document_comments/_reply_form.html.erb
+++ b/app/views/org_document_comments/_reply_form.html.erb
@@ -1,2 +1,2 @@
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
diff --git a/app/views/org_document_comments/add_reply.js.erb b/app/views/org_document_comments/add_reply.js.erb
index 40ed2eeb2..84f8c1f83 100644
--- a/app/views/org_document_comments/add_reply.js.erb
+++ b/app/views/org_document_comments/add_reply.js.erb
@@ -1,3 +1,3 @@
$("#organization_document_<%= @act.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document, :act => @act}) %>");
-init_activity_KindEditor_data(<%= @act.id %>,"","87%");
\ No newline at end of file
+init_activity_KindEditor_data(<%= @act.id %>,"","87%", "<%=@act.class.to_s%>");
\ No newline at end of file
diff --git a/app/views/org_document_comments/index.html.erb b/app/views/org_document_comments/index.html.erb
index 331e61bfd..ddbb6bf9c 100644
--- a/app/views/org_document_comments/index.html.erb
+++ b/app/views/org_document_comments/index.html.erb
@@ -19,7 +19,7 @@
<% @documents.each do |document| %>
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document, :act => OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id=?", document.id).first} %>
diff --git a/app/views/org_document_comments/quote.js.erb b/app/views/org_document_comments/quote.js.erb
index a71b23f0e..7ea5daf7b 100644
--- a/app/views/org_document_comments/quote.js.erb
+++ b/app/views/org_document_comments/quote.js.erb
@@ -3,7 +3,7 @@ if($("#reply_message_<%= @org_comment.id%>").length > 0) {
$(function(){
$('#reply_subject').val("<%= raw escape_javascript(@subject) %>");
$('#quote_quote').val("<%= raw escape_javascript(@temp.content.html_safe) %>");
- init_activity_KindEditor_data(<%= @org_comment.id%>,null,"85%");
+ init_activity_KindEditor_data(<%= @org_comment.id%>,null,"85%", "<%=@org_comment.class.to_s%>");
});
}else if($("#reply_to_message_<%= @org_comment.id %>").length >0) {
$("#reply_to_message_<%= @org_comment.id%>").replaceWith("");
diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb
index 1b1eca418..3a50e5faa 100644
--- a/app/views/org_document_comments/show.html.erb
+++ b/app/views/org_document_comments/show.html.erb
@@ -5,7 +5,7 @@
diff --git a/app/views/organizations/_org_activities.html.erb b/app/views/organizations/_org_activities.html.erb
index 33ac13e76..8f9acbc7b 100644
--- a/app/views/organizations/_org_activities.html.erb
+++ b/app/views/organizations/_org_activities.html.erb
@@ -2,7 +2,7 @@
<% org_activities.each do |act| %>
<% if act.container_type == 'Organization' %>
diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb
index 7200761a3..9d62dd1f9 100644
--- a/app/views/organizations/show.html.erb
+++ b/app/views/organizations/show.html.erb
@@ -59,7 +59,7 @@
<% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 %>
<% act = OrgActivity.where("org_act_type = 'OrgDocumentComment' and org_act_id =?", @organization.home_id).first %>
diff --git a/app/views/student_work/forbidden_anonymous_comment.js.erb b/app/views/student_work/forbidden_anonymous_comment.js.erb
index a72c29509..47dfb4b51 100644
--- a/app/views/student_work/forbidden_anonymous_comment.js.erb
+++ b/app/views/student_work/forbidden_anonymous_comment.js.erb
@@ -1,7 +1,7 @@
<% if @user_activity_id == -1 %>
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>");
-init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@homework.class.to_s%>");
<% else %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>");
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
<% end %>
\ No newline at end of file
diff --git a/app/views/student_work/set_score_rule.js.erb b/app/views/student_work/set_score_rule.js.erb
index ff3a0e7ed..180f04faa 100644
--- a/app/views/student_work/set_score_rule.js.erb
+++ b/app/views/student_work/set_score_rule.js.erb
@@ -1,8 +1,8 @@
clickCanel();
<% if @user_activity_id %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id}) %>");
- init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+ init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
<% else %>
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework,:is_in_course => @is_in_course}) %>");
- init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+ init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@homework.class.to_s%>");
<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 4f1d3a5d8..557b9e9ee 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -1,12 +1,12 @@
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
+ <%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<% end %>
-
-
<%= l(:label_issue_tracking) %>
-
-
- <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
- <%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
- <%= hidden_field_tag 'set_filter', '1' %>
-
- <%= link_to '新建问题', new_project_issue_path(@project) , :class => "green_u_btn fr ml10" %>
-
<%= l(:label_issues_sum) %>:<%= @project.issues.visible.all.count %>
- <%= l(:lable_issues_undo) %>:<%= @project.issues.where('status_id in (1,2,4,6)').visible.all.count %>
-
+
-
- <% if !@query.new_record? && @query.editable_by?(User.current) %>
- <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
- <%= delete_link query_path(@query) %>
- <% end %>
-
+
+ <% if !@query.new_record? && @query.editable_by?(User.current) %>
+ <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
+ <%= delete_link query_path(@query) %>
+ <% end %>
+
-<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
-
-
+ <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
+
+
-<%= error_messages_for 'query' %>
+ <%= error_messages_for 'query' %>
-<% if @query.valid? %>
- <% if @issues.empty? %>
-
- <%= l(:label_no_data) %>
-
- <% else %>
-
- <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count} %>
+ <% if @query.valid? %>
+ <% if @issues.empty? %>
+
+ <%= l(:label_no_data) %>
+
+ <% else %>
+
+ <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count} %>
+
+
+
+ <% end %>
+
+
+ <% other_formats_links do |f| %>
+ <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
+ <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
+ <%= f.link_to 'PDF', :url => params %>
+ <% end %>
+
+
<%= l(:label_export_options, :export_format => 'CSV') %>
+ <%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
+
+
+ <%= radio_button_tag 'columns', 'all' %>
+ <%= l(:description_all_columns) %>
+
+
+
+
+ <%= check_box_tag 'description', '1', @query.has_column?(:description) %>
+ <%= l(:field_description) %>
+
+
+
+
+ <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
+ <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
+
+ <% end %>
+
+ <% end %>
+ <%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
+ <% content_for :sidebar do %>
+ <%= render :partial => 'issues/sidebar' %>
<% end %>
-
- <% other_formats_links do |f| %>
- <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
- <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
- <%= f.link_to 'PDF', :url => params %>
- <% end %>
-
+ <% content_for :header_tags do %>
+ <%= auto_discovery_link_tag(:atom,
+ {:query_id => @query, :format => 'atom',
+ :page => nil, :key => User.current.rss_key},
+ :title => l(:label_issue_plural)) %>
+ <%= auto_discovery_link_tag(:atom,
+ {:controller => 'journals', :action => 'index',
+ :query_id => @query, :format => 'atom',
+ :page => nil, :key => User.current.rss_key},
+ :title => l(:label_changes_details)) %>
+ <% end %>
-
-
<%= l(:label_export_options, :export_format => 'CSV') %>
- <%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
-
-
- <%= radio_button_tag 'columns', 'all' %>
- <%= l(:description_all_columns) %>
-
-
-
-
-
- <%= check_box_tag 'description', '1', @query.has_column?(:description) %>
- <%= l(:field_description) %>
-
-
-
-
- <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
- <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
-
- <% end %>
-
-<% end %>
-<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
-<% content_for :sidebar do %>
- <%= render :partial => 'issues/sidebar' %>
-<% end %>
-
-<% content_for :header_tags do %>
- <%= auto_discovery_link_tag(:atom,
- {:query_id => @query, :format => 'atom',
- :page => nil, :key => User.current.rss_key},
- :title => l(:label_issue_plural)) %>
- <%= auto_discovery_link_tag(:atom,
- {:controller => 'journals', :action => 'index',
- :query_id => @query, :format => 'atom',
- :page => nil, :key => User.current.rss_key},
- :title => l(:label_changes_details)) %>
-<% end %>
-
-<%= context_menu issues_context_menu_path %>
+ <%= context_menu issues_context_menu_path %>
+
\ No newline at end of file
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index aa3297128..c0afe45d5 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -161,9 +161,9 @@ a:hover.invi_search_btn{ background:#0da1b2; border:1px solid #0da1b2;}
/*问题跟踪*/
.problem_top{ margin:10px 0 ;}
-.problem_search_input{ border:1px solid #64bdd9; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:5px;}
-a.problem_search_btn{ background:#64bdd9; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #64bdd9; padding-top:2px; cursor:pointer;}
-a:hover.problem_search_btn{ background:#3da1c1; border:1px solid #3da1c1;}
+.problem_search_input{ border:1px solid #dddddd; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:5px;}
+a.problem_search_btn{ background:#269ac9; color:#fff; text-align: center; width:40px; height:22px;border:1px solid #64bdd9; padding-top:2px; cursor:pointer;}
+a:hover.problem_search_btn{ background:#269ac9; border:1px solid #3da1c1;}
a.problem_new_btn{ margin-left:10px; border:1px solid #ff7143; color:#ff7143; width:60px; height:21px; font-size:12px; text-align:center; padding-top:3px;}
a:hover.problem_new_btn{ background:#ff7143; color:#fff;}
.problem_p{ color:#535252; margin-top:5px;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 003cf90df..13362dd19 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -87,6 +87,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mr55{ margin-right:55px;}
.mr10{ margin-right:10px;}
.mr15 {margin-right:15px;}
+.mr18 {margin-right:15px;}
.mr20{ margin-right:20px;}
.mr25 {margin-right:25px;}
.mr30{ margin-right:30px;}
From 032428264107c4a17c33228d0237a34b1cc7be9f Mon Sep 17 00:00:00 2001
From: houxiang
Date: Wed, 16 Dec 2015 14:30:46 +0800
Subject: [PATCH 033/105] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=AF=8F=E4=B8=AA?=
=?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=9A=84=E5=90=84=E4=B8=AA=E6=88=90=E5=91=98?=
=?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=8F=90=E4=BA=A4=E8=B4=A1=E7=8C=AE=E6=AC=A1?=
=?UTF-8?q?=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../lib/gitlab/client/repositories.rb | 7 +++++
lib/tasks/project_commits_query.rake | 30 +++++++++++++++++++
2 files changed, 37 insertions(+)
create mode 100644 lib/tasks/project_commits_query.rake
diff --git a/lib/gitlab-cli/lib/gitlab/client/repositories.rb b/lib/gitlab-cli/lib/gitlab/client/repositories.rb
index f489e5009..e56a740db 100644
--- a/lib/gitlab-cli/lib/gitlab/client/repositories.rb
+++ b/lib/gitlab-cli/lib/gitlab/client/repositories.rb
@@ -85,5 +85,12 @@ class Gitlab::Client
get("/projects/#{project}/repository/commits/#{sha}/diff")
end
alias_method :repo_commit_diff, :commit_diff
+
+ #Get the commits count of each contributor in a project
+ #@param [Integer] project the ID fo a project.
+ # @return [Gitlab::ObjectifiedHash]
+ def contributors(project)
+ get("/projects/#{project}/repository/contributors")
+ end
end
end
diff --git a/lib/tasks/project_commits_query.rake b/lib/tasks/project_commits_query.rake
new file mode 100644
index 000000000..df33419f3
--- /dev/null
+++ b/lib/tasks/project_commits_query.rake
@@ -0,0 +1,30 @@
+#coding=utf-8
+
+namespace :gitlab do
+ desc "sync gitlab's users which lost in last sync"
+ task :query => :environment do
+ g = Gitlab.client
+ projects = Project.all
+ users_email = User.find_by_sql("select mail from users where mail != '' ")
+ projects.each do|project|
+ gpid = project.gpid
+ begin
+ contributors_list = g.contributors(gpid)
+ rescue
+ next
+ end
+ puts "project_id #{project.id}"
+ contributors_list.each do|contributor|
+ if users_email.include?(contributor.email)
+ contributors_list.delete(contributor)
+ end
+ end
+
+ contributors_list.each do|contributor|
+ puts "name #{contributor.name}"
+ puts "email #{contributor.email}"
+ puts "commits_count #{contributor.commits}"
+ end
+ end
+ end
+end
\ No newline at end of file
From 0fef18312dc0f19246fcc38936219826283c9fc8 Mon Sep 17 00:00:00 2001
From: ouyangxuhua
Date: Wed, 16 Dec 2015 15:36:01 +0800
Subject: [PATCH 034/105] =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=BB=8F=E8=BF=87?=
=?UTF-8?q?=E8=B5=84=E6=BA=90=E6=A0=8F=E7=9B=AETAG=E6=97=B6=EF=BC=8C?=
=?UTF-8?q?=E5=8F=98=E6=88=90=E6=89=8B=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/tags/_tag_list.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/tags/_tag_list.html.erb b/app/views/tags/_tag_list.html.erb
index 14b6a0597..de8c0a4d2 100644
--- a/app/views/tags/_tag_list.html.erb
+++ b/app/views/tags/_tag_list.html.erb
@@ -2,7 +2,7 @@
<% if @tags.size > 0 %>
<% @tags.each do |tag| %>
- <%#= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
+ <%#= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
<%= tag %>
<% case object_flag %>
From b13ae8f599378215f66a71273fa2f7f4cb23a6d9 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Wed, 16 Dec 2015 15:55:40 +0800
Subject: [PATCH 035/105] issue
---
app/controllers/issues_controller.rb | 2 +-
app/views/issues/_list.html.erb | 15 ++++++++++++---
app/views/issues/index.html.erb | 16 ++++++++--------
app/views/issues/index.js.erb | 5 ++---
public/javascripts/application.js | 4 ++++
5 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 1eb39fb32..48bf3b568 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -81,7 +81,7 @@ class IssuesController < ApplicationController
@status_id = params[:status_id]
@subject = params[:subject]
@issue_count = @query.issue_count
- @issue_pages = Paginator.new @issue_count, @limit, params['page']
+ @issue_pages = Paginator.new @issue_count, @limit, params['page'].to_i + 1
@offset ||= @issue_pages.offset
@issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
:order => sort_clause,
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index 327cc2c75..c071d57d8 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -39,6 +39,15 @@
<%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %>
<% end %>
-
- <%= pagination_links_full issue_pages, issue_count, :per_page_links => false, :remote => true, :flag => true %>
-
\ No newline at end of file
+ <% if issues.count == 10%>
+ 展开更多<%=link_to "", project_issues_path(:project_id => project.id,:page => issue_pages.page),:id => "more_issues_link",:remote => "true",:class => "none" %>
+ <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
+ <% end%>
+
+
+
+
\ No newline at end of file
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index df7f9dddc..7c358aaed 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -144,19 +144,19 @@
<% else %>
- <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count} %>
+ <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} %>
<% end %>
-
- <% other_formats_links do |f| %>
- <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>
- <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>
- <%= f.link_to 'PDF', :url => params %>
- <% end %>
-
+
+
+
+
+
+
+
<%= l(:label_export_options, :export_format => 'CSV') %>
diff --git a/app/views/issues/index.js.erb b/app/views/issues/index.js.erb
index 012d01c20..9e68f9bc8 100644
--- a/app/views/issues/index.js.erb
+++ b/app/views/issues/index.js.erb
@@ -1,3 +1,2 @@
-$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
-$("#v_subject").focus();
-$("#v_subject").blur();
\ No newline at end of file
+//$("#issue_list").html("<%#= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
+$("#show_more_issues").replaceWith("<%= escape_javascript( render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} )%>");
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 50f271a8a..dcf153a80 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -590,7 +590,11 @@ function setupAjaxIndicator() {
$('#ajax-indicator').hide();
if(MathJax && MathJax.Hub)
MathJax.Hub.Queue(['Typeset', MathJax.Hub]); //如果是ajax刷新页面的话,手动执行MathJax的公式显示
+ try{
+ prettyPrint(); //如果刷新出来的页面如果存在代码行的话,也需要美化
+ }catch (e){
+ }
});
}
From c0de5d55de11e13e89386595733639dd08df3eac Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Wed, 16 Dec 2015 16:37:00 +0800
Subject: [PATCH 036/105] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=BA=86issue?=
=?UTF-8?q?=E7=9A=84at=E6=B6=88=E6=81=AF=E6=8F=90=E9=86=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/models/issue.rb | 8 +++++---
app/views/users/_user_at_message.html.erb | 21 +++++++++++++++++++++
app/views/users/user_messages.html.erb | 2 ++
db/schema.rb | 16 +++++++++++++++-
4 files changed, 43 insertions(+), 4 deletions(-)
create mode 100644 app/views/users/_user_at_message.html.erb
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 11daf670f..5ecb3e36f 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -52,6 +52,7 @@ class Issue < ActiveRecord::Base
# ForgeMessage虚拟关联(多态)
has_many :forge_messages, :class_name => 'ForgeMessage',:as =>:forge_message ,:dependent => :destroy
+ has_many :at_messages, class_name: 'AtMessage', as: :at_message ,:dependent => :destroy
acts_as_nested_set :scope => 'root_id', :dependent => :destroy
acts_as_attachable :before_add => :attachment_added, :after_remove => :attachment_removed
@@ -82,7 +83,7 @@ class Issue < ActiveRecord::Base
attr_reader :current_journal
# fq
- after_create :act_as_activity,:be_user_score_new_issue,:act_as_forge_activity, :act_as_forge_message
+ after_create :act_as_activity,:be_user_score_new_issue,:act_as_forge_activity, :act_as_forge_message, :act_as_at_message
after_update :be_user_score
after_destroy :down_user_score
# after_create :be_user_score
@@ -159,8 +160,9 @@ class Issue < ActiveRecord::Base
# at 功能添加消息提醒
def act_as_at_message
users = self.description.scan /
/m
- ### xxx 在 xxx 中at了你
-
+ users && users.flatten.uniq.each do |uid|
+ self.at_messages << AtMessage.new(user_id: uid, sender_id: self.author_id)
+ end
end
# 更新缺陷
diff --git a/app/views/users/_user_at_message.html.erb b/app/views/users/_user_at_message.html.erb
new file mode 100644
index 000000000..0b706c4ce
--- /dev/null
+++ b/app/views/users/_user_at_message.html.erb
@@ -0,0 +1,21 @@
+<% if AtMessage === ma %>
+
+ <%=link_to image_tag(url_to_avatar(ma.at_message.author), :width => "30", :height => "30"),user_path(ma.at_message.author) %>
+
+ <%= ma.at_message.author.login %> 提到了你:
+
+
+ <%= link_to ma.at_message.subject, {:controller => :issues, :action => 'show', :id => ma.at_message.id },
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
标题: <%= ma.at_message.subject %>
+ <% unless ma.at_message.description.nil? %>
+
内容:
+
<%= ma.at_message.description.html_safe %>
+ <% end %>
+
+ <%= time_tag(ma.created_at).html_safe %>
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index f83e5617c..d690f7e43 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -17,6 +17,8 @@
<%# 系统消息 %>
<%= render :partial => 'users/user_message_system', :locals => {:ma => ma} %>
+ <%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
+
<%# 课程消息 %>
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
diff --git a/db/schema.rb b/db/schema.rb
index 17e613acb..2bf172198 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20151209085942) do
+ActiveRecord::Schema.define(:version => 20151216030610) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -66,6 +66,20 @@ ActiveRecord::Schema.define(:version => 20151209085942) do
t.datetime "updated_at", :null => false
end
+ create_table "at_messages", :force => true do |t|
+ t.integer "user_id"
+ t.integer "at_message_id"
+ t.string "at_message_type"
+ t.boolean "viewed"
+ t.string "container_type"
+ t.integer "container_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "sender_id"
+ end
+
+ add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id"
+
create_table "attachments", :force => true do |t|
t.integer "container_id"
t.string "container_type", :limit => 30
From a0035a4c1ed46e94ab34255b743323e6ea73341f Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Wed, 16 Dec 2015 16:49:33 +0800
Subject: [PATCH 037/105] =?UTF-8?q?issue=20=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/issues_controller.rb | 3 +++
app/views/issues/_list.html.erb | 2 +-
app/views/issues/index.html.erb | 2 +-
app/views/issues/index.js.erb | 6 +++++-
4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 48bf3b568..3263ebc07 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -87,6 +87,9 @@ class IssuesController < ApplicationController
:order => sort_clause,
:offset => @offset,
:limit => @limit)
+ if params[:set_filter]
+ @set_filter = params[:set_filter]
+ end
@issue_count_by_group = @query.issue_count_by_group
respond_to do |format|
format.js
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index c071d57d8..115a70e7a 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -40,7 +40,7 @@
<%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %>
<% end %>
<% if issues.count == 10%>
- 展开更多<%=link_to "", project_issues_path(:project_id => project.id,:page => issue_pages.page),:id => "more_issues_link",:remote => "true",:class => "none" %>
+ 展开更多<%=link_to "", project_issues_path({:project_id => project.id,:page => issue_pages.page}.merge(params)),:id => "more_issues_link",:remote => "true",:class => "none" %>
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end%>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 7c358aaed..cf0428c27 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -144,7 +144,7 @@
<% else %>
- <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} %>
+ <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
diff --git a/app/views/issues/index.js.erb b/app/views/issues/index.js.erb
index 9e68f9bc8..9ddc50445 100644
--- a/app/views/issues/index.js.erb
+++ b/app/views/issues/index.js.erb
@@ -1,2 +1,6 @@
//$("#issue_list").html("<%#= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
-$("#show_more_issues").replaceWith("<%= escape_javascript( render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} )%>");
+<% if @set_filter && @issue_pages.page == 1%>
+ $("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project})%>");
+<%else%>
+ $("#show_more_issues").replaceWith("<%= escape_javascript( render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} )%>");
+<%end%>
From 66f88cdf5ad02a6c21493eabd086b48238e0bedb Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Wed, 16 Dec 2015 16:55:07 +0800
Subject: [PATCH 038/105] =?UTF-8?q?issue=20=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/issues/index.js.erb | 2 +-
public/stylesheets/project.css | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/views/issues/index.js.erb b/app/views/issues/index.js.erb
index 9ddc50445..399c6a977 100644
--- a/app/views/issues/index.js.erb
+++ b/app/views/issues/index.js.erb
@@ -1,5 +1,5 @@
//$("#issue_list").html("<%#= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
-<% if @set_filter && @issue_pages.page == 1%>
+<% if @set_filter && @issue_pages.page == 1%> //只有搜索的第一页才需要替换整个issue_list,其余的都是替换show_more_issues
$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project})%>");
<%else%>
$("#show_more_issues").replaceWith("<%= escape_javascript( render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} )%>");
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index c0afe45d5..db41a1c5c 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -1078,4 +1078,7 @@ img.date-trigger {
}
.proInfoBox{ margin-left:60px; border:1px solid #dddddd; height:45px; padding:10px 0; background-color:#f1f1f1;}
.proInfoBox ul li{ height:24px;}
-.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
\ No newline at end of file
+.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
+
+a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
+a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
\ No newline at end of file
From bb23049f5555dcc5455aacf9e664c30c83aaae9a Mon Sep 17 00:00:00 2001
From: huang
Date: Wed, 16 Dec 2015 17:04:17 +0800
Subject: [PATCH 039/105] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4=E6=AC=A1=E6=95=B0=E5=B0=81=E8=A3=85=20=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/repositories_controller.rb | 37 ++-----------------
app/helpers/application_helper.rb | 36 +++++++++++++++++++
app/helpers/project_score_helper.rb | 1 +
app/views/repositories/_revisions.html.erb | 42 ++++++++--------------
4 files changed, 54 insertions(+), 62 deletions(-)
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index f0b15e8f8..8eb6a6860 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -348,10 +348,6 @@ update
# end
# end
-
-
-
-
@changesets = g.commits(@project.gpid, :ref_name => @rev)
# @changesets = @repository.latest_changesets(@path, @rev)
# @changesets_count = @repository.latest_changesets(@path, @rev).count
@@ -378,19 +374,6 @@ update
alias_method :browse, :show
- #add by hx
- def count_commits(project_id , left , right)
- count = 0
- (left..right).each do |page|
- if $g.commits(project_id,:page => page).count == 0
- break
- else
- count = count + $g.commits(project_id,:page => page).count
- end
- end
- return count
- end
-
def changes
@entry = @repository.entry(@path, @rev)
(show_error_not_found; return) unless @entry
@@ -400,26 +383,10 @@ update
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s)
#add by hx
- if g.commits(@project.gpid , :page=>200).count > 0
- count = 4020
- elsif g.commits(@project.gpid , :page=>25).count==0
- count = count_commits(@project.gpid , 0 , 25)
- elsif g.commits(@project.gpid , :page=>50).count ==0
- count = count_commits(@project.gpid , 25 , 50)+ 25 * 20
- elsif g.commits(@project.gpid , :page=>75).count ==0
- count = count_commits(@project.gpid , 50 , 75)+ 50 * 20
- elsif g.commits(@project.gpid , :page=>100).count== 0
- count = count_commits(@project.gpid , 75 , 100) + 75 * 20
- elsif g.commits(@project.gpid , :page=>125).count==0
- count = count_commits(@project.gpid , 100 , 125) + 100 * 20
- elsif g.commits(@project.gpid , :page=>150).count==0
- count = count_commits(@project.gpid , 125 , 150) + 125 * 20
- else
- count = count_commits(@project.gpid , 150 ,200) + 150 * 20
- end
+ rep_count = commit_count(@project)
#页面传递必须要str类型,但是Paginator的初始化必须要num类型,需要类型转化
- @commits_count = count
+ @commits_count = rep_count
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
@commit = g.commit(@project.gpid,@rev)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 5a9563b73..667314531 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -668,6 +668,42 @@ module ApplicationHelper
return rep.blank? ? true :false
end
+ # 获取Gitlab版本库提交总数
+ def commit_count(project)
+ g = Gitlab.client
+ #add by hx
+ if g.commits(project.gpid , :page=>200).count > 0
+ count = 4020
+ elsif g.commits(project.gpid , :page=>25).count==0
+ count = count_commits(project.gpid , 0 , 25)
+ elsif g.commits(project.gpid , :page=>50).count ==0
+ count = count_commits(project.gpid , 25 , 50)+ 25 * 20
+ elsif g.commits(project.gpid , :page=>75).count ==0
+ count = count_commits(project.gpid , 50 , 75)+ 50 * 20
+ elsif g.commits(project.gpid , :page=>100).count== 0
+ count = count_commits(project.gpid , 75 , 100) + 75 * 20
+ elsif g.commits(project.gpid , :page=>125).count==0
+ count = count_commits(project.gpid , 100 , 125) + 100 * 20
+ elsif g.commits(project.gpid , :page=>150).count==0
+ count = count_commits(project.gpid , 125 , 150) + 125 * 20
+ else
+ count = count_commits(project.gpid , 150 ,200) + 150 * 20
+ end
+ end
+
+ #add by hx
+ def count_commits(project_id , left , right)
+ count = 0
+ (left..right).each do |page|
+ if $g.commits(project_id,:page => page).count == 0
+ break
+ else
+ count = count + $g.commits(project_id,:page => page).count
+ end
+ end
+ return count
+ end
+
# 获取单一gitlab项目
def gitlab_repository(project)
rep = Repository.where("project_id =? and type =?", project.id,"Repository::Gitlab" ).first
diff --git a/app/helpers/project_score_helper.rb b/app/helpers/project_score_helper.rb
index 104cd16cb..256e35a7a 100644
--- a/app/helpers/project_score_helper.rb
+++ b/app/helpers/project_score_helper.rb
@@ -22,6 +22,7 @@ module ProjectScoreHelper
#代码提交数量
def changesets_num project
+ # commit_count(project)
project.changesets.count
end
diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb
index b72a05876..4d6e39f88 100644
--- a/app/views/repositories/_revisions.html.erb
+++ b/app/views/repositories/_revisions.html.erb
@@ -20,42 +20,31 @@
-
<% if !user_commit_rep(changeset.author_email).nil? %>
- <%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
- <%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %>
- 提交于
+ <%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
+ <%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %>提交于
- <%= time_tag(changeset.created_at) %>
- 前
-
-
+ <%= time_tag(changeset.created_at) %>前
<% else %>
-
<%= changeset.author_email %>
- 提交于
+
<%= changeset.author_email %> 提交于
- <%= time_tag(changeset.created_at) %>
- 前
-
-
+ <%= time_tag(changeset.created_at) %> 前
<% end %>
-
-
+
@@ -65,7 +54,6 @@
<%#= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
-
<%= pagination_links_full commits_pages, commits_count, :per_page_links => false, :remote => false, :flag => true %>
From ffd8d55aa6ef3e5702f7b7da75ec535987d849a6 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Wed, 16 Dec 2015 17:08:59 +0800
Subject: [PATCH 040/105] =?UTF-8?q?memo=E6=9B=B4=E6=96=B0=E6=97=B6?=
=?UTF-8?q?=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/memos_controller.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/controllers/memos_controller.rb b/app/controllers/memos_controller.rb
index 2d2c058d4..a47ddf787 100644
--- a/app/controllers/memos_controller.rb
+++ b/app/controllers/memos_controller.rb
@@ -159,7 +159,8 @@ class MemosController < ApplicationController
@memo.update_column(:content, params[:memo][:content]) &&
@memo.update_column(:sticky, params[:memo][:sticky]) &&
@memo.update_column(:lock, params[:memo][:lock]) &&
- @memo.update_column(:subject,params[:memo][:subject]))
+ @memo.update_column(:subject,params[:memo][:subject]) &&
+ @memo.update_column(:updated_at,Time.now))
@memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads]))
@flag = @memo.save
# @memo.root.update_attribute(:updated_at, @memo.updated_at)
From 71f6a637e06c103e228a0d1d95ee57f4a273bad4 Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Wed, 16 Dec 2015 17:26:19 +0800
Subject: [PATCH 041/105] =?UTF-8?q?=E5=B8=96=E5=AD=90=E6=8C=89=E6=97=B6?=
=?UTF-8?q?=E9=97=B4=E5=80=92=E6=8E=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/forums_controller.rb | 4 +--
app/views/forums/show.html.erb | 6 ++--
db/schema.rb | 43 ++++++++++++++++------------
3 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb
index efbb4ffab..3332f1207 100644
--- a/app/controllers/forums_controller.rb
+++ b/app/controllers/forums_controller.rb
@@ -147,8 +147,8 @@ class ForumsController < ApplicationController
order = "#{Memo.table_name}.updated_at #{params[:reorder_time]}"
@order_str = "reorder_time="+params[:reorder_time]
else
- order = "last_replies_memos.created_at desc, #{Memo.table_name}.created_at desc"
- @order_str = "reorder_complex=desc"
+ order = "#{Memo.table_name}.updated_at desc"
+ @order_str = "reorder_time=desc"
end
@memo = Memo.new(:forum => @forum)
@topic_count = @forum.topics.count
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb
index 2a7a02e57..b0ed5a60c 100644
--- a/app/views/forums/show.html.erb
+++ b/app/views/forums/show.html.erb
@@ -30,9 +30,11 @@
<% end %>
diff --git a/db/schema.rb b/db/schema.rb
index 17e613acb..bcc6b2c80 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -544,26 +544,23 @@ ActiveRecord::Schema.define(:version => 20151209085942) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
add_index "documents", ["project_id"], :name => "documents_project_id"
- create_table "dts", :primary_key => "Num", :force => true do |t|
- t.string "Defect", :limit => 50
- t.string "Category", :limit => 50
- t.string "File"
- t.string "Method"
- t.string "Module", :limit => 20
- t.string "Variable", :limit => 50
- t.integer "StartLine"
- t.integer "IPLine"
- t.string "IPLineCode", :limit => 200
- t.string "Judge", :limit => 15
- t.integer "Review", :limit => 1
+ create_table "dts", :force => true do |t|
+ t.string "IPLineCode"
t.string "Description"
- t.text "PreConditions", :limit => 2147483647
- t.text "TraceInfo", :limit => 2147483647
- t.text "Code", :limit => 2147483647
+ t.string "Num"
+ t.string "Variable"
+ t.string "TraceInfo"
+ t.string "Method"
+ t.string "File"
+ t.string "IPLine"
+ t.string "Review"
+ t.string "Category"
+ t.string "Defect"
+ t.string "PreConditions"
+ t.string "StartLine"
t.integer "project_id"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "id", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
end
create_table "editor_of_documents", :force => true do |t|
@@ -912,6 +909,16 @@ ActiveRecord::Schema.define(:version => 20151209085942) do
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
+ create_table "journal_details_copy", :force => true do |t|
+ t.integer "journal_id", :default => 0, :null => false
+ t.string "property", :limit => 30, :default => "", :null => false
+ t.string "prop_key", :limit => 30, :default => "", :null => false
+ t.text "old_value"
+ t.text "value"
+ end
+
+ add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
+
create_table "journal_replies", :id => false, :force => true do |t|
t.integer "journal_id"
t.integer "user_id"
From 0a3c5f6acc8a17ff2a9be18d617876f252abac2b Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 17 Dec 2015 09:22:01 +0800
Subject: [PATCH 042/105] =?UTF-8?q?issues=E5=A6=82=E6=9E=9C=E6=A0=87?=
=?UTF-8?q?=E9=A2=98=E4=B8=BA=E7=A9=BA=E9=9C=80=E8=A6=81=E5=BC=B9=E6=A1=86?=
=?UTF-8?q?=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/issues_controller.rb | 6 ++++--
app/views/issues/update.js.erb | 5 ++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 3263ebc07..140d49f37 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -219,7 +219,7 @@ class IssuesController < ApplicationController
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
saved = false
begin
- saved = @issue.save_issue_with_child_records(params, @time_entry)
+ @saved = @issue.save_issue_with_child_records(params, @time_entry)
rescue ActiveRecord::StaleObjectError
@conflict = true
if params[:last_journal_id]
@@ -228,7 +228,7 @@ class IssuesController < ApplicationController
end
end
- if saved
+ if @saved
#修改界面增加跟踪者
watcherlist = @issue.watcher_users
select_users = []
@@ -265,6 +265,8 @@ class IssuesController < ApplicationController
end
else
respond_to do |format|
+
+ format.js
format.html { render :action => 'edit' }
format.api { render_validation_errors(@issue) }
end
diff --git a/app/views/issues/update.js.erb b/app/views/issues/update.js.erb
index 8ff6e5245..cb281de72 100644
--- a/app/views/issues/update.js.erb
+++ b/app/views/issues/update.js.erb
@@ -1,3 +1,4 @@
+<% if @saved %>
$("#issue_detail").replaceWith('<%= escape_javascript(render :partial => 'issues/detail') %>')
$("#issue_edit").replaceWith('<%= escape_javascript(render :partial => 'issues/edit') %>')
$("#issue_detail").show();
@@ -17,4 +18,6 @@ issue_desc_editor = KindEditor.create('#issue_description',
"allowFileManager":true,
"uploadJson":"/kindeditor/upload",
"fileManagerJson":"/kindeditor/filemanager"});
-
+<%else%>
+ alert('<%= @issue.errors.full_messages[0].to_s%>')
+<%end %>
From 8d58b045f19a399538df3f3560ef36ec903dfe9f Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 17 Dec 2015 09:55:02 +0800
Subject: [PATCH 043/105] =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=93=BE=E6=8E=A5?=
=?UTF-8?q?=E5=8D=B4=E5=BC=B9=E5=87=BA=E5=9B=BE=E7=89=87=E6=A1=86=20bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/javascripts/application.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index dcf153a80..901e302d3 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -969,6 +969,7 @@ function showNormalImage(id) {
var element=$(" ").attr("href",image.attr('src'));
image.wrap(element);
}
+ $('#'+id+' a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); //有图片才将链接变为弹出框
}
- $('#'+id+' a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
+
}
From acb604883db69def25aa662c9938f2cf2d36dbca Mon Sep 17 00:00:00 2001
From: ouyangxuhua
Date: Thu, 17 Dec 2015 10:01:28 +0800
Subject: [PATCH 044/105] =?UTF-8?q?=E9=A1=B9=E7=9B=AE/=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=85=B3=E8=81=94=E7=BB=84=E7=BB=87=EF=BC=8C?=
=?UTF-8?q?=E5=B7=A6=E8=BE=B9=E7=9A=84=E7=BB=84=E7=BB=87=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=94=B1=E6=AF=8F=E9=A1=B510=E4=B8=AA=E7=BB=84=E7=BB=87?=
=?UTF-8?q?=E5=A2=9E=E8=87=B315=E4=B8=AA=E7=BB=84=E7=BB=87=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/courses_controller.rb | 7 ++++---
app/controllers/projects_controller.rb | 7 ++++---
app/views/courses/search_public_orgs_not_in_course.js.erb | 2 +-
.../projects/search_public_orgs_not_in_project.js.erb | 2 +-
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index 1b0ead141..aa0e1596f 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -36,17 +36,18 @@ class CoursesController < ApplicationController
if !params[:name].nil?
condition = "%#{params[:name].strip}%".gsub(" ","")
end
+ limit = 15
course_org_ids = OrgCourse.find_by_sql("select distinct organization_id from org_courses where course_id = #{params[:id]}").map(&:organization_id)
if course_org_ids.empty?
- @orgs_not_in_course = Organization.where("(is_public or creator_id =?) and name like ?",User.current.id, condition).page((params[:page].to_i || 1)).per(10)
+ @orgs_not_in_course = Organization.where("(is_public or creator_id =?) and name like ?",User.current.id, condition).page((params[:page].to_i || 1)).per(limit)
@org_count = Organization.where("is_public = 1 or creator_id =?", User.current.id).where("name like ?", condition).count
else
course_org_ids = "(" + course_org_ids.join(',') + ")"
- @orgs_not_in_course = Organization.where("id not in #{course_org_ids} and (is_public = 1 or creator_id =?) and name like ?", User.current.id, condition).page((params[:page].to_i || 1)).per(10)
+ @orgs_not_in_course = Organization.where("id not in #{course_org_ids} and (is_public = 1 or creator_id =?) and name like ?", User.current.id, condition).page((params[:page].to_i || 1)).per(limit)
@org_count = Organization.where("id not in #{course_org_ids} and (is_public = 1 or creator_id =?)", User.current.id).where("name like ?", condition).count
end
# @course_count = Project.course_entities.visible.like(params[:name]).page(params[:page]).count
- @orgs_page = Paginator.new @org_count, 10,params[:page]
+ @orgs_page = Paginator.new @org_count, limit,params[:page]
@hint_flag = params[:hint_flag]
#render :json => {:orgs => @orgs_not_in_course, :count => @org_count}.to_json
respond_to do |format|
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 88aae0f8b..7384e2c98 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -75,17 +75,18 @@ class ProjectsController < ApplicationController
if !params[:name].nil?
condition = "%#{params[:name].strip}%".gsub(" ","")
end
+ limit = 15
project_org_ids = OrgProject.find_by_sql("select distinct organization_id from org_projects where project_id = #{params[:id]}").map(&:organization_id)
if project_org_ids.empty?
- @orgs_not_in_project = Organization.where("(is_public or creator_id =?) = 1 and name like ?",User.current.id, condition).page((params[:page].to_i || 1)).per(10)
+ @orgs_not_in_project = Organization.where("(is_public or creator_id =?) = 1 and name like ?",User.current.id, condition).page((params[:page].to_i || 1)).per(limit)
@org_count = Organization.where("is_public = 1 or creator_id =?", User.current.id).where("name like ?", condition).count
else
project_org_ids = "(" + project_org_ids.join(',') + ")"
- @orgs_not_in_project = Organization.where("id not in #{project_org_ids} and (is_public = 1 or creator_id =?) and name like ?", User.current.id, condition).page((params[:page].to_i || 1)).per(10)
+ @orgs_not_in_project = Organization.where("id not in #{project_org_ids} and (is_public = 1 or creator_id =?) and name like ?", User.current.id, condition).page((params[:page].to_i || 1)).per(limit)
@org_count = Organization.where("id not in #{project_org_ids} and (is_public = 1 or creator_id =?)", User.current.id).where("name like ?", condition).count
end
# @project_count = Project.project_entities.visible.like(params[:name]).page(params[:page]).count
- @orgs_page = Paginator.new @org_count, 10,params[:page]
+ @orgs_page = Paginator.new @org_count, limit,params[:page]
@no_roll_hint = params[:hint_flag]
#render :json => {:orgs => @orgs_not_in_project, :count => @org_count}.to_json
respond_to do |format|
diff --git a/app/views/courses/search_public_orgs_not_in_course.js.erb b/app/views/courses/search_public_orgs_not_in_course.js.erb
index 2669f8a0f..ebd0c58a7 100644
--- a/app/views/courses/search_public_orgs_not_in_course.js.erb
+++ b/app/views/courses/search_public_orgs_not_in_course.js.erb
@@ -11,7 +11,7 @@ $("#search_orgs_result_list").append('');
$("#search_orgs_result_list").append(link );
<%end %>
$("#search_orgs_result_list").append(' ')
-<% if @org_count > 10 %>
+<% if @org_count > 15 %>
$("#paginator").html(' <%= pagination_links_full @orgs_page, @org_count ,:per_page_links => true,:remote =>true,:flag=>true%>');
$("#paginator").css("display", "block");
<% else %>
diff --git a/app/views/projects/search_public_orgs_not_in_project.js.erb b/app/views/projects/search_public_orgs_not_in_project.js.erb
index c8ac999a1..cb8fb3ea2 100644
--- a/app/views/projects/search_public_orgs_not_in_project.js.erb
+++ b/app/views/projects/search_public_orgs_not_in_project.js.erb
@@ -12,7 +12,7 @@ $("#search_orgs_result_list").append('');
$("#search_orgs_result_list").append(link );
<%end %>
$("#search_orgs_result_list").append(' ')
-<% if @org_count > 10 %>
+<% if @org_count > 15 %>
$("#paginator").html(' <%= pagination_links_full @orgs_page, @org_count ,:per_page_links => true,:remote =>true,:flag=>true%>');
$("#paginator").css("display", "block");
<% else %>
From c183574a5efd8b802cd4f26c3c7b0b4406aee15f Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 17 Dec 2015 10:19:43 +0800
Subject: [PATCH 045/105] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E5=9B=9E=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/blog_comments_controller.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/controllers/blog_comments_controller.rb b/app/controllers/blog_comments_controller.rb
index b92223edc..7c09e2cdf 100644
--- a/app/controllers/blog_comments_controller.rb
+++ b/app/controllers/blog_comments_controller.rb
@@ -118,6 +118,7 @@ class BlogCommentsController < ApplicationController
@blogComment.content = @quote + @blogComment.content
@blogComment.title = "RE: #{@article.title}" unless params[:blog_comment][:title]
@article.children << @blogComment
+ @article.save
@user_activity_id = params[:user_activity_id]
user_activity = UserActivity.where("act_type='BlogComment' and act_id =#{@article.id}").first
if user_activity
From 074d8f62c2a22dd828f3afa5ef3cbbdb7b328318 Mon Sep 17 00:00:00 2001
From: huang
Date: Thu, 17 Dec 2015 11:16:46 +0800
Subject: [PATCH 046/105] delete the two config files on gitlab
---
config/configuration.yml | 235 ---------------------------
config/initializers/gitlab_config.rb | 9 -
2 files changed, 244 deletions(-)
delete mode 100644 config/configuration.yml
delete mode 100644 config/initializers/gitlab_config.rb
diff --git a/config/configuration.yml b/config/configuration.yml
deleted file mode 100644
index 3790045aa..000000000
--- a/config/configuration.yml
+++ /dev/null
@@ -1,235 +0,0 @@
-# = Redmine configuration file
-#
-# Each environment has it's own configuration options. If you are only
-# running in production, only the production block needs to be configured.
-# Environment specific configuration options override the default ones.
-#
-# Note that this file needs to be a valid YAML file.
-# DO NOT USE TABS! Use 2 spaces instead of tabs for identation.
-#
-# == Outgoing email settings (email_delivery setting)
-#
-# === Common configurations
-#
-# ==== Sendmail command
-#
-# production:
-# email_delivery:
-# delivery_method: :sendmail
-#
-# ==== Simple SMTP server at localhost
-#
-# production:
-# email_delivery:
-# delivery_method: :smtp
-# smtp_settings:
-# address: smtp.163.com
-# port: 25
-#
-# ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
-#
-# production:
-# email_delivery:
-# delivery_method: :smtp
-# smtp_settings:
-# address: smtp.gmail.com
-# port: 587
-# authentication: :login
-# domain: 'foo.com'
-# user_name: senluowanxiangt@gmail.com
-# password: 1913TXBja
-#
-# ==== SMTP server at example.com using PLAIN authentication
-#
-# production:
-# email_delivery:
-# delivery_method: :smtp
-# smtp_settings:
-# address: smtp.gmail.com
-# port: 587
-# authentication: :plain
-# domain: 'example.com'
-# user_name: senluowanxiangt@gmail.com
-# password: 1913TXBja
-#
-# ==== SMTP server at using TLS (GMail)
-#
-# This might require some additional configuration. See the guides at:
-# http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
-#
-# production:
-# email_delivery:
-# delivery_method: :smtp
-# smtp_settings:
-# enable_starttls_auto: true
-# address: smtp.gmail.com
-# port: 587
-# domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
-# authentication: :plain
-# user_name: senluowanxiangt@gmail.com
-# password: 1913TXBja
-#
-#
-# === More configuration options
-#
-# See the "Configuration options" at the following website for a list of the
-# full options allowed:
-#
-# http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer
-
-
-
-default:
- email_delivery:
- delivery_method: :smtp
- smtp_settings:
- address: mail.trustie.net
- port: 25
- domain: mail.trustie.net
- authentication: :login
- user_name: "mail@trustie.net"
- password: "loong2010"
-
- # Absolute path to the directory where attachments are stored.
- # The default is the 'files' directory in your Redmine instance.
- # Your Redmine instance needs to have write permission on this
- # directory.
- # Examples:
- # attachments_storage_path: /var/redmine/files
- # attachments_storage_path: D:/redmine/files
- attachments_storage_path:
-
- # Configuration of the autologin cookie.
- # autologin_cookie_name: the name of the cookie (default: autologin)
- # autologin_cookie_path: the cookie path (default: /)
- # autologin_cookie_secure: true sets the cookie secure flag (default: false)
- autologin_cookie_name: "autologin_trustie"
- autologin_cookie_path:
- autologin_cookie_secure:
-
- # Configuration of SCM executable command.
- #
- # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
- # On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
- #
- # On Windows + JRuby 1.6.2, path which contains spaces does not work.
- # For example, "C:\Program Files\TortoiseHg\hg.exe".
- # If you want to this feature, you need to install to the path which does not contains spaces.
- # For example, "C:\TortoiseHg\hg.exe".
- #
- # Examples:
- # scm_subversion_command: svn # (default: svn)
- # scm_mercurial_command: C:\Program Files\TortoiseHg\hg.exe # (default: hg)
- # scm_git_command: /usr/local/bin/git # (default: git)
- # scm_cvs_command: cvs # (default: cvs)
- # scm_bazaar_command: bzr.exe # (default: bzr)
- # scm_darcs_command: darcs-1.0.9-i386-linux # (default: darcs)
- #
- scm_subversion_command:
- scm_mercurial_command:
- scm_git_command:
- scm_cvs_command:
- scm_bazaar_command:
- scm_darcs_command:
-
- # Absolute path to the SCM commands errors (stderr) log file.
- # The default is to log in the 'log' directory of your Redmine instance.
- # Example:
- # scm_stderr_log_file: /var/log/redmine_scm_stderr.log
- scm_stderr_log_file:
-
- # Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
- # If you don't want to enable data encryption, just leave it blank.
- # WARNING: losing/changing this key will make encrypted data unreadable.
- #
- # If you want to encrypt existing passwords in your database:
- # * set the cipher key here in your configuration file
- # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
- #
- # If you have encrypted data and want to change this key, you have to:
- # * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
- # * change the cipher key here in your configuration file
- # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
- database_cipher_key:
-
- # Set this to false to disable plugins' assets mirroring on startup.
- # You can use `rake redmine:plugins:assets` to manually mirror assets
- # to public/plugin_assets when you install/upgrade a Redmine plugin.
- #
- #mirror_plugins_assets_on_startup: false
-
- # Your secret key for verifying cookie session data integrity. If you
- # change this key, all old sessions will become invalid! Make sure the
- # secret is at least 30 characters and all random, no regular words or
- # you'll be exposed to dictionary attacks.
- #
- # If you have a load-balancing Redmine cluster, you have to use the
- # same secret token on each machine.
- #secret_token: 'change it to a long random string'
-
- # Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
- # the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
- imagemagick_convert_command: '/home/pdl/redmine-2.3.2-0/common/bin/convert'
-
- # Configuration of RMagcik font.
- #
- # Redmine uses RMagcik in order to export gantt png.
- # You don't need this setting if you don't install RMagcik.
- #
- # In CJK (Chinese, Japanese and Korean),
- # in order to show CJK characters correctly,
- # you need to set this configuration.
- #
- # Because there is no standard font across platforms in CJK,
- # you need to set a font installed in your server.
- #
- # This setting is not necessary in non CJK.
- #
- # Examples for Japanese:
- # Windows:
- # rmagick_font_path: C:\windows\fonts\msgothic.ttc
- # Linux:
- # rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
- #
- rmagick_font_path:
-
- # Maximum number of simultaneous AJAX uploads
- #max_concurrent_ajax_uploads: 2
- #pic_types: "bmp,jpeg,jpg,png,gif"
-
- repository_root_path: '/tmp/htdocs'
- judge_server: 'http://judge.trustie.net/'
-
- # Git's url
- gitlab_address: 'http://gitfast.trustie.net'
-
-# specific configuration options for production environment
-# that overrides the default ones
-production:
- # CJK support
- rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
- judge_server: 'http://192.168.80.21:8080/'
- repository_root_path: '/home/pdl/redmine-2.3.2-0/apache2/htdocs'
- cookie_domain: ".trustie.net"
- email_delivery:
- delivery_method: :smtp
- smtp_settings:
- address: mail.trustie.net
- port: 25
- domain: mail.trustie.net
- authentication: :login
- user_name: "mail@trustie.net"
- password: "loong2010"
-
-# specific configuration options for development environment
-# that overrides the default ones
-development:
- email_delivery:
- delivery_method: :smtp
- smtp_settings:
- address: mail.trustie.net
- port: 25
- domain: mail.trustie.net
- authentication: :login
- user_name: "mail@trustie.net"
- password: "loong2010"
diff --git a/config/initializers/gitlab_config.rb b/config/initializers/gitlab_config.rb
deleted file mode 100644
index c82b2edff..000000000
--- a/config/initializers/gitlab_config.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-Gitlab.configure do |config|
- # config.endpoint = 'http://192.168.41.130:3000/trustie/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
- # config.private_token = 'cK15gUDwvt8EEkzwQ_63' # user's private token, default: ENV['GITLAB_API_PRIVATE_TOKEN']
- config.endpoint = 'http://gitfast.trustie.net/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
- config.private_token = 'fPc_gBmEiSANve8TCfxW' # user's private token, default: ENV['GITLAB_API_PRIVATE_TOKEN']
- # Optional
- # config.user_agent = 'Custom User Agent' # user agent, default: 'Gitlab Ruby Gem [version]'
- # config.sudo = 'user' # username for sudo mode, default: nil
-end
From 31c57b78bf7ab670efe52348108d032c585e56ee Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Thu, 17 Dec 2015 11:28:28 +0800
Subject: [PATCH 047/105] =?UTF-8?q?issue=E7=9A=84=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=9B=B4=E6=94=B9issue=E7=9A=84=E7=B1=BB?=
=?UTF-8?q?=E5=9E=8B=EF=BC=8C=E9=82=A3=E4=B9=88=E5=B0=B1=E4=BC=9A=E6=9C=89?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82=E9=9C=80=E8=A6=81=E9=87=8D=E6=96=B0?=
=?UTF-8?q?=E6=96=B0=E5=BB=BAeditor?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/issues/show.html.erb | 56 ++++++++++---------
.../app/views/issues/update_form.js.erb | 12 ++++
2 files changed, 41 insertions(+), 27 deletions(-)
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 4c56a0f05..a1450fc03 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -8,11 +8,11 @@
});