From 8a53978d2397644004b9472b61fc846e2d0e254d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 18 Dec 2015 14:51:33 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=BE=97=E5=88=86?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/project_score_helper.rb | 4 +++- app/views/repositories/show.html.erb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/project_score_helper.rb b/app/helpers/project_score_helper.rb index 256e35a7a..4049cdd76 100644 --- a/app/helpers/project_score_helper.rb +++ b/app/helpers/project_score_helper.rb @@ -22,7 +22,9 @@ module ProjectScoreHelper #代码提交数量 def changesets_num project - # commit_count(project) + # g = Gitlab.client + # project.gpid.nil? ? 0 : g.commits_total_count(project.gpid) + # commits_total_count(project.gpid) project.changesets.count end diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index b385dff1f..da7f79dd8 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -27,7 +27,7 @@
ZIP
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %> <% if User.current.id != @project.user_id %> -
<%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :confirm=>"确认要fork该项目吗?" %> +
<%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> <%= @project.forked_count.to_i %>
<% end %> From c6e7c8860da7784e3d894a1cc4ba12fd8a78a5dc Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 15:45:23 +0800 Subject: [PATCH 02/11] dd --- db/schema.rb | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 9c7702aa2..eac8a81db 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -558,23 +558,26 @@ ActiveRecord::Schema.define(:version => 20151218022014) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" - create_table "dts", :force => true do |t| - t.string "IPLineCode" - t.string "Description" - t.string "Num" - t.string "Variable" - t.string "TraceInfo" - t.string "Method" + 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 "IPLine" - t.string "Review" - t.string "Category" - t.string "Defect" - t.string "PreConditions" - t.string "StartLine" + 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 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false end create_table "editor_of_documents", :force => true do |t| @@ -923,16 +926,6 @@ ActiveRecord::Schema.define(:version => 20151218022014) 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 a080306f756e06794f5d76c16b6f71d2dcf6b6fb Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 18 Dec 2015 16:05:39 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=B8=AD=EF=BC=8C=E7=82=B9=E5=87=BB=E6=8C=89?= =?UTF-8?q?=E9=92=AE=EF=BC=8C=E6=8F=90=E4=BA=A4=E5=A4=9A=E6=AC=A1=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_journalsformessage.html.erb | 5 +++-- public/javascripts/init_activity_KindEditor.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index 27549f6d9..006743cd7 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -114,7 +114,7 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %>
- <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id},:method => "post", :remote => true) do |f|%> + <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id}, :method => "post", :remote => true) do |f|%> <%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %> @@ -132,4 +132,5 @@
-
\ No newline at end of file + + diff --git a/public/javascripts/init_activity_KindEditor.js b/public/javascripts/init_activity_KindEditor.js index b0e4b9c59..4c63d1695 100644 --- a/public/javascripts/init_activity_KindEditor.js +++ b/public/javascripts/init_activity_KindEditor.js @@ -153,7 +153,7 @@ function init_activity_KindEditor_data(id){ params.cancel_btn.click(function () { nh_reset_form(params); }); - params.submit_btn.click(function () { + params.submit_btn.one('click',function () { params.form.submit(); }); params.textarea.data('init', 1); From 7ce8e330c3e15a1fc5baf059a774f7df0f364889 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Dec 2015 16:21:27 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=95=99=E8=A8=80?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_course_journalsformessage.html.erb | 41 +++---------------- 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index 27549f6d9..69f966979 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -26,7 +26,7 @@
- <% count=course.journals_for_messages.where('m_parent_id IS NULL').count %> + <% count = fetch_user_leaveWord_reply(activity).count %>
@@ -47,7 +47,7 @@ <% if count > 0 %>
    - <% course.journals_for_messages.where('m_parent_id IS NULL').reorder("created_on desc").each do |comment| %> + <% fetch_user_leaveWord_reply(activity).each do |comment| unless fetch_user_leaveWord_reply(activity).nil? %> -
    -
    - <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.user_id), :alt => "用户头像" %> -
    -
    -
    - <% if reply.try(:user).try(:realname) == ' ' %> - <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> - <% else %> - <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> - <% end %> - <%= l(:label_reply_to)%> - <% if comment.try(:user).try(:realname) == ' ' %> - <%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14 ml10" %> - <% else %> - <%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14 ml10" %> - <% end %> - <%= format_time reply.created_on %> -
    -
    - <%= reply.notes.html_safe %>
    -
    -
    -
    -
    - <% end %> - <% end %> + <%= comment.notes.html_safe %> +
+ <% end %> <% end %>
From c38191eb424e722182bda8eeb24a28aa3977004a Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 16:25:14 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=9B=9E=E5=A4=8Dat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 115a70e7a..fd6171f18 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -18,7 +18,7 @@ } $(function () { - init_activity_KindEditor_data(<%= issue.id%>, null, "87%"); + init_activity_KindEditor_data(<%= issue.id%>, null, "87%", "<%= issue.class.name %>"); showNormalImage('activity_description_<%= issue.id %>'); if ($("#intro_content_<%= issue.id %>").height() > 360) { $("#intro_content_show_<%= issue.id %>").show(); From 71a0802a498eddab43add025663b40fa4458ae09 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 16:46:35 +0800 Subject: [PATCH 06/11] =?UTF-8?q?at=E5=90=8E=E5=AD=97=E4=BD=93=E6=94=B9?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/kindeditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 6f8e489f8..bd7c7ec35 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -260,7 +260,7 @@ K.options = { bodyClass : 'ke-content', indentChar : '\t', cssPath : K.basePath +'plugins/code/previewcode.css', - cssData : '', + cssData : 'font{color:#7d7d7d;}', minWidth : 650, minHeight : 100, minChangeSize : 1, From d0e139650f9a60846c0b93925edd564e0cbdaf33 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Dec 2015 16:50:44 +0800 Subject: [PATCH 07/11] =?UTF-8?q?issue=E5=9B=9E=E5=A4=8D=E7=9A=84at?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/show.html.erb | 4 ++-- public/javascripts/create_kindeditor.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index c832c884f..4af757c77 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,9 +1,9 @@ <%= content_for(:header_tags) do %> - <%= import_ke(enable_at: false) %> + <%= import_ke(enable_at: true) %> <%= javascript_include_tag 'create_kindeditor'%> <% end %>