From 8b5879217ddff9eb8ecf56262ff2a93694adb9ef Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 7 Nov 2016 13:28:50 +0800 Subject: [PATCH 01/96] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AEissue=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 2 +- app/views/issues/_form.html.erb | 53 ++++++++++++++----------- app/views/projects/_act_issues.html.erb | 6 +-- public/stylesheets/css/common.css | 3 +- 4 files changed, 36 insertions(+), 28 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f59fba784..4909efdca 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -234,8 +234,8 @@ class IssuesController < ApplicationController @issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads])) # 给该issue在它所在的项目中所有的issues中所在的位置给一个序号 @issue.project_issues_index = @issue.project.issues.last.nil? ? 1 : @issue.project.issues.last.project_issues_index + 1 + @issue.fixed_version_id = nil if @issue.fixed_version_id == 0 if @issue.save - senduser = User.find(params[:issue][:assigned_to_id]) issue_id = @issue.id issue_title = params[:issue][:subject] diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index f97804806..649965b97 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -1,14 +1,5 @@ <%= labelled_fields_for :issue, @issue do |f| %> <% end %> @@ -153,4 +157,7 @@ function issue_end_date_change() { $('#option_end_date_tips').html("已选择结束日期"); } + // 里程碑添加默认选项 + $("#issue_fixed_version_id option[value='']").remove(); + $('#issue_fixed_version_id').prepend("") diff --git a/app/views/projects/_act_issues.html.erb b/app/views/projects/_act_issues.html.erb index e7b9761ff..caa6d7bc4 100644 --- a/app/views/projects/_act_issues.html.erb +++ b/app/views/projects/_act_issues.html.erb @@ -47,10 +47,10 @@
指派给   <% unless activity.assigned_to_id.nil? %> - <% if activity.try(:assigned_to).try(:realname) == ' ' %> - <%= link_to activity.try(:assigned_to) ? activity.try(:assigned_to) : "未指派", user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> + <% if activity.try(:assigned_to) == ' ' %> + <%= link_to "未指派", "", :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:assigned_to) ? activity.try(:assigned_to).try(:realname) : "未指派", user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:assigned_to).try(:realname) ? activity.try(:assigned_to).try(:realname) : activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> <% end %> <% end %>
diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index 21cde8821..770bac7ad 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -122,6 +122,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .ml36{ margin-left:36px; } .ml38{ margin-left:38px;} .ml40{ margin-left:40px;} +.ml41{ margin-left:41px;} .ml45{ margin-left:45px;} .ml48{ margin-left:48px;} .ml50{ margin-left: 50px;} @@ -232,7 +233,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .w80{ width:80px;} .w90{ width:90px;} .w100 {width: 100px;} -.w110{width:110px;} +.w110{width:110px !important;} .w108 {width:108px;} .w125{width:125px;} .w128{ width:128px;} From 6d6c2681388c83ed49336635b01761f0a5b2e06e Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 7 Nov 2016 13:52:16 +0800 Subject: [PATCH 02/96] =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E6=8E=92?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/redmine/helpers/gantt.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 32be436bd..94aa329e2 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -137,7 +137,7 @@ module Redmine def issues @issues ||= @query.issues( :include => [:assigned_to, :tracker, :priority, :category, :fixed_version], - :order => "#{Project.table_name}.lft ASC, #{Issue.table_name}.id ASC", + :order => "#{Issue.table_name}.updated_on DESC", :limit => @max_rows ) end From 5ec5bc9a576950d3f0f3f67710783206b9ce4165 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 7 Nov 2016 14:25:41 +0800 Subject: [PATCH 03/96] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A0=E5=85=A5QQ?= =?UTF-8?q?=E7=BE=A4=E7=9A=84=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_forbidden_new_feedback.html.erb | 2 +- app/views/layouts/_new_feedback.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_forbidden_new_feedback.html.erb b/app/views/layouts/_forbidden_new_feedback.html.erb index b0db701ca..5a7bf2f7d 100644 --- a/app/views/layouts/_forbidden_new_feedback.html.erb +++ b/app/views/layouts/_forbidden_new_feedback.html.erb @@ -31,7 +31,7 @@ - +

加入QQ群

diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index a05a3892a..6d6201aae 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -30,7 +30,7 @@ - +

加入QQ群

From 3d2d526149b60edb4fdc49bf3fb1d56ec2efc00e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 7 Nov 2016 15:21:00 +0800 Subject: [PATCH 04/96] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=92=8C=E7=BC=96?= =?UTF-8?q?=E8=BE=91ISSUE=EF=BC=8C=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=98=BE=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/views/attachments/_form.html.erb | 7 ++++--- app/views/files/_tag_yun.html.erb | 2 +- public/javascripts/attachments.js | 11 ++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index f302190b2..12ca4d94c 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -7,14 +7,15 @@ <% if defined?(container) && container && container.saved_attachments %> <% container.attachments.each_with_index do |attachment, i| %> - <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly', :readonly => 'readonly', :style=>'border:none;') %> + <%#= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden', :readonly => 'readonly', :style=>'border:none;max-width:460px;width:initial;') %> + <%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %> <%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %> <%= if attachment.id.nil? #待补充代码 else - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload', :style => 'vertical-align:top;') end %> <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> @@ -31,7 +32,7 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> - <%= button_tag "上传附件", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %> + <%= button_tag "上传附件", :id => "upload_attachments", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %> <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/files/_tag_yun.html.erb b/app/views/files/_tag_yun.html.erb index f9c6c1666..e1a7c6e60 100644 --- a/app/views/files/_tag_yun.html.erb +++ b/app/views/files/_tag_yun.html.erb @@ -10,7 +10,7 @@ <%= k%> x<%= v%> <% else%> - + <%= k%> x<%= v%> diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index be5bb0654..f504cb6c8 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -101,13 +101,13 @@ function addFile(inputEl, file, eagerUpload,btnId) { }); fileSpan.append( - $('', { + $('', { 'type': 'text', - 'class': 'upload_filename readonly', + 'class': 'upload_filename readonly hidden', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly', - 'style': 'border:none;' - }).val(file.name), + 'style': 'border:none;max-width:460px;display:inline-block;width:initial;' + }).text(file.name), // $('', { // 'type': 'text', // 'class': 'description', @@ -127,7 +127,8 @@ function addFile(inputEl, file, eagerUpload,btnId) { // }).toggle(!eagerUpload), $(' ').attr({ 'href': "#", - 'class': 'remove-upload' + 'class': 'remove-upload', + 'style': 'vertical-align:top;' }).click(function() { if (confirm($(inputEl).data('areYouSure'))) { removeFile(); From cb975d1cb294734af0b59e0911a695c49ff80429 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 7 Nov 2016 15:35:02 +0800 Subject: [PATCH 05/96] =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=B8=80=E7=BA=A7?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E7=82=B9=E5=87=BBBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_org_left_subfield_list.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb index 1d245b809..21e9242d0 100644 --- a/app/views/organizations/_org_left_subfield_list.html.erb +++ b/app/views/organizations/_org_left_subfield_list.html.erb @@ -103,8 +103,8 @@ <%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> <% end %> <% else %> - - <%= field.name %> + <%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %> + <% end %> <% if User.current.logged? and User.current.admin_of_org?(organization) %> <%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %> From e57e4392107652dee54499c477380a4a39276421 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 7 Nov 2016 17:08:24 +0800 Subject: [PATCH 06/96] =?UTF-8?q?=E6=96=B0=E5=BB=BA=EF=BC=8C=E7=BC=96?= =?UTF-8?q?=E8=BE=91issue=E6=97=B6=EF=BC=8C=E4=B8=8A=E4=BC=A0=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E5=B0=BD=E8=AF=BE=E7=A8=8B=E5=B1=95=E7=A4=BA=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 6 +++--- public/javascripts/attachments.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 12ca4d94c..62ad9d02a 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -7,15 +7,15 @@ <% if defined?(container) && container && container.saved_attachments %> <% container.attachments.each_with_index do |attachment, i| %> - <%#= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden', :readonly => 'readonly', :style=>'border:none;max-width:460px;width:initial;') %> - + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden', :readonly => 'readonly', :style=>'border:none; width:460px;') %> + <%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %> <%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %> <%= if attachment.id.nil? #待补充代码 else - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload', :style => 'vertical-align:top;') + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') end %> <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index f504cb6c8..7c3e513f7 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -101,13 +101,13 @@ function addFile(inputEl, file, eagerUpload,btnId) { }); fileSpan.append( - $('', { + $('', { 'type': 'text', 'class': 'upload_filename readonly hidden', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly', - 'style': 'border:none;max-width:460px;display:inline-block;width:initial;' - }).text(file.name), + 'style': 'border:none; width:464px;' + }).val(file.name), // $('', { // 'type': 'text', // 'class': 'description', From ce3bfee27c9924e2941a8eaa923e777f6ab04396 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 7 Nov 2016 17:18:00 +0800 Subject: [PATCH 07/96] =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/redmine/helpers/gantt.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 94aa329e2..235f8d9e0 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -137,7 +137,7 @@ module Redmine def issues @issues ||= @query.issues( :include => [:assigned_to, :tracker, :priority, :category, :fixed_version], - :order => "#{Issue.table_name}.updated_on DESC", + :order => "#{Project.table_name}.lft DESC, #{Issue.table_name}.updated_on DESC", :limit => @max_rows ) end @@ -677,15 +677,16 @@ module Redmine # Sorts a collection of issues by start_date, due_date, id for gantt rendering def sort_issues!(issues) - issues.sort! { |a, b| gantt_issue_compare(a, b) } + # issues.sort! { |a, b| gantt_issue_compare(a, b) } + issues end # TODO: top level issues should be sorted by start date def gantt_issue_compare(x, y) if x.root_id == y.root_id - x.lft <=> y.lft + x.updated_on <=> y.updated_on else - x.root_id <=> y.root_id + x.updated_on <=> y.updated_on end end From bdf423bc81a4c1a854fdd1d3e02fbad87e247e19 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 8 Nov 2016 09:21:45 +0800 Subject: [PATCH 08/96] =?UTF-8?q?=E7=BC=96=E8=BE=91issue=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8A=E4=BC=A0=E7=9A=84=E9=99=84=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form.html.erb | 64 +------------------ .../attachments/_form_attachments.html.erb | 58 +++++++++++++++++ app/views/attachments/destroy.js.erb | 6 +- 3 files changed, 66 insertions(+), 62 deletions(-) create mode 100644 app/views/attachments/_form_attachments.html.erb diff --git a/app/views/attachments/_form.html.erb b/app/views/attachments/_form.html.erb index 62ad9d02a..f5b5692f3 100644 --- a/app/views/attachments/_form.html.erb +++ b/app/views/attachments/_form.html.erb @@ -2,64 +2,6 @@ input.is_public,input.is_public_checkbox{height:12px;} input.is_public_checkbox{margin-left:4px;margin-right:4px;} -
- -<% if defined?(container) && container && container.saved_attachments %> - <% container.attachments.each_with_index do |attachment, i| %> - - <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden', :readonly => 'readonly', :style=>'border:none; width:460px;') %> - - <%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %> - - <%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %> - <%= if attachment.id.nil? - #待补充代码 - else - link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') - end - %> - <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> - - <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> - -
- <% end %> - -<% end %> -
- <% project = project %> -
- - <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> - - <%= button_tag "上传附件", :id => "upload_attachments", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %> - <%= file_field_tag 'attachments[dummy][file]', - :id => '_file', - :class => 'file_selector', - :multiple => true, - :onchange => 'addInputFiles(this);', - :style => ie8? ? '' : 'display:none', - :data => { - :max_file_size => Setting.attachment_max_size.to_i.kilobytes, - :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), - :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, - :upload_path => uploads_path(:format => 'js', :project => project), - :description_placeholder => l(:label_optional_description), - :field_is_public => l(:field_is_public), - :are_you_sure => l(:text_are_you_sure), - :file_count => l(:label_file_count), - :lebel_file_uploding => l(:lebel_file_uploding), - :delete_all_files => l(:text_are_you_sure_all) - } %> - - <%= l(:label_no_file_uploaded) %> - - (<%= l(:label_max_size) %>: - <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) - - - <% content_for :header_tags do %> - <%= javascript_include_tag 'attachments' %> - <% end %> -
- +
+ <%= render :partial=>'attachments/form_attachments', :locals => { :container => container }%> +
\ No newline at end of file diff --git a/app/views/attachments/_form_attachments.html.erb b/app/views/attachments/_form_attachments.html.erb new file mode 100644 index 000000000..db4ba070c --- /dev/null +++ b/app/views/attachments/_form_attachments.html.erb @@ -0,0 +1,58 @@ + +<% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, i| %> + + <%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly hidden', :readonly => 'readonly', :style=>'border:none; width:460px;') %> + + <%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style => "display: inline-block;") %> + + <%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public, attachment.is_public == 1 ? true : false, :class => 'is_public') %> + <%= if attachment.id.nil? + #待补充代码 + else + link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') + end + %> + <%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %> + + <%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %> + +
+ <% end %> + +<% end %> +
+<% project = project %> +
+ + <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> + + <%= button_tag "上传附件", :id => "upload_attachments", :type=>"button", :onclick=>"$('#_file').click();",:onmouseover => 'this.focus()',:class => 'sub_btn' %> + <%= file_field_tag 'attachments[dummy][file]', + :id => '_file', + :class => 'file_selector', + :multiple => true, + :onchange => 'addInputFiles(this);', + :style => ie8? ? '' : 'display:none', + :data => { + :max_file_size => Setting.attachment_max_size.to_i.kilobytes, + :max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), + :max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, + :upload_path => uploads_path(:format => 'js', :project => project), + :description_placeholder => l(:label_optional_description), + :field_is_public => l(:field_is_public), + :are_you_sure => l(:text_are_you_sure), + :file_count => l(:label_file_count), + :lebel_file_uploding => l(:lebel_file_uploding), + :delete_all_files => l(:text_are_you_sure_all) + } %> + + <%= l(:label_no_file_uploaded) %> + + (<%= l(:label_max_size) %>: + <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) + + +<% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> +<% end %> \ No newline at end of file diff --git a/app/views/attachments/destroy.js.erb b/app/views/attachments/destroy.js.erb index 97d3fd3ec..8bb2ab2cc 100644 --- a/app/views/attachments/destroy.js.erb +++ b/app/views/attachments/destroy.js.erb @@ -12,6 +12,10 @@ $("#attachment_history_popub").html('<%= escape_javascript( render :partial => ' $("#attachment_history_popub").html('<%= escape_javascript( render :partial => 'files/attachment_history_popub') %>'); <% end %> +<% if params[:attachment_id] %> +$("#issue_upload_attachments").html('<%= escape_javascript( render :partial => 'attachments/form_attachments', :locals => { :container => @attachment.container }) %>'); +<% end %> + <% if @is_destroy%> $("#attachment_<%= @attachment.id%>").remove(); if(document.getElementById("revise_attachment_div_<%= @attachment.id%>")) { @@ -49,4 +53,4 @@ $("#attachment_history_popub").html('<%= escape_javascript( render :partial => ' $("#choose_revise_attach").attr("onclick","_file.click();"); } //modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 end -<% end%> \ No newline at end of file +<% end%> From 4f7531b0c42faff498bb76ce65f2ac28c0aadefb Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Tue, 8 Nov 2016 09:28:32 +0800 Subject: [PATCH 09/96] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BE=A4=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 4 ++-- app/views/layouts/_forbidden_new_feedback.html.erb | 2 +- app/views/layouts/_new_feedback.html.erb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index 7cc480317..a082d72ff 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -13,7 +13,7 @@ class WechatsController < ActionController::Base # elsif join_project_request(request) # sendBindProject(request, {invite_code: content}) # else - request.reply.text "您的意见已收到,非常感谢~ \n更多问题可以通过以下方式联系我们:\n官方QQ群:173184401\n我们会认真聆听您的意见和建议。" + request.reply.text "您的意见已收到,非常感谢~ \n更多问题可以通过以下方式联系我们:\n官方QQ群:373967360\n我们会认真聆听您的意见和建议。" # end end @@ -137,7 +137,7 @@ class WechatsController < ActionController::Base on :fallback, respond: 'fallback message' on :click, with: 'FEEDBACK' do |request, key| - request.reply.text "如有问题反馈,请您:\n1、直接切换至输入框,发微信给我们。\n2、加入QQ群:173184401,直接互动。\n\n如您有合作事宜洽谈,请联系:\n王林春 老师\n手机:13467631747\nQQ:494496321" + request.reply.text "如有问题反馈,请您:\n1、直接切换至输入框,发微信给我们。\n2、加入QQ群:373967360,直接互动。\n\n如您有合作事宜洽谈,请联系:\n王林春 老师\n手机:13467631747\nQQ:494496321" end on :click, with: 'MY_NEWS' do |request, key| diff --git a/app/views/layouts/_forbidden_new_feedback.html.erb b/app/views/layouts/_forbidden_new_feedback.html.erb index 5a7bf2f7d..a9bec48ac 100644 --- a/app/views/layouts/_forbidden_new_feedback.html.erb +++ b/app/views/layouts/_forbidden_new_feedback.html.erb @@ -31,7 +31,7 @@ - +

加入QQ群

diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 6d6201aae..0fd82658b 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -30,7 +30,7 @@ - +

加入QQ群

From a3dfd03e81fc4ec6db991bc2de92c429c37f3978 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 10:23:02 +0800 Subject: [PATCH 10/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=A1=B6=E7=AB=AF?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E6=90=AD=E5=BB=BA=E5=8F=8A=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 6 +++++- app/views/projects/_applied_status.html.erb | 14 ++++++++------ app/views/projects/member_forked.html.erb | 3 +++ config/routes.rb | 1 + 4 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 app/views/projects/member_forked.html.erb diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index b1007ac8b..059e55e0a 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -533,7 +533,7 @@ class ProjectsController < ApplicationController @project.update_attribute(:is_public, 1) end end - # by young + # include CoursesHelper def member # 消息"同意加入项目" @@ -597,6 +597,10 @@ class ProjectsController < ApplicationController end + def member_forked + @members_forked = User.find_by_sql("SELECT u.* FROM `projects` p,`users` u where p.user_id = u.id and p.forked_from_project_id = #{@project.id} ;") + end + def update_message_status(user, project) # 更新加入项目消息 project__messages = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'JoinProject', 'RemoveFromProject') and user_id =? and project_id =? ", user, project) diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 401f077a6..3193e8e95 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -16,16 +16,18 @@ <% end %> <% else %> - - <% my_stores = Member.where(:project_id => @project.id, :is_collect => 1).count %> -
  • <%= store_project_link(@project.id, User.current.id) %> - <%= link_to my_stores, enshrine_project_path(@project), :class => "pro_new_topbtn fl" %> -
  • <% if User.current.id != @project.user_id %> - <%= exit_project_link(@project) %> + <%= "已加入" %> <%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %> <% end %> <% end %> + +<% if @project.gpid && User.current.id != @project.user_id %> +
    <%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> + <%= link_to @project.forked_count.to_i, member_forked_project_path(@project) %> +
    +<% end %> + diff --git a/app/views/projects/member_forked.html.erb b/app/views/projects/member_forked.html.erb new file mode 100644 index 000000000..45f783f69 --- /dev/null +++ b/app/views/projects/member_forked.html.erb @@ -0,0 +1,3 @@ +<% @members_forked.each do |id| %> + <% %> +<% end %> \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index e5a122f19..c2b4e92fb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -775,6 +775,7 @@ RedmineApp::Application.routes.draw do get 'member', :to => 'projects#member', :as => 'member' match 'store_mine', :to => 'projects#store_mine', :as => 'store_mine' match 'enshrine', :to => 'projects#enshrine', :as => 'enshrine' + match 'member_forked', :to => 'projects#member_forked', :as => 'member_forked' get 'file', :action => 'file', :as => 'file' get 'statistics', :action => 'statistics', :as => 'statistics' get 'repository_tree_changes', :action => 'repository_tree_changes', :as => 'repository_tree_changes' From 721a916a20fb2c3ef0183f68c3e1bcd594398e0c Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 10:44:57 +0800 Subject: [PATCH 11/96] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/show.html.erb | 35 ++++++++++++---------------- public/stylesheets/repository.css | 2 +- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 0b56ce184..8c3a26c94 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -2,20 +2,6 @@

    <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

    - <% unless @entries.nil? %> - ZIP下载 - <% if User.current.member_of?(@project) && @project.is_public? %> - <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> - <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %> - <% else %> - <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %> - <% end %> - <% end %> - <% end %> - - <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> - <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %> - <% end %>
    <% if @entries.nil? %> @@ -38,15 +24,24 @@
    克隆网址:
    + + <% unless @entries.nil? %> + ZIP下载 + <% if User.current.member_of?(@project) && @project.is_public? %> + <% if quality_analysis(User.current.try(:login), @repository.id).nil? %> + <%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %> + <% else %> + <%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %> + <% end %> + <% end %> + <% end %> + <% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %> + <%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %> + <% end %> +
    <%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
    - - <% if User.current.id != @project.user_id %> -
    <%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> - <%= @project.forked_count.to_i %> -
    - <% end %>
    diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index 54fc132ff..7e41331cb 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -289,5 +289,5 @@ li.commit .commit-row-info .committed_ago { } .rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;} a.btn_zipdown{ display:block; height:25px; width:80px; text-align: center; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE); - color: #7f7f7f; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-top: 7px; margin-right: 5px;} + color: #7f7f7f; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-right: 5px;} a:hover.btn_zipdown{color:#269ac9;} \ No newline at end of file From 83f2270edc80c90003387670d141e93c5ca1586a Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 12:19:21 +0800 Subject: [PATCH 12/96] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E7=9A=84=E7=9B=AE=E5=BD=95=E9=80=89=E6=8B=A9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_breadcrumbs.html.erb | 45 +++++++++++++++----- app/views/repositories/show.html.erb | 15 +++++-- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb index 2c675cc1e..53e011ed5 100644 --- a/app/views/repositories/_breadcrumbs.html.erb +++ b/app/views/repositories/_breadcrumbs.html.erb @@ -1,13 +1,36 @@ -
    - <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> - / - <%= link_to @repository.identifier.present? ? h(@repository.identifier) : 'root', - {:action => 'show', :id => @project, - :repository_id => @repository.identifier_param, - :path => nil, :rev => @rev }, - :class => "repository-title-dec" - %> - -
    +<% unless @path.blank? %> + <%= link_to "#{@repository.identifier.present? ? h(@repository.identifier) : 'root'}", ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "c_blue f14 fb" %> +<%#= link_to(@repository.identifier.present? ? h(@repository.identifier) : 'root', + :action => 'show', :id => @project, + :repository_id => @repository.identifier_param, + :path => nil, :rev => @rev) +%> + <% + dirs = path.split('/') + if 'file' == kind + filename = dirs.pop + end + link_path = '' + dirs.each do |dir| + next if dir.blank? + link_path << '/' unless link_path.empty? + link_path << "#{dir}" + %> + / <%= link_to h(dir), {:action => 'show', :id => @project, :repository_id => @repository.identifier_param, + :path => to_path_param(link_path), :rev => @rev}, :class => "f14 fb" %> + <% end %> + <% if filename %> + / <%= link_to h(filename), + {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, + :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev}, :class => "f14 fb" %> + <% end %> + <% + # @rev is revsion or Git and Mercurial branch or tag. + # For Mercurial *tip*, @rev and @changeset are nil. + rev_text = @changeset.nil? ? @rev : format_revision(@changeset) + %> +<%#= "@ #{h rev_text}" unless rev_text.blank? %> +<% end %> + <% html_title(with_leading_slash(path)) -%> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 8c3a26c94..4e9638134 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,7 +1,11 @@ <%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
    -

    <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

    +

    +
    + <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> / <%= link_to @project.name, project_path(@project), :class => "repository-title-dec" %> +

    +
    <% if @entries.nil? %> @@ -43,8 +47,12 @@ <%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
    - -
    + +
    + <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> +
    +
    +
    <% if @changesets_latest_coimmit %> <% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %> <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> @@ -67,6 +75,7 @@ <%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %>
    +
    <% end %> <% if !@entries.nil? && authorize_for('repositories', 'browse') %> From b5f035d286ba7be10dbd96eabba826a6ee229293 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 15:21:12 +0800 Subject: [PATCH 13/96] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=9B=9E=E9=80=80=E5=8A=9F=E8=83=BD=EF=BC=8C=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=8A=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 3 +++ .../repositories/_latest_commit.html.erb | 25 +++++++++++++++++++ .../repositories/_link_to_functions.html.erb | 14 ++++------- app/views/repositories/entry.html.erb | 13 +++++----- app/views/repositories/show.html.erb | 24 +----------------- public/stylesheets/css/common.css | 1 + public/stylesheets/css/project.css | 3 --- public/stylesheets/repository.css | 2 +- public/stylesheets/scm.css | 2 +- 9 files changed, 44 insertions(+), 43 deletions(-) create mode 100644 app/views/repositories/_latest_commit.html.erb diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index bd6c67f58..891b533d6 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -479,6 +479,9 @@ update def entry entry_and_raw(false) @content = @repository.cat(@path, @rev) + @changesets_latest_coimmit = @g.commit(@project.gpid, @entry.try(:lastrev)) + # 总的提交数 + @changesets_all_count = @g.user_static(@project.gpid, :rev => @rev).count if is_entry_text_data?(@content, @path) render :layout => 'base_projects' end diff --git a/app/views/repositories/_latest_commit.html.erb b/app/views/repositories/_latest_commit.html.erb new file mode 100644 index 000000000..e70e1d763 --- /dev/null +++ b/app/views/repositories/_latest_commit.html.erb @@ -0,0 +1,25 @@ +
    + <% if @changesets_latest_coimmit %> + <% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %> + <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> + +
    提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:
    +
    <%= @changesets_latest_coimmit.message %>
    +
    + <% else %> + +
    提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
    +
    <%= @changesets_latest_coimmit.message %>
    +
    + <%end%> + <% end %> + <% if @entry && @entry.kind == 'file' %> + <%= render :partial => 'link_to_functions' %> + <% else %> + <%= @repository.branches.count %> 个分支 + <% end %> + + <%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %> + + +
    \ No newline at end of file diff --git a/app/views/repositories/_link_to_functions.html.erb b/app/views/repositories/_link_to_functions.html.erb index d7ce47783..0e777217f 100644 --- a/app/views/repositories/_link_to_functions.html.erb +++ b/app/views/repositories/_link_to_functions.html.erb @@ -1,10 +1,8 @@ <% if @entry && @entry.kind == 'file' %> - -

    -<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | -<% if @repository.supports_cat? %> - <%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | -<% end %> +<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr mr5"%> +<%# if @repository.supports_cat? %> + <%#= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr" %> +<%# end %> <%# if @repository.supports_annotate? %> <%#= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> <%# end %> @@ -12,8 +10,6 @@ {:action => 'raw', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), - :rev => @rev}) if @repository.supports_cat? %> + :rev => @rev}, :class => "fr mr5") if @repository.supports_cat? %> <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> -

    - <% end %> diff --git a/app/views/repositories/entry.html.erb b/app/views/repositories/entry.html.erb index d463f91b3..14cd1c3e3 100644 --- a/app/views/repositories/entry.html.erb +++ b/app/views/repositories/entry.html.erb @@ -1,14 +1,15 @@ <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
    -
    +
    <%= render :partial => 'navigation' %>
    - -

    <%= l(:label_revision_path) %> :<%= @path %>

    - - <%= render :partial => 'link_to_functions' %> - + +
    + <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %> +
    +
    + <%= render :partial => 'latest_commit' %> <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %> <% content_for :header_tags do %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 4e9638134..cf6ee0dc8 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -52,29 +52,7 @@ <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
    -
    - <% if @changesets_latest_coimmit %> - <% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %> - <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> - -
    提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:
    -
    <%= @changesets_latest_coimmit.message %>
    -
    - <% else %> - -
    提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
    -
    <%= @changesets_latest_coimmit.message %>
    -
    - <%end%> - <% end %> - - <%= @repository.branches.count %> 个分支 - - - - <%=link_to "#{choise_commit_count(@changesets_all_count, @g_project.commit_count.to_i)} 提交", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1 ,:commit_count =>"#{@changesets_all_count}"} %> - -
    + <%= render :partial => 'latest_commit' %>
    <% end %> diff --git a/public/stylesheets/css/common.css b/public/stylesheets/css/common.css index 223540d50..12fe8ff14 100644 --- a/public/stylesheets/css/common.css +++ b/public/stylesheets/css/common.css @@ -183,6 +183,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/ .mt-20 {margin-top:-20px;} .mt-10 {margin-top:-10px;} .mt-4 {margin-top:-4px;} +.mt-5 {margin-top:-5px;} .mt-2 {margin-top:-2px;} .mt0 {margin-top: 0px !important;} .mt1{margin-top: 1px;} diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index cb8e4efaf..09dced2ad 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -216,9 +216,6 @@ p.percent { float: right; white-space: nowrap; line-height: 1.4em; - padding-left: 10px; - padding-right: 10px; - padding-top: 5px; font-size: 0.9em; } diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index 7e41331cb..56ec46e39 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -211,7 +211,7 @@ .clone_btn {width:30px; height:21px; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; outline:none; float:left; background-image:linear-gradient(#FCFCFC, #EEE); text-align:center;} .vl_btn {height:21px; padding:0px 5px; vertical-align:middle; border:1px solid #dddddd; float:left; line-height:21px; background-image:linear-gradient(#FCFCFC, #EEE);} .vl_btn_2 {height:21px; padding:0px 5px; vertical-align:middle; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; float:left; line-height:21px;} -.recordBanner {width:100%; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;} +.recordBanner {width:99%; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;} .vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;} diff --git a/public/stylesheets/scm.css b/public/stylesheets/scm.css index 46761a46e..f9cb2e7c2 100644 --- a/public/stylesheets/scm.css +++ b/public/stylesheets/scm.css @@ -34,7 +34,7 @@ li.change .copied-from:before { content: " - "} #changes-legend { float: right; font-size: 0.8em; margin:0; margin-right: 10px; }/*by young*/ #changes-legend li { float: left; background-position: 5px 0; } -table.filecontent { border: 1px solid #e2e2e2; border-collapse: collapse; width:98%; background-color: #fafafa; } +table.filecontent { border: 1px solid #e2e2e2; border-collapse: collapse; width:99%; background-color: #fafafa; } table.filecontent tbody {font-family:"Liberation Mono", Courier, monospace; font-size:12px;} table.filecontent th { border: 1px solid #e2e2e2; background-color: #eee; } table.filecontent th.filename { background-color: #e4e4d4; text-align: left; padding:5px;} From c27faf862fd1e3105eef66d9c218514b17b7cb33 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 15:30:16 +0800 Subject: [PATCH 14/96] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E4=B8=AA=E6=96=87=E4=BB=B6=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=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 | 3 ++ app/views/repositories/_top.html.erb | 5 +++ app/views/repositories/changes.html.erb | 38 +++++++++++----------- app/views/repositories/show.html.erb | 6 +--- 4 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 app/views/repositories/_top.html.erb diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 891b533d6..b613cf489 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -477,6 +477,9 @@ update end def entry + # 顶部导航 + @project_menu_type = 5 + entry_and_raw(false) @content = @repository.cat(@path, @rev) @changesets_latest_coimmit = @g.commit(@project.gpid, @entry.try(:lastrev)) diff --git a/app/views/repositories/_top.html.erb b/app/views/repositories/_top.html.erb new file mode 100644 index 000000000..bc26ba2b0 --- /dev/null +++ b/app/views/repositories/_top.html.erb @@ -0,0 +1,5 @@ +

    +
    + <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> / <%= link_to @project.name, project_path(@project), :class => "repository-title-dec" %> +

    +
    \ No newline at end of file diff --git a/app/views/repositories/changes.html.erb b/app/views/repositories/changes.html.erb index 94abb04e5..de33f0469 100644 --- a/app/views/repositories/changes.html.erb +++ b/app/views/repositories/changes.html.erb @@ -1,26 +1,26 @@ <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
    -
    -

    <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

    -
    +
    + <%= render :partial => "top" %> +
    -
    - <%= render :partial => 'navigation' %> -
    -
    - - <%= render :partial => 'link_to_functions' %> - - <%= render_properties(@properties) %> - -
    - <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %> -
    +
    + <%= render :partial => 'navigation' %>
    +
    - <% content_for :header_tags do %> - <%= stylesheet_link_tag "scm" %> - <% end %> + <%#= render :partial => 'link_to_functions' %> - <% html_title(l(:label_change_plural)) -%> + <%= render_properties(@properties) %> + +
    + <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %> +
    +
    + + <% content_for :header_tags do %> + <%= stylesheet_link_tag "scm" %> + <% end %> + + <% html_title(l(:label_change_plural)) -%>
    \ No newline at end of file diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index cf6ee0dc8..282df48c3 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -1,11 +1,7 @@ <%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
    -

    -
    - <%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> / <%= link_to @project.name, project_path(@project), :class => "repository-title-dec" %> -

    -
    + <%= render :partial => "top" %>
    <% if @entries.nil? %> From 736c93fc13b771303dd675ae0250232456b0a4b5 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 15:45:32 +0800 Subject: [PATCH 15/96] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=94=B9=E5=8A=A8=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?403=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 2 +- app/views/repositories/commit_diff.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index b613cf489..47cc90ebc 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -40,7 +40,7 @@ class RepositoriesController < ApplicationController # before_filter :connect_gitlab, :only => [:quality_analysis, :commit_diff] before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue] - before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :project_archive, :quality_analysis] + before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :project_archive, :quality_analysis, :commit_diff] # 版本库新增权限 # before_filter :show_rep, :only => [:show, :stats, :revisions, :revision, :diff, :commit_diff ] accept_rss_auth :revisions diff --git a/app/views/repositories/commit_diff.html.erb b/app/views/repositories/commit_diff.html.erb index 915a5a818..cee017978 100644 --- a/app/views/repositories/commit_diff.html.erb +++ b/app/views/repositories/commit_diff.html.erb @@ -1,6 +1,6 @@
    -
    -

    <%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

    +
    + <%= render :partial => "top" %>
    From ac60940c34a2fbc1103c1109a1b989262a18a9ba Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 8 Nov 2016 16:18:59 +0800 Subject: [PATCH 16/96] =?UTF-8?q?1.=E9=A1=B9=E7=9B=AE=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 10 +++- app/controllers/repositories_controller.rb | 55 ++++++++++--------- app/views/projects/_applied_status.html.erb | 21 +++++-- app/views/projects/forked_pop.js.erb | 3 + app/views/repositories/forked_popbox.html.erb | 7 +++ config/routes.rb | 2 +- 6 files changed, 63 insertions(+), 35 deletions(-) create mode 100644 app/views/projects/forked_pop.js.erb create mode 100644 app/views/repositories/forked_popbox.html.erb diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 059e55e0a..107f2ff88 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -27,7 +27,7 @@ class ProjectsController < ApplicationController menu_item :feedback, :only => :feedback menu_item :share, :only => :share - before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_project] + before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_project, :forked_pop] before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course] before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches] before_filter :require_admin, :only => [ :copy, :unarchive, :destroy, :calendar] @@ -760,6 +760,13 @@ class ProjectsController < ApplicationController redirect_to admin_projects_url(:status => params[:status]) end + # 资源库fork弹框 + def forked_pop + respond_to do |format| + format.js + end + end + def close @project.close redirect_to project_url(@project) @@ -946,5 +953,4 @@ class ProjectsController < ApplicationController return projects end #gcmend - end diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index bd6c67f58..ee5194500 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -87,35 +87,38 @@ class RepositoriesController < ApplicationController end def forked - @project = Project.find(params[:id]) - @repository = Repository.where("project_id =? and type =?", @project.id, "Repository::Gitlab") - # 如果当前用户已经fork过该项目,不会新fork项目,则跳至已fork的项 - unless has_forked?(@project, User.current) - project = project_from_current_project(@project.id, User.current.id) - redirect_to project_path(project) - else - # 自己不能fork自己的项目 - if User.current.id == @project.user_id - flash[:notice] = l(:project_gitlab_fork_own) - redirect_to repository_url(@repository) - else - g = Gitlab.client - if User.current.gid.nil? - begin - g.sync_user(User.current) - ensure - logger.error "Synv user failed ==>#{User.current.id}" + respond_to do |format| + format.html{ + @project = Project.find(params[:id]) + @repository = Repository.where("project_id =? and type =?", @project.id, "Repository::Gitlab") + # 如果当前用户已经fork过该项目,不会新fork项目,则跳至已fork的项 + unless has_forked?(@project, User.current) + project = project_from_current_project(@project.id, User.current.id) + redirect_to project_path(project) + else + # 自己不能fork自己的项目 + if User.current.id == @project.user_id + flash[:notice] = l(:project_gitlab_fork_own) + redirect_to repository_url(@repository) + else + g = Gitlab.client + if User.current.gid.nil? + begin + g.sync_user(User.current) + ensure + logger.error "Synv user failed ==>#{User.current.id}" + end + end + gproject = g.fork(@project.gpid, User.current.gid) + if gproject + copy_project(@project, gproject) + forked_count = @project.forked_count.to_i + 1 + @project.update_attributes(:forked_count => forked_count) + end end end - gproject = g.fork(@project.gpid, User.current.gid) - if gproject - copy_project(@project, gproject) - forked_count = @project.forked_count.to_i + 1 - @project.update_attributes(:forked_count => forked_count) - end - end + } end - end # 一键ZIP下载 diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 3193e8e95..8c51cf1f6 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -18,16 +18,25 @@ <% else %> <% if User.current.id != @project.user_id %> - <%= "已加入" %> - <%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %> +
  • + 已加入 + <%= Member.where(:project_id => @project.id).count %> +
  • + <%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %> <% end %> <% end %> - <% if @project.gpid && User.current.id != @project.user_id %> -
    <%= link_to "".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> - <%= link_to @project.forked_count.to_i, member_forked_project_path(@project) %> -
    + +
  • + + <%= link_to "Fork", {:controller => 'projects', :action => 'forked_pop'}, + :class=>"pro_new_topbtn_left fl", :remote => true %> + <%= @project.forked_count.to_i %> +
  • <% end %> diff --git a/app/views/projects/forked_pop.js.erb b/app/views/projects/forked_pop.js.erb new file mode 100644 index 000000000..8a5705501 --- /dev/null +++ b/app/views/projects/forked_pop.js.erb @@ -0,0 +1,3 @@ +var htmlvalue = "<%= escape_javascript(render :partial => 'repositories/forked_popbox') %>"; +pop_box_new(htmlvalue,820,316); + diff --git a/app/views/repositories/forked_popbox.html.erb b/app/views/repositories/forked_popbox.html.erb new file mode 100644 index 000000000..9ed28d5e0 --- /dev/null +++ b/app/views/repositories/forked_popbox.html.erb @@ -0,0 +1,7 @@ +
    +
    +

    新建里程碑

    + +
    +
    +
    diff --git a/config/routes.rb b/config/routes.rb index c2b4e92fb..05dc9be4a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -795,6 +795,7 @@ RedmineApp::Application.routes.draw do post 'unarchive' post 'close' post 'reopen' + get 'forked_pop' get 'search_public_orgs_not_in_project' match 'copy', :via => [:get, :post] match 'set_public_or_private', :via => [:post] @@ -809,7 +810,6 @@ RedmineApp::Application.routes.draw do match '/file', :to => 'projects#file', :as => 'file', :via => :get match '/statistics', :to => 'projects#statistics', :as => 'statistics', :via => :get match '/watcherlist', :to=>'projects#watcherlist', :as => 'watcherlist', :via => :get #add by huang - resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do collection do get 'autocomplete' From 14f66e1e82ceabafbfb76d5add75fc8976e36e9f Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 16:20:07 +0800 Subject: [PATCH 17/96] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=BF=94=E5=9B=9E=E4=B8=8A=E4=B8=80=E7=BA=A7=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_dir_list.html.erb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/views/repositories/_dir_list.html.erb b/app/views/repositories/_dir_list.html.erb index 3c446aee0..9fe4c79b4 100644 --- a/app/views/repositories/_dir_list.html.erb +++ b/app/views/repositories/_dir_list.html.erb @@ -1,5 +1,18 @@
    + + + + + + + + <%= render :partial => 'dir_list_content' %> From 9a9250f6e1bd1da437fe80d429754fec1d03fe65 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 16:40:25 +0800 Subject: [PATCH 18/96] =?UTF-8?q?fork=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/forked_pop.js.erb | 2 +- app/views/repositories/_forked_popbox.html.erb | 1 + app/views/repositories/forked_popbox.html.erb | 7 ------- 3 files changed, 2 insertions(+), 8 deletions(-) create mode 100644 app/views/repositories/_forked_popbox.html.erb delete mode 100644 app/views/repositories/forked_popbox.html.erb diff --git a/app/views/projects/forked_pop.js.erb b/app/views/projects/forked_pop.js.erb index 8a5705501..4519ea386 100644 --- a/app/views/projects/forked_pop.js.erb +++ b/app/views/projects/forked_pop.js.erb @@ -1,3 +1,3 @@ var htmlvalue = "<%= escape_javascript(render :partial => 'repositories/forked_popbox') %>"; -pop_box_new(htmlvalue,820,316); +pop_box_new(htmlvalue,320,316); diff --git a/app/views/repositories/_forked_popbox.html.erb b/app/views/repositories/_forked_popbox.html.erb new file mode 100644 index 000000000..ed4df3c90 --- /dev/null +++ b/app/views/repositories/_forked_popbox.html.erb @@ -0,0 +1 @@ +666 \ No newline at end of file diff --git a/app/views/repositories/forked_popbox.html.erb b/app/views/repositories/forked_popbox.html.erb deleted file mode 100644 index 9ed28d5e0..000000000 --- a/app/views/repositories/forked_popbox.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -
    -
    -

    新建里程碑

    - -
    -
    -
    From 2122a06608fc5c7d7e2e7fea7fc9f31efb29630a Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 17:12:35 +0800 Subject: [PATCH 19/96] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E5=A4=A7?= =?UTF-8?q?=E5=86=99=E8=BD=AC=E5=B0=8F=E5=86=99=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 146f49219..b12219f8a 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -265,6 +265,7 @@ update end @repository.project = @project @repository.type = 'Repository::Gitlab' + @repository.identifier = @repository.identifier.downcase @repository.url = @repository.identifier if request.post? && @repository.save s = Trustie::Gitlab::Sync.new From a8575c3476de09a280cafab16f2bca44b57f9907 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 8 Nov 2016 17:31:39 +0800 Subject: [PATCH 20/96] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=20=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=20=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=98=BE=E7=A4=BA=E5=8F=8A=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repositories/_link_to_functions.html.erb | 30 ++++++++++++------- app/views/repositories/changes.html.erb | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/views/repositories/_link_to_functions.html.erb b/app/views/repositories/_link_to_functions.html.erb index 0e777217f..e1fc50330 100644 --- a/app/views/repositories/_link_to_functions.html.erb +++ b/app/views/repositories/_link_to_functions.html.erb @@ -1,15 +1,25 @@ <% if @entry && @entry.kind == 'file' %> -<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr mr5"%> -<%# if @repository.supports_cat? %> - <%#= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr" %> -<%# end %> + <% if action_name != 'entry' %> + <%= link_to l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr mr5"%> + <% else %> + <%= l(:label_history) %> + <% end %> + + <% if @repository.supports_cat? %> + <% if action_name != 'entry' %> + <%= link_to l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }, :class =>"fr mr5" %> + <% else %> + <%= l(:button_view) %> + <% end %> + + <% end %> <%# if @repository.supports_annotate? %> <%#= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> <%# end %> -<%= link_to(l(:button_download), - {:action => 'raw', :id => @project, - :repository_id => @repository.identifier_param, - :path => to_path_param(@path), - :rev => @rev}, :class => "fr mr5") if @repository.supports_cat? %> -<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> + <%= link_to(l(:button_download), + {:action => 'raw', :id => @project, + :repository_id => @repository.identifier_param, + :path => to_path_param(@path), + :rev => @rev}, :class => "fr mr5") if @repository.supports_cat? %> + <%= "(#{number_to_human_size(@entry.size)})" if @entry.size %> <% end %> diff --git a/app/views/repositories/changes.html.erb b/app/views/repositories/changes.html.erb index de33f0469..f634a0285 100644 --- a/app/views/repositories/changes.html.erb +++ b/app/views/repositories/changes.html.erb @@ -9,7 +9,7 @@
    - <%#= render :partial => 'link_to_functions' %> + <%= render :partial => 'link_to_functions' %> <%= render_properties(@properties) %> From c1cf633d2c58d4648561fc4b23bd4547ffe06832 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 9 Nov 2016 10:01:56 +0800 Subject: [PATCH 21/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/common/_file.html.erb | 2 +- app/views/projects/_applied_status.html.erb | 2 +- app/views/repositories/_dir_list.html.erb | 8 ++++---- public/stylesheets/repository.css | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/common/_file.html.erb b/app/views/common/_file.html.erb index 8818d8ac0..7aafff19a 100644 --- a/app/views/common/_file.html.erb +++ b/app/views/common/_file.html.erb @@ -1,5 +1,5 @@
    -
    + + + 返回上级目录 + +
    +
    <% line_num = 1 %> <% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %> diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 8c51cf1f6..17392f2c5 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -33,7 +33,7 @@ -->
  • - <%= link_to "Fork", {:controller => 'projects', :action => 'forked_pop'}, + <%= link_to "".html_safe+"Fork", {:controller => 'projects', :action => 'forked_pop'}, :class=>"pro_new_topbtn_left fl", :remote => true %> <%= @project.forked_count.to_i %>
  • diff --git a/app/views/repositories/_dir_list.html.erb b/app/views/repositories/_dir_list.html.erb index 9fe4c79b4..c17154cbf 100644 --- a/app/views/repositories/_dir_list.html.erb +++ b/app/views/repositories/_dir_list.html.erb @@ -1,10 +1,10 @@
    -
    +
    - + @@ -13,7 +13,7 @@ - + <%= render :partial => 'dir_list_content' %>
    - + 返回上级目录
    diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index 56ec46e39..9853c16e2 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -211,7 +211,7 @@ .clone_btn {width:30px; height:21px; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; outline:none; float:left; background-image:linear-gradient(#FCFCFC, #EEE); text-align:center;} .vl_btn {height:21px; padding:0px 5px; vertical-align:middle; border:1px solid #dddddd; float:left; line-height:21px; background-image:linear-gradient(#FCFCFC, #EEE);} .vl_btn_2 {height:21px; padding:0px 5px; vertical-align:middle; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; float:left; line-height:21px;} -.recordBanner {width:99%; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;} +.recordBanner {width:100%; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;} .vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_zip {background:url(../images/vlicon/graph.png) 0px 2px no-repeat; padding-left:22px;} @@ -289,5 +289,5 @@ li.commit .commit-row-info .committed_ago { } .rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;} a.btn_zipdown{ display:block; height:25px; width:80px; text-align: center; line-height: 25px; border: 1px solid #dddddd; background-image: linear-gradient(#FCFCFC, #EEE); - color: #7f7f7f; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-right: 5px;} + color: #7f7f7f; -webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin-left: 5px;} a:hover.btn_zipdown{color:#269ac9;} \ No newline at end of file From 431ff8b31caa59a04d93af61a54d228d62a4de0f Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 9 Nov 2016 10:40:59 +0800 Subject: [PATCH 22/96] =?UTF-8?q?=E7=94=98=E7=89=B9=E5=9B=BE=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8F=8Aissue=E5=AF=BC=E5=87=BA=E6=8C=87=E6=B4=BE?= =?UTF-8?q?=E4=BA=BA=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/versions/_issue_statistics.html.erb | 2 +- config/settings.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/versions/_issue_statistics.html.erb b/app/views/versions/_issue_statistics.html.erb index 5e822be3f..b8c0ff2e3 100644 --- a/app/views/versions/_issue_statistics.html.erb +++ b/app/views/versions/_issue_statistics.html.erb @@ -11,7 +11,7 @@ <% @version_issue_assigned_name.each do | assigned | %> - <%= User.find(assigned[0]).show_name %> + <%= User.find(assigned[0]).try(:show_name) %> <%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0]).count %> <%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 3).count %> <%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 5).count %> diff --git a/config/settings.yml b/config/settings.yml index dc89093f1..c97fd74ca 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -103,7 +103,7 @@ feeds_limit: default: 15 gantt_items_limit: format: int - default: 500 + default: 10000 # Maximum size of files that can be displayed # inline through the file viewer (in KB) file_max_size_displayed: From 69996e855047113b5039fd938b2acbbed7f56e2d Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 11:29:10 +0800 Subject: [PATCH 23/96] . --- app/api/mobile/entities/issue.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index a46e10da5..8d5ff37f1 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -99,7 +99,8 @@ module Mobile if f.is_a?(::Issue) # f.journals_for_messages.reverse if !opt[:children] && opt[:type] == 0 - opt[:children] = true + #opt[:children] = true + opt.merge({:children=>true}) tStart = opt[:page]*5 tEnd = (opt[:page]+1)*5 - 1 @@ -135,7 +136,8 @@ module Mobile # opt[:bottom] = true # parents_reply[opt[:page]..opt[:page]] else - opt[:bottom] = true + #opt[:bottom] = true + opt.merge({:bottom=>true}) parents_reply[0..0] end else @@ -151,7 +153,8 @@ module Mobile parents_reply = get_reply_parents(parents_reply, f) if parents_reply.count > 2 && !opt[:top] if opt[:type] == 1 - opt[:top] = true + #opt[:top] = true + opt.merge({:top=>true}) tStart = (opt[:page]-1)*5+2 tEnd = (opt[:page])*5+2 - 1 @@ -166,12 +169,14 @@ module Mobile [] end else - opt[:top] = true + #opt[:top] = true + opt.merge({:top=>true}) parents_reply = parents_reply.reverse[0..1] parents_reply.reverse end elsif parents_reply.count == 2 && !opt[:top] - opt[:top] = true + #opt[:top] = true + opt.merge({:top=>true}) parents_reply = parents_reply.reverse[0..0] parents_reply.reverse else From f6eb96cfdce5a20e8a25f113e5fd161cb75b2108 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 9 Nov 2016 13:34:03 +0800 Subject: [PATCH 24/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=A4=B4=E9=83=A8?= =?UTF-8?q?=E7=82=B9=E5=87=BBfork=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 4 ---- .../repositories/_forked_popbox.html.erb | 23 ++++++++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index b12219f8a..0e8ca71c0 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -87,8 +87,6 @@ class RepositoriesController < ApplicationController end def forked - respond_to do |format| - format.html{ @project = Project.find(params[:id]) @repository = Repository.where("project_id =? and type =?", @project.id, "Repository::Gitlab") # 如果当前用户已经fork过该项目,不会新fork项目,则跳至已fork的项 @@ -117,8 +115,6 @@ class RepositoriesController < ApplicationController end end end - } - end end # 一键ZIP下载 diff --git a/app/views/repositories/_forked_popbox.html.erb b/app/views/repositories/_forked_popbox.html.erb index ed4df3c90..bb277e46f 100644 --- a/app/views/repositories/_forked_popbox.html.erb +++ b/app/views/repositories/_forked_popbox.html.erb @@ -1 +1,22 @@ -666 \ No newline at end of file +
    +
    +

    提示

    + +
    +
    +
    +
      +
    • + Fork将在后台执行
      平台将为您创建一个新的同名项目和版本库,请问是否继续? +
    • +
    • + + 取  消 + + <%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, + :class=>"sy_btn_blue fl ml20", :onclick=>"hideModal();" %> +
      +
    • +
    +
    +
    \ No newline at end of file From 59e649561079fc5812398ca410aa7b2bbea60a87 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 14:04:44 +0800 Subject: [PATCH 25/96] ... --- app/api/mobile/entities/issue.rb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 8d5ff37f1..3fa3f311d 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -24,8 +24,8 @@ module Mobile IssueStatus.find(issue.status_id).name when :comment_count issue.journals.where("notes is not null and notes != ''").count - # all_comments = [] - # get_all_children(all_comments, f).count + # all_comments = [] + # get_all_children(all_comments, f).count when :project_name issue.project.name when :praise_count @@ -99,8 +99,7 @@ module Mobile if f.is_a?(::Issue) # f.journals_for_messages.reverse if !opt[:children] && opt[:type] == 0 - #opt[:children] = true - opt.merge({:children=>true}) + opt[:children] = true tStart = opt[:page]*5 tEnd = (opt[:page]+1)*5 - 1 @@ -136,8 +135,7 @@ module Mobile # opt[:bottom] = true # parents_reply[opt[:page]..opt[:page]] else - #opt[:bottom] = true - opt.merge({:bottom=>true}) + opt[:bottom] = true parents_reply[0..0] end else @@ -153,8 +151,7 @@ module Mobile parents_reply = get_reply_parents(parents_reply, f) if parents_reply.count > 2 && !opt[:top] if opt[:type] == 1 - #opt[:top] = true - opt.merge({:top=>true}) + opt[:top] = true tStart = (opt[:page]-1)*5+2 tEnd = (opt[:page])*5+2 - 1 @@ -169,14 +166,12 @@ module Mobile [] end else - #opt[:top] = true - opt.merge({:top=>true}) + opt[:top] = true parents_reply = parents_reply.reverse[0..1] parents_reply.reverse end elsif parents_reply.count == 2 && !opt[:top] - #opt[:top] = true - opt.merge({:top=>true}) + opt[:top] = true parents_reply = parents_reply.reverse[0..0] parents_reply.reverse else From 10f810960ea8cfed5024764e7830c0aedcad78df Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 14:15:37 +0800 Subject: [PATCH 26/96] . --- app/api/mobile/entities/issue.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 3fa3f311d..8d5ff37f1 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -24,8 +24,8 @@ module Mobile IssueStatus.find(issue.status_id).name when :comment_count issue.journals.where("notes is not null and notes != ''").count - # all_comments = [] - # get_all_children(all_comments, f).count + # all_comments = [] + # get_all_children(all_comments, f).count when :project_name issue.project.name when :praise_count @@ -99,7 +99,8 @@ module Mobile if f.is_a?(::Issue) # f.journals_for_messages.reverse if !opt[:children] && opt[:type] == 0 - opt[:children] = true + #opt[:children] = true + opt.merge({:children=>true}) tStart = opt[:page]*5 tEnd = (opt[:page]+1)*5 - 1 @@ -135,7 +136,8 @@ module Mobile # opt[:bottom] = true # parents_reply[opt[:page]..opt[:page]] else - opt[:bottom] = true + #opt[:bottom] = true + opt.merge({:bottom=>true}) parents_reply[0..0] end else @@ -151,7 +153,8 @@ module Mobile parents_reply = get_reply_parents(parents_reply, f) if parents_reply.count > 2 && !opt[:top] if opt[:type] == 1 - opt[:top] = true + #opt[:top] = true + opt.merge({:top=>true}) tStart = (opt[:page]-1)*5+2 tEnd = (opt[:page])*5+2 - 1 @@ -166,12 +169,14 @@ module Mobile [] end else - opt[:top] = true + #opt[:top] = true + opt.merge({:top=>true}) parents_reply = parents_reply.reverse[0..1] parents_reply.reverse end elsif parents_reply.count == 2 && !opt[:top] - opt[:top] = true + #opt[:top] = true + opt.merge({:top=>true}) parents_reply = parents_reply.reverse[0..0] parents_reply.reverse else From 77f3921d0e9027e99d56f7daf452303c1a7c61bf Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 14:20:13 +0800 Subject: [PATCH 27/96] . --- app/api/mobile/entities/issue.rb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 8d5ff37f1..3fa3f311d 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -24,8 +24,8 @@ module Mobile IssueStatus.find(issue.status_id).name when :comment_count issue.journals.where("notes is not null and notes != ''").count - # all_comments = [] - # get_all_children(all_comments, f).count + # all_comments = [] + # get_all_children(all_comments, f).count when :project_name issue.project.name when :praise_count @@ -99,8 +99,7 @@ module Mobile if f.is_a?(::Issue) # f.journals_for_messages.reverse if !opt[:children] && opt[:type] == 0 - #opt[:children] = true - opt.merge({:children=>true}) + opt[:children] = true tStart = opt[:page]*5 tEnd = (opt[:page]+1)*5 - 1 @@ -136,8 +135,7 @@ module Mobile # opt[:bottom] = true # parents_reply[opt[:page]..opt[:page]] else - #opt[:bottom] = true - opt.merge({:bottom=>true}) + opt[:bottom] = true parents_reply[0..0] end else @@ -153,8 +151,7 @@ module Mobile parents_reply = get_reply_parents(parents_reply, f) if parents_reply.count > 2 && !opt[:top] if opt[:type] == 1 - #opt[:top] = true - opt.merge({:top=>true}) + opt[:top] = true tStart = (opt[:page]-1)*5+2 tEnd = (opt[:page])*5+2 - 1 @@ -169,14 +166,12 @@ module Mobile [] end else - #opt[:top] = true - opt.merge({:top=>true}) + opt[:top] = true parents_reply = parents_reply.reverse[0..1] parents_reply.reverse end elsif parents_reply.count == 2 && !opt[:top] - #opt[:top] = true - opt.merge({:top=>true}) + opt[:top] = true parents_reply = parents_reply.reverse[0..0] parents_reply.reverse else From aa66134c24f003666a7274506b9f2dc3226da6ee Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 14:24:46 +0800 Subject: [PATCH 28/96] . --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a5aee62c2..58ccbc011 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'rubyzip' gem 'delayed_job_active_record'#, :group => :production gem 'daemons' gem 'grape', '~> 0.9.0' -gem 'grape-entity' +gem 'grape-entity', '= 0.4.5' gem 'rack-cors', :require => 'rack/cors' gem 'seems_rateable', '~> 1.0.13' gem 'rails', '~> 3.2' From 8848bfb06f67373c20071b0aae5c91f51688d5a8 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 9 Nov 2016 14:42:50 +0800 Subject: [PATCH 29/96] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E9=87=8C=E7=A8=8B=E7=A2=91=E6=94=BE=E7=BD=AE=E6=9C=80?= =?UTF-8?q?=E5=89=8D=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/settings/_new_versions.html.erb | 2 +- app/views/versions/_new_milestone.html.erb | 20 +++++++++---------- app/views/versions/index.html.erb | 1 + 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/views/projects/settings/_new_versions.html.erb b/app/views/projects/settings/_new_versions.html.erb index c8d429a78..6f35a73cf 100644 --- a/app/views/projects/settings/_new_versions.html.erb +++ b/app/views/projects/settings/_new_versions.html.erb @@ -20,7 +20,7 @@ - <% @project.shared_versions.each do |version| %> + <% @project.shared_versions.reverse.each do |version| %> <%= link_to version.name, version_path(version), :class => "c_blue02" %> diff --git a/app/views/versions/_new_milestone.html.erb b/app/views/versions/_new_milestone.html.erb index 0fbbb4f03..451b06176 100644 --- a/app/views/versions/_new_milestone.html.erb +++ b/app/views/versions/_new_milestone.html.erb @@ -1,4 +1,4 @@ -
    +

    新建里程碑

    @@ -17,22 +17,20 @@
  • - + <%= f.text_field :description, :maxlength => 60, :class=>"w650", :style=>"height:28px;", :no_label => true %>
  • - - - - - - -
  • - + + <%= f.text_field :effective_date, :size => 10, :readonly => true, :class => "issues_calendar_input fl ml3", :id => "version_name", :placeholder=>"结束日期", :style=>"height:28px;", :no_label => true %> + <%= calendar_for('version_name') %> +
  • +
  • + <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]},{:no_label => true },{:style=>"height:28px;"} %>
  • - 取消 + 取消 保存 <% end %>
    diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index e53925ed7..1201ed36e 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -1,3 +1,4 @@ +
    From cf67c8603c8bc748441fceb6c698189df8abceb7 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 9 Nov 2016 14:55:25 +0800 Subject: [PATCH 30/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD=20=E7=BC=96=E8=BE=91=E9=87=8C=E7=A8=8B=E7=A2=91?= =?UTF-8?q?=E7=9A=84=E6=A0=B7=E5=BC=8F=E5=8F=8A=E6=97=A5=E5=8E=86=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=98=BE=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/views/versions/_edit.html.erb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/versions/_edit.html.erb b/app/views/versions/_edit.html.erb index f910073b7..146d49ff5 100644 --- a/app/views/versions/_edit.html.erb +++ b/app/views/versions/_edit.html.erb @@ -1,4 +1,4 @@ -
    +

    编辑里程碑

    @@ -17,18 +17,18 @@
  • - + <%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height:28px;", :no_label => true %>
  • - - - - +
  • + + <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :id => "version_effective_date2", :placeholder=>"结束日期", :style=>"height:28px;", :no_label => true %> + <%= calendar_for('version_effective_date2') %>
  • - + <%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]},{:no_label => true },{:style=>"height:28px;"} %>
  • <% if params[:action] == "index" %> @@ -37,7 +37,7 @@ <% end %> - 取消 + 取消 保存 <% end %>
    @@ -51,8 +51,8 @@ { if(popub_regex_version_name()) { - hideModal(); $("#popub_new_project_version_form").submit(); + hideModal(); } } From 919e973efb3213e639acc9ab96cbeebbe96ee1dc Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 9 Nov 2016 14:57:39 +0800 Subject: [PATCH 31/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD=E6=A1=86=E6=A1=86=E6=B2=A1=E5=AF=B9=E9=BD=90=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/views/projects/settings/_new_edit.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/settings/_new_edit.html.erb b/app/views/projects/settings/_new_edit.html.erb index d61352c6e..376162ebc 100644 --- a/app/views/projects/settings/_new_edit.html.erb +++ b/app/views/projects/settings/_new_edit.html.erb @@ -39,12 +39,12 @@ <% end %>
  • - > + > (打钩为公开项目,不打钩为私有项目;私有项目仅项目成员可见。)
  • - > + >
  • <% if Member.where(:user_id => User.current.id, :project_id => @project.id).first.try(:roles).to_s.include?("Manager") %> From a9c019e3a8bac1c8d82af78a5601f8272a3ed4d1 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 14:59:10 +0800 Subject: [PATCH 32/96] =?UTF-8?q?=E5=BE=AE=E4=BF=A1BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- config/initializers/10-patches.rb | 39 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 58ccbc011..a5aee62c2 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'rubyzip' gem 'delayed_job_active_record'#, :group => :production gem 'daemons' gem 'grape', '~> 0.9.0' -gem 'grape-entity', '= 0.4.5' +gem 'grape-entity' gem 'rack-cors', :require => 'rack/cors' gem 'seems_rateable', '~> 1.0.13' gem 'rails', '~> 3.2' diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index ff3d8de83..bfcca135b 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -175,3 +175,42 @@ module ActionController end end end + +module Grape + class Entity + def self.expose(*args, &block) + options = merge_options(args.last.is_a?(Hash) ? args.pop : {}) + + if args.size > 1 + fail ArgumentError, 'You may not use the :as option on multi-attribute exposures.' if options[:as] + fail ArgumentError, 'You may not use block-setting on multi-attribute exposures.' if block_given? + end + + fail ArgumentError, 'You may not use block-setting when also using format_with' if block_given? && options[:format_with].respond_to?(:call) + + options[:proc] = block if block_given? && block.parameters.any? + + @nested_attributes ||= [] + + args.each do |attribute| + unless @nested_attributes.empty? + orig_attribute = attribute.to_sym + attribute = "#{@nested_attributes.last}__#{attribute}" + nested_attribute_names_hash[attribute.to_sym] = orig_attribute + options[:nested] = true + nested_exposures_hash[@nested_attributes.last.to_sym] ||= {} + nested_exposures_hash[@nested_attributes.last.to_sym][attribute.to_sym] = options + end + + exposures[attribute.to_sym] = options + + # Nested exposures are given in a block with no parameters. + if block_given? && block.parameters.empty? + @nested_attributes << attribute + block.call + @nested_attributes.pop + end + end + end + end +end \ No newline at end of file From 4da08b2e07a3c4caeb38f002592d33759257db84 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 15:15:06 +0800 Subject: [PATCH 33/96] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/10-patches.rb | 39 ------------------------------- 1 file changed, 39 deletions(-) diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index bfcca135b..f0487fad5 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -174,43 +174,4 @@ module ActionController exit 1 end end -end - -module Grape - class Entity - def self.expose(*args, &block) - options = merge_options(args.last.is_a?(Hash) ? args.pop : {}) - - if args.size > 1 - fail ArgumentError, 'You may not use the :as option on multi-attribute exposures.' if options[:as] - fail ArgumentError, 'You may not use block-setting on multi-attribute exposures.' if block_given? - end - - fail ArgumentError, 'You may not use block-setting when also using format_with' if block_given? && options[:format_with].respond_to?(:call) - - options[:proc] = block if block_given? && block.parameters.any? - - @nested_attributes ||= [] - - args.each do |attribute| - unless @nested_attributes.empty? - orig_attribute = attribute.to_sym - attribute = "#{@nested_attributes.last}__#{attribute}" - nested_attribute_names_hash[attribute.to_sym] = orig_attribute - options[:nested] = true - nested_exposures_hash[@nested_attributes.last.to_sym] ||= {} - nested_exposures_hash[@nested_attributes.last.to_sym][attribute.to_sym] = options - end - - exposures[attribute.to_sym] = options - - # Nested exposures are given in a block with no parameters. - if block_given? && block.parameters.empty? - @nested_attributes << attribute - block.call - @nested_attributes.pop - end - end - end - end end \ No newline at end of file From 36758f571fa74e9b7fa791f951a9a057d8ad83c4 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 15:29:21 +0800 Subject: [PATCH 34/96] =?UTF-8?q?=E8=A1=A5=E4=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/10-patches.rb | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index f0487fad5..bfcca135b 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -174,4 +174,43 @@ module ActionController exit 1 end end +end + +module Grape + class Entity + def self.expose(*args, &block) + options = merge_options(args.last.is_a?(Hash) ? args.pop : {}) + + if args.size > 1 + fail ArgumentError, 'You may not use the :as option on multi-attribute exposures.' if options[:as] + fail ArgumentError, 'You may not use block-setting on multi-attribute exposures.' if block_given? + end + + fail ArgumentError, 'You may not use block-setting when also using format_with' if block_given? && options[:format_with].respond_to?(:call) + + options[:proc] = block if block_given? && block.parameters.any? + + @nested_attributes ||= [] + + args.each do |attribute| + unless @nested_attributes.empty? + orig_attribute = attribute.to_sym + attribute = "#{@nested_attributes.last}__#{attribute}" + nested_attribute_names_hash[attribute.to_sym] = orig_attribute + options[:nested] = true + nested_exposures_hash[@nested_attributes.last.to_sym] ||= {} + nested_exposures_hash[@nested_attributes.last.to_sym][attribute.to_sym] = options + end + + exposures[attribute.to_sym] = options + + # Nested exposures are given in a block with no parameters. + if block_given? && block.parameters.empty? + @nested_attributes << attribute + block.call + @nested_attributes.pop + end + end + end + end end \ No newline at end of file From bafae5f62452af8d838aaf743f2da91a5bcc7ae9 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 15:55:20 +0800 Subject: [PATCH 35/96] =?UTF-8?q?grape=E7=89=88=E6=9C=AC=E8=AE=BE=E4=B8=BA?= =?UTF-8?q?=3D0.4.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- config/initializers/10-patches.rb | 39 ------------------------------- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/Gemfile b/Gemfile index a5aee62c2..58ccbc011 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'rubyzip' gem 'delayed_job_active_record'#, :group => :production gem 'daemons' gem 'grape', '~> 0.9.0' -gem 'grape-entity' +gem 'grape-entity', '= 0.4.5' gem 'rack-cors', :require => 'rack/cors' gem 'seems_rateable', '~> 1.0.13' gem 'rails', '~> 3.2' diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index bfcca135b..ff3d8de83 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -175,42 +175,3 @@ module ActionController end end end - -module Grape - class Entity - def self.expose(*args, &block) - options = merge_options(args.last.is_a?(Hash) ? args.pop : {}) - - if args.size > 1 - fail ArgumentError, 'You may not use the :as option on multi-attribute exposures.' if options[:as] - fail ArgumentError, 'You may not use block-setting on multi-attribute exposures.' if block_given? - end - - fail ArgumentError, 'You may not use block-setting when also using format_with' if block_given? && options[:format_with].respond_to?(:call) - - options[:proc] = block if block_given? && block.parameters.any? - - @nested_attributes ||= [] - - args.each do |attribute| - unless @nested_attributes.empty? - orig_attribute = attribute.to_sym - attribute = "#{@nested_attributes.last}__#{attribute}" - nested_attribute_names_hash[attribute.to_sym] = orig_attribute - options[:nested] = true - nested_exposures_hash[@nested_attributes.last.to_sym] ||= {} - nested_exposures_hash[@nested_attributes.last.to_sym][attribute.to_sym] = options - end - - exposures[attribute.to_sym] = options - - # Nested exposures are given in a block with no parameters. - if block_given? && block.parameters.empty? - @nested_attributes << attribute - block.call - @nested_attributes.pop - end - end - end - end -end \ No newline at end of file From e39c3cfd9cc58f0f90b3eaf547c816e3efdcb1f1 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 9 Nov 2016 15:57:06 +0800 Subject: [PATCH 36/96] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=87=8C=E7=A8=8B?= =?UTF-8?q?=E7=A2=91=E6=96=B0=E5=BB=BA=E9=87=8C=E7=A8=8B=E7=A2=91=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E5=BC=B9=E7=AA=97=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=97=A5=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/versions/_new_milestone.html.erb | 6 +++--- app/views/versions/new.js.erb | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/versions/_new_milestone.html.erb b/app/views/versions/_new_milestone.html.erb index 451b06176..b0b6208d0 100644 --- a/app/views/versions/_new_milestone.html.erb +++ b/app/views/versions/_new_milestone.html.erb @@ -22,8 +22,8 @@
  • - <%= f.text_field :effective_date, :size => 10, :readonly => true, :class => "issues_calendar_input fl ml3", :id => "version_name", :placeholder=>"结束日期", :style=>"height:28px;", :no_label => true %> - <%= calendar_for('version_name') %> + <%= f.text_field :effective_date, :size => 10, :readonly => true, :class => "issues_calendar_input fl ml3", :id => "version_index_create_name", :placeholder=>"结束日期", :style=>"height:28px;", :no_label => true %> + <%#= calendar_for('version_index_create_name') %>
  • @@ -44,8 +44,8 @@ { if(popub_regex_version_name()) { - hideModal(); $("#popub_new_project_version_form").submit(); + hideModal(); } } diff --git a/app/views/versions/new.js.erb b/app/views/versions/new.js.erb index ab5ad83aa..437dae2ca 100644 --- a/app/views/versions/new.js.erb +++ b/app/views/versions/new.js.erb @@ -1,2 +1,6 @@ var htmlvalue = "<%= escape_javascript(render :partial => 'versions/new_milestone') %>"; pop_box_new(htmlvalue,820,316); +var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: 0, showOn: 'button', buttonImageOnly: true, buttonImage: '/images/public_icon.png', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}; +$(function() { $('#version_index_create_name').datepicker(datepickerOptions); +// $('#evaluation_end_time').datepicker(datepickerOptions); +}); \ No newline at end of file From 9598174180c565b3379127c2260398c10474b38c Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 9 Nov 2016 16:01:59 +0800 Subject: [PATCH 37/96] =?UTF-8?q?=E4=BF=AE=E6=94=B9grape=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a5aee62c2..58ccbc011 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem 'rubyzip' gem 'delayed_job_active_record'#, :group => :production gem 'daemons' gem 'grape', '~> 0.9.0' -gem 'grape-entity' +gem 'grape-entity', '= 0.4.5' gem 'rack-cors', :require => 'rack/cors' gem 'seems_rateable', '~> 1.0.13' gem 'rails', '~> 3.2' From 6322d18325d15686665ad92f8be8ff4018deb8b5 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 9 Nov 2016 16:06:41 +0800 Subject: [PATCH 38/96] =?UTF-8?q?=E9=87=8C=E7=A8=8B=E7=A2=91=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=9A=84=E6=97=B6=E5=80=99=E6=97=A5=E5=8E=86=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/versions/_edit.html.erb | 2 +- app/views/versions/edit.js.erb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/versions/_edit.html.erb b/app/views/versions/_edit.html.erb index 146d49ff5..f9ce5a8b1 100644 --- a/app/views/versions/_edit.html.erb +++ b/app/views/versions/_edit.html.erb @@ -23,7 +23,7 @@
  • <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :id => "version_effective_date2", :placeholder=>"结束日期", :style=>"height:28px;", :no_label => true %> - <%= calendar_for('version_effective_date2') %> + <%#= calendar_for('version_effective_date2') %>
  • diff --git a/app/views/versions/edit.js.erb b/app/views/versions/edit.js.erb index 377dbeebd..baa20b6cd 100644 --- a/app/views/versions/edit.js.erb +++ b/app/views/versions/edit.js.erb @@ -1,3 +1,7 @@ var htmlvalue = "<%= escape_javascript(render :partial => 'versions/edit') %>"; pop_box_new(htmlvalue,820,316); +var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: 0, showOn: 'button', buttonImageOnly: true, buttonImage: '/images/public_icon.png', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}; +$(function() { $('#version_effective_date2').datepicker(datepickerOptions); +// $('#evaluation_end_time').datepicker(datepickerOptions); +}); From a8a7029746ed210a8cb1d706f0c73fa7ae2b3a52 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 9 Nov 2016 16:26:50 +0800 Subject: [PATCH 39/96] =?UTF-8?q?=20=E7=8F=AD=E7=BA=A7=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=EF=BC=8C=E8=B5=84=E6=BA=90=E6=8F=8F=E8=BF=B0=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E9=9D=9E=E6=B1=89=E5=AD=97=E7=B1=BB=E5=9E=8B=E8=BF=87?= =?UTF-8?q?=E9=95=BF=E6=97=B6=EF=BC=8C=E5=AF=B9=E5=AD=A6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=91=98=E5=8F=AA=E6=98=BE=E7=A4=BA=E4=B8=80=E8=A1=8C=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_resource_detail.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index fd804ca9c..4e046b50a 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -48,7 +48,7 @@ <% end %>
    <% else %> -
    +
    资源描述:<% if file.description.blank? %>未添加<% else %><%= file.description %><% end %>
    <% end %> From c5ab8550ff7024d81c2c0224575aa557d47592a4 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 10 Nov 2016 09:12:07 +0800 Subject: [PATCH 40/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E9=87=8C=E7=A8=8B?= =?UTF-8?q?=E7=A2=91=EF=BC=8C=E9=85=8D=E7=BD=AE=E7=9A=84=E9=87=8C=E7=A8=8B?= =?UTF-8?q?=E7=A2=91=E7=82=B9=E5=87=BB=E7=BC=96=E8=BE=91=E5=BC=B9=E6=A1=86?= =?UTF-8?q?=E6=97=B6=E9=97=B4=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/views/projects/settings/_new_versions_form.html.erb | 4 +++- app/views/versions/_edit.html.erb | 4 +++- app/views/versions/_new_milestone.html.erb | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/projects/settings/_new_versions_form.html.erb b/app/views/projects/settings/_new_versions_form.html.erb index cc61b1993..5d9243eea 100644 --- a/app/views/projects/settings/_new_versions_form.html.erb +++ b/app/views/projects/settings/_new_versions_form.html.erb @@ -12,8 +12,10 @@
  • - <%= f.text_field :effective_date, :size => 10, :readonly => true, :class=>"issues_calendar_input fl", :placeholder=>"结束日期", :style=>"height:28px;", :id => "setting_version_effective_date" %> +
  • diff --git a/app/views/versions/_edit.html.erb b/app/views/versions/_edit.html.erb index f9ce5a8b1..e38041efe 100644 --- a/app/views/versions/_edit.html.erb +++ b/app/views/versions/_edit.html.erb @@ -22,10 +22,12 @@
  • - <%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :id => "version_effective_date2", :placeholder=>"结束日期", :style=>"height:28px;", :no_label => true %> +
  • diff --git a/app/views/versions/_new_milestone.html.erb b/app/views/versions/_new_milestone.html.erb index b0b6208d0..47c1d2b39 100644 --- a/app/views/versions/_new_milestone.html.erb +++ b/app/views/versions/_new_milestone.html.erb @@ -22,8 +22,10 @@
  • - <%= f.text_field :effective_date, :size => 10, :readonly => true, :class => "issues_calendar_input fl ml3", :id => "version_index_create_name", :placeholder=>"结束日期", :style=>"height:28px;", :no_label => true %> +
  • From 7e657a4ad0cbf8dd233593bfbe45847f4597da40 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 10 Nov 2016 09:23:12 +0800 Subject: [PATCH 41/96] =?UTF-8?q?=E6=8F=90=E9=97=AE=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E6=A1=86=E5=8E=BB=E6=8E=89X=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_forbidden_new_feedback.html.erb | 2 +- app/views/layouts/_new_feedback.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_forbidden_new_feedback.html.erb b/app/views/layouts/_forbidden_new_feedback.html.erb index a9bec48ac..88696a94b 100644 --- a/app/views/layouts/_forbidden_new_feedback.html.erb +++ b/app/views/layouts/_forbidden_new_feedback.html.erb @@ -7,7 +7,7 @@
    问题和建议 - × +
    diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 0fd82658b..690317127 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -6,7 +6,7 @@
    问题和建议 - × +
    From 0f328c9c583827805077cc3451383353042e9cd5 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 10 Nov 2016 10:27:57 +0800 Subject: [PATCH 42/96] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=94=A8=E6=88=B7ID?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E6=88=90=E7=94=A8=E6=88=B7=E5=90=8D=E5=90=8E?= =?UTF-8?q?=E5=BC=95=E5=8F=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 109 +++++++++----------- app/helpers/application_helper.rb | 12 +-- app/models/user.rb | 6 +- app/views/repositories/commit_diff.html.erb | 11 +- 4 files changed, 57 insertions(+), 81 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c95366835..b1d458d49 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1137,7 +1137,7 @@ class UsersController < ApplicationController def user_import_resource @user = User.current user_course_ids = @user.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源 - @attachments = Attachment.where("(author_id = #{params[:id]} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ + @attachments = Attachment.where("(author_id = #{@user.id} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+ "or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))").order("created_on desc") @type = params[:type] @homework_id = params[:homework_id] @@ -1156,26 +1156,22 @@ class UsersController < ApplicationController #引入资源列表根据类型过滤 def user_resource_type - if User.current.id.to_i != params[:id].to_i - render_403 - return - end user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" - @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) + @attachments = get_course_resources(User.current.id, user_course_ids, @order, @score) elsif params[:status] == "3" - @attachments = get_project_resources(params[:id], user_project_ids, @order, @score) + @attachments = get_project_resources(User.current.id, user_project_ids, @order, @score) elsif params[:status] == "4" - @attachments = get_attch_resources(params[:id], @order, @score) + @attachments = get_attch_resources(User.current.id, @order, @score) elsif params[:status] == "5" - @attachments = get_principal_resources(params[:id], @order, @score) + @attachments = get_principal_resources(User.current.id, @order, @score) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score) end elsif params[:type] == "6" # 公共资源 if params[:status] == "2" @@ -1207,11 +1203,7 @@ class UsersController < ApplicationController #引入资源列表根据关键词过滤 - def user_ref_resource_search - if User.current.id.to_i != params[:id].to_i - render_403 - return - end + def user_ref_resource_searc @resource_id = params[:mul_id] @resource_type = params[:mul_type] @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @@ -1225,7 +1217,7 @@ class UsersController < ApplicationController user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} - @attachments = get_my_resources_search(params[:id], user_course_ids, user_project_ids, @order, @score, search) + @attachments = get_my_resources_search(User.current.id, user_course_ids, user_project_ids, @order, @score, search) elsif (params[:type].blank? || params[:type] == "6") # 公共资源 # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search) @@ -2041,7 +2033,7 @@ class UsersController < ApplicationController user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} - @user = User.find(params[:id]) + @user = User.current # 保存文件 attach = Attachment.attach_filesex_public(@user, params[:attachments], params[:attachment_type], is_public = true) @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @@ -2050,16 +2042,16 @@ class UsersController < ApplicationController if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" - @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) + @attachments = get_course_resources(@user.id, user_course_ids, @order, @score) elsif params[:status] == "3" - @attachments = get_project_resources(params[:id], user_project_ids, @order, @score) + @attachments = get_project_resources(@user.id, user_project_ids, @order, @score) elsif params[:status] == "4" - @attachments = get_attch_resources(params[:id], @order, @score) + @attachments = get_attch_resources(@user.id, @order, @score) elsif params[:status] == "5" - @attachments = get_principal_resources(params[:id], @order, @score) + @attachments = get_principal_resources(@user.id, @order, @score) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(@user.id, user_course_ids, user_project_ids, @order, @score) end elsif params[:type] == "6" # 公共资源 if params[:status] == "2" @@ -2109,16 +2101,16 @@ class UsersController < ApplicationController if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" - @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) + @attachments = get_course_resources(@user.id, user_course_ids, @order, @score) elsif params[:status] == "3" - @attachments = get_project_resources(params[:id], user_project_ids, @order, @score) + @attachments = get_project_resources(@user.id, user_project_ids, @order, @score) elsif params[:status] == "4" - @attachments = get_attch_resources(params[:id], @order, @score) + @attachments = get_attch_resources(@user.id, @order, @score) elsif params[:status] == "5" - @attachments = get_principal_resources(params[:id], @order, @score) + @attachments = get_principal_resources(@user.id, @order, @score) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(@user.id, user_course_ids, user_project_ids, @order, @score) end elsif params[:type] == "6" # 公共资源 if params[:status] == "2" @@ -2248,16 +2240,16 @@ class UsersController < ApplicationController if(params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" - @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) + @attachments = get_course_resources(User.current.id, user_course_ids, @order, @score) elsif params[:status] == "3" - @attachments = get_project_resources(params[:id], user_project_ids, @order, @score) + @attachments = get_project_resources(User.current.id, user_project_ids, @order, @score) elsif params[:status] == "4" - @attachments = get_attch_resources(params[:id], @order, @score) + @attachments = get_attch_resources(User.current.id, @order, @score) elsif params[:status] == "5" - @attachments = get_principal_resources(params[:id], @order, @score) + @attachments = get_principal_resources(User.current.id, @order, @score) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score) end elsif (params[:type].blank? || params[:type] == "6") # 公共资源 if params[:status] == "2" @@ -2408,16 +2400,16 @@ class UsersController < ApplicationController if(params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" - @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) + @attachments = get_course_resources(User.current.id, user_course_ids, @order, @score) elsif params[:status] == "3" - @attachments = get_project_resources(params[:id], user_project_ids, @order, @score) + @attachments = get_project_resources(User.current.id, user_project_ids, @order, @score) elsif params[:status] == "4" - @attachments = get_attch_resources(params[:id], @order, @score) + @attachments = get_attch_resources(User.current.id, @order, @score) elsif params[:status] == "5" - @attachments = get_principal_resources(params[:id], @order, @score) + @attachments = get_principal_resources(User.current.id, @order, @score) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score) end elsif (params[:type].blank? || params[:type] == "6") # 公共资源 if params[:status] == "2" @@ -2549,16 +2541,16 @@ class UsersController < ApplicationController if(params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" - @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) + @attachments = get_course_resources(User.current.id, user_course_ids, @order, @score) elsif params[:status] == "3" - @attachments = get_project_resources(params[:id], user_project_ids, @order, @score) + @attachments = get_project_resources(User.current.id, user_project_ids, @order, @score) elsif params[:status] == "4" - @attachments = get_attch_resources(params[:id], @order, @score) + @attachments = get_attch_resources(User.current.id, @order, @score) elsif params[:status] == "5" - @attachments = get_principal_resources(params[:id], @order, @score) + @attachments = get_principal_resources(User.current.id, @order, @score) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score) end elsif (params[:type].blank? || params[:type] == "6") # 公共资源 if params[:status] == "2" @@ -3061,16 +3053,16 @@ class UsersController < ApplicationController if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 if params[:status] == "2" - @attachments = get_course_resources(params[:id], user_course_ids, @order, @score) + @attachments = get_course_resources(User.current.id, user_course_ids, @order, @score) elsif params[:status] == "3" - @attachments = get_project_resources(params[:id], user_project_ids, @order, @score) + @attachments = get_project_resources(User.current.id, user_project_ids, @order, @score) elsif params[:status] == "4" - @attachments = get_attch_resources(params[:id], @order, @score) + @attachments = get_attch_resources(User.current.id, @order, @score) elsif params[:status] == "5" - @attachments = get_principal_resources(params[:id], @order, @score) + @attachments = get_principal_resources(User.current.id, @order, @score) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score) end elsif (params[:type] == "6") # 公共资源 if params[:status] == "2" @@ -3115,11 +3107,6 @@ class UsersController < ApplicationController # 导入资源 def import_resources - # 别人的资源库是没有权限去看的 - if User.current.id != params[:id].to_i - render_403 - return - end @resource_id = params[:project_id].nil? ? (params[:course_id].nil? ? params[:subfield_file_id] : params[:course_id]) : params[:project_id] @resource_type = params[:project_id].nil? ? (params[:course_id].nil? ? "SubfieldFile" : "Course") : "Project" @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @@ -3128,7 +3115,7 @@ class UsersController < ApplicationController user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} if(params[:type].blank? || params[:type] == "1") # 我的资源 # 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源 - @attachments = get_my_resources(params[:id], user_course_ids, user_project_ids, @order, @score) + @attachments = get_my_resources(User.current.id, user_course_ids, user_project_ids, @order, @score) elsif params[:type] == "6" # 公共资源 # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources(user_course_ids, user_project_ids, params[:order], @score) @@ -3149,10 +3136,6 @@ class UsersController < ApplicationController end def import_resources_search - if User.current.id.to_i != params[:id].to_i - render_403 - return - end @resource_id = params[:mul_id] @resource_type = params[:mul_type] @order, @b_sort = params[:order] || "created_on", params[:sort] || "asc" @@ -3166,7 +3149,7 @@ class UsersController < ApplicationController user_course_ids = User.current.courses.map { |c| c.is_delete == 0 && c.id} user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } # user_org_ids = User.current.organizations.map {|o| o.id} - @attachments = get_my_resources_search(params[:id], user_course_ids, user_project_ids, @order, @score, search) + @attachments = get_my_resources_search(User.current.id, user_course_ids, user_project_ids, @order, @score, search) elsif params[:type] == "6" # 公共资源 # 公共资源库:所有公开资源或者我上传的私有资源 @attachments = get_public_resources_search(user_course_ids, user_project_ids, @order, @score, search) @@ -3253,16 +3236,16 @@ class UsersController < ApplicationController user_project_ids = User.current.projects.map {|p| p.status != 9 && p.id } if(params[:type].nil? || params[:type].blank? || params[:type] == "1" || params[:type] == 'all') # 全部 if params[:status] == "2" - @attachments = get_course_resources_search(params[:id], user_course_ids, @order, @score, search) + @attachments = get_course_resources_search(User.current.id, user_course_ids, @order, @score, search) elsif params[:status] == "3" - @attachments = get_project_resources_search(params[:id], user_project_ids, @order, @score, search) + @attachments = get_project_resources_search(User.current.id, user_project_ids, @order, @score, search) elsif params[:status] == "4" - @attachments = get_attch_resources_search(params[:id], @order, @score, search) + @attachments = get_attch_resources_search(User.current.id, @order, @score, search) elsif params[:status] == "5" - @attachments = get_principal_resources_search(params[:id], @order, @score, search) + @attachments = get_principal_resources_search(User.current.id, @order, @score, search) else # 公共资源库:所有公开资源或者我上传的私有资源 - @attachments = get_my_resources_search(params[:id], user_course_ids, user_project_ids, @order, @score, search) + @attachments = get_my_resources_search(User.current.id, user_course_ids, user_project_ids, @order, @score, search) end elsif params[:type] == "6" # 公共资源 if params[:status] == "2" diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cf90e58a6..c32f6c175 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -67,12 +67,12 @@ module ApplicationHelper end # 重置user_path,目的是将id转换成用户名 - # def user_path(resource, parameters = {}) - # if Fixnum === resource - # resource = User.find(resource) - # end - # super - # end + def user_path(resource, parameters = {}) + if Fixnum === resource + resource = User.find(resource) + end + super + end # 历史数据(老版本库数据)处理完则可以修改该放放 def get_rep_identifier_by_project project diff --git a/app/models/user.rb b/app/models/user.rb index c226e2a52..8f7939bb3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -322,9 +322,9 @@ class User < Principal end # id 转换成 登录名 - # def to_param - # self.login.to_i > 0 ? id : login - # end + def to_param + self.login.to_i > 0 ? id : login + end def my_blogs_count diff --git a/app/views/repositories/commit_diff.html.erb b/app/views/repositories/commit_diff.html.erb index cee017978..417158c7e 100644 --- a/app/views/repositories/commit_diff.html.erb +++ b/app/views/repositories/commit_diff.html.erb @@ -2,14 +2,7 @@
    <%= render :partial => "top" %>
    - - - - - - - -
  • <%= render :partial => 'commit_details', :locals => {:changeset => @commit_details} %> @@ -26,7 +19,7 @@ <% @commit_diff.each do |cd| %> From 88d489b4853ed27062fddf1a20f50b242212099d Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 10 Nov 2016 10:41:35 +0800 Subject: [PATCH 43/96] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=AE=BE=E7=95=99=E8=A8=80at=E6=B6=88=E6=81=AF=E4=B8=BA?= =?UTF-8?q?=E5=B7=B2=E8=AF=BB=E6=94=B9=E4=B8=BAdelay=5Fjob=E6=89=A7?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 8 ++++---- app/models/homework_common.rb | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 3fabaf38a..b479fa206 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -34,11 +34,11 @@ class HomeworkCommonController < ApplicationController @homeworks = paginateHelper @homework_commons,10 #设置at已读 @homeworks.each do |homework| - homework.journals_for_messages.each do |j| - User.current.at_messages.unviewed('JournalsForMessage', j.id).each {|x| x.viewed!} - end + # homework.journals_for_messages.each do |j| + # User.current.at_messages.unviewed('JournalsForMessage', j.id).each {|x| x.viewed!} + # end + homework.delay.set_jour_viewed end - @left_nav_type = 3 respond_to do |format| format.js diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index 3072fa72b..199566691 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -135,6 +135,12 @@ class HomeworkCommon < ActiveRecord::Base # end # end + def set_jour_viewed + self.journals_for_messages.each do |j| + User.current.at_messages.unviewed('JournalsForMessage', j.id).each {|x| x.viewed!} + end + end + delegate :language_name, :language, :to => :homework_detail_programing end From ec39b2d52cc862664fee218666145b9e81d53b05 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 10 Nov 2016 11:11:14 +0800 Subject: [PATCH 44/96] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E5=A7=93=E5=90=8D=E6=B7=BB=E5=8A=A0url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index efa38734e..783aade75 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -119,7 +119,7 @@ <% end %> <%= form_tag(edit_file_description_project_file_path(file, :project_id => project.id),:remote=>'true', :method => :post, :id=>"files_query_form_#{file.id}") do %> + onblur="commit_files_description('#files_query_form_<%= file.id %>','#file_description_edit_<%= file.id %>','#file_description_show_<%= file.id %>','#file_description_tip_<%= file.id %>');"><%= file.description %> <% end %>
  • <% else %> @@ -73,7 +73,13 @@ diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index fd804ca9c..99a93c6ae 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -44,7 +44,7 @@
    <%= form_tag(edit_file_description_course_file_path(file, :course_id => @course.id),:remote=>'true', :method => :post, :id=>"files_query_form_#{file.id}") do %> + onblur="commit_files_description('#files_query_form_<%= file.id %>','#file_description_edit_<%= file.id %>','#file_description_show_<%= file.id %>','#file_description_tip_<%= file.id %>');"><%= file.description %> <% end %>
    <% else %> @@ -105,7 +105,13 @@
    From ae84afe43efb163f013504434b4cae544f9888e5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 10 Nov 2016 17:16:54 +0800 Subject: [PATCH 51/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AEissue=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E5=92=8C=E7=BC=96=E8=BE=91issue=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=99=84=E4=BB=B6=E6=97=B6=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=8C=89=E9=92=AE=E4=B8=8D=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/upload.js.erb | 3 +++ app/views/issues/_form.html.erb | 3 ++- public/javascripts/attachments.js | 4 ++++ public/stylesheets/css/project.css | 15 +++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/views/attachments/upload.js.erb b/app/views/attachments/upload.js.erb index 62db5ebfd..7a0a195ad 100644 --- a/app/views/attachments/upload.js.erb +++ b/app/views/attachments/upload.js.erb @@ -1,3 +1,6 @@ +$('#issue_confirm').removeAttr("disabled"); +$('#issue_confirm').css('background-color', '#3b94d6'); +$('#issue_confirm').css('cursor','pointer'); var fileSpan = $('#attachments_<%= j params[:attachment_id] %>'); <% if(!@attachment.nil? && @attachment.new_record?) %> fileSpan.hide(); diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 649965b97..390d1d6f5 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -62,7 +62,8 @@ 取消 <% end %> - 保存 + +
      diff --git a/public/javascripts/attachments.js b/public/javascripts/attachments.js index 7c3e513f7..27d03ab0b 100644 --- a/public/javascripts/attachments.js +++ b/public/javascripts/attachments.js @@ -91,6 +91,10 @@ function addFile_board(inputEl, file, eagerUpload, id,btnId) { function addFile(inputEl, file, eagerUpload,btnId) { var attachments_frame = '#attachments_fields'; + // $("#issue_confirm").attr('href', '#'); + $('#issue_confirm').attr("disabled",true); + $('#issue_confirm').css('background-color','#c1c1c1'); + $('#issue_confirm').css('cursor','default'); if (true) { deleteallfiles = $(inputEl).data('deleteAllFiles'); var attachmentId = addFile.nextAttachmentId++; diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index 3096afbab..e82d524c7 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -704,6 +704,21 @@ a.sy_btn_blue{ -o-border-radius:3px; border-radius:3px; } +input.sy_btn_blue{ + display: inline-block; + color: #fff; + background: #3b94d6; + text-align: center; + font-size: 12px; + padding:0 15px; + height: 30px; + line-height: 30px; + -webkit-border-radius:3px; + -moz-border-radius:3px; + -o-border-radius:3px; + border-radius:3px; + cursor:pointer; +} a:hover.sy_btn_blue{ background: #2788d0;} a.hw_btn_blue{ display: inline-block; From 9bdc76b6e37bef00c23f470a5ac30f0ea48b57f8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 10 Nov 2016 17:34:58 +0800 Subject: [PATCH 52/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AEissue=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=E7=82=B9=E5=87=BB=E6=8C=87=E6=B4=BE?= =?UTF-8?q?=E7=BB=99=E8=B7=B3=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 4408f041b..5df730cdb 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -61,7 +61,7 @@
    • 指派给 - <%= @issue.assigned_to ? @issue.assigned_to.show_name : "--" %> + " class="c_blue" ><%= @issue.assigned_to ? @issue.assigned_to.show_name : "--" %>
    • <% end %> <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> From eb56a134d3eac44b469663c9b7dd279f739565c9 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 11 Nov 2016 09:28:10 +0800 Subject: [PATCH 53/96] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=B6=88=E6=81=AF=E6=94=B9=E4=B8=BA=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E5=8F=91=E9=80=81=E5=B9=B6=E4=B8=94=E5=8F=AA=E5=8F=91?= =?UTF-8?q?=E9=80=81=E7=BB=99=E5=AD=A6=E7=94=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/homework_common.rb | 52 +++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index 199566691..c87cd3d42 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -73,20 +73,50 @@ class HomeworkCommon < ActiveRecord::Base if self.homework_detail_manual.comment_status == 0 self.course_messages.destroy_all else - self.course.members.each do |m| - # if m.user_id != self.user_id - #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) - count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count - if count == 0 - ws = WechatService.new - name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name - ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") - end - # end - end + # self.course.members.each do |m| + # # if m.user_id != self.user_id + # #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) + # rolesids = [] + # m.roles.each do |role| + # rolesids << role.id + # end + # if rolesids.include?(10) + # count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count + # if count == 0 + # ws = WechatService.new + # name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name + # ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") + # end + # end + # # end + # end + self.delay.send_homework_wechat_message_delay end end end + + #作业微信通知delay + def send_homework_wechat_message_delay + self.course.members.each do |m| + # if m.user_id != self.user_id + #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) + rolesids = [] + m.roles.each do |role| + rolesids << role.id + end + if rolesids.include?(10) + count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count + if count == 0 + ws = WechatService.new + name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name + ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") + end + end + # end + end + end + + #动态的更新 def update_activity update_course_activity(self.class, self.id) From aab24ea34a64504019a938165fcbe6721be6ff40 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 10:37:20 +0800 Subject: [PATCH 54/96] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B6=E9=83=A8fork?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E9=94=99=E8=AF=AF=EF=BC=8C=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?fork=E8=BF=87=E8=AF=A5=E9=A1=B9=E7=9B=AE=E7=9A=84=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- app/helpers/application_helper.rb | 12 ++++++++++++ app/models/journals_for_message.rb | 2 +- app/views/projects/_applied_status.html.erb | 2 +- app/views/repositories/_forked_popbox.html.erb | 9 ++++++--- 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 107f2ff88..a2a78fd9d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -27,7 +27,7 @@ class ProjectsController < ApplicationController menu_item :feedback, :only => :feedback menu_item :share, :only => :share - before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_project, :forked_pop] + before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_project] before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course] before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches] before_filter :require_admin, :only => [ :copy, :unarchive, :destroy, :calendar] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c32f6c175..e8cb002a8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,6 +54,18 @@ module ApplicationHelper Project.find(forked_from_project_id) end + # 判断当前用户是否已经fork过当前项目 + # project: current_project + def has_forked_cur_project project + cur_user_projects = Project.where(:user_id => User.current.id) + if cur_user_projects.count == 0 + false + else + has_forked = cur_user_projects.select{|cur_user_project| cur_user_project.forked_from_project_id == project.id} + has_forked.length > 0 ? true : false + end + end + # 通过系统外部邮箱查找用户,如果用户不存在则用邮箱替换 def get_user_by_mail mail user = User.find_by_mail(mail) diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index 2a432d42f..4a9601d07 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -78,7 +78,7 @@ class JournalsForMessage < ActiveRecord::Base :act_as_principal_activity, :act_as_student_score after_create :reset_counters! #after_update :update_activity - after_destroy :reset_counters! + # after_destroy :reset_counters! after_save :be_user_score after_destroy :down_user_score, :down_course_score diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 17392f2c5..41bb08cbc 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -33,7 +33,7 @@
    -->
  • - <%= link_to "".html_safe+"Fork", {:controller => 'projects', :action => 'forked_pop'}, + <%= link_to "".html_safe+"Fork", forked_pop_project_path(@project), :class=>"pro_new_topbtn_left fl", :remote => true %> <%= @project.forked_count.to_i %>
  • diff --git a/app/views/repositories/_forked_popbox.html.erb b/app/views/repositories/_forked_popbox.html.erb index bb277e46f..a8c249b3a 100644 --- a/app/views/repositories/_forked_popbox.html.erb +++ b/app/views/repositories/_forked_popbox.html.erb @@ -7,14 +7,17 @@
    • - Fork将在后台执行
      平台将为您创建一个新的同名项目和版本库,请问是否继续? + <% if has_forked_cur_project(@project) %> + 您已经Fork过该项目,点击“确定”将会跳入您Fork的项目主页,请问是否继续? + <% else %> + Fork将在后台执行
      平台将为您创建一个新的同名项目和版本库,请问是否继续? + <% end %>
    • 取  消 - <%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, - :class=>"sy_btn_blue fl ml20", :onclick=>"hideModal();" %> + <%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
    From 14178b0f8f06c97cb2d54855887113ab05d61255 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 13:33:06 +0800 Subject: [PATCH 55/96] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E4=B8=AD=E6=88=90=E5=91=98=E5=88=97=E8=A1=A8=E7=94=A8=E6=88=B7?= =?UTF-8?q?url=E4=B8=BAID=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_org_members.html.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/organizations/_org_members.html.erb b/app/views/organizations/_org_members.html.erb index 343466362..18bbb94bb 100644 --- a/app/views/organizations/_org_members.html.erb +++ b/app/views/organizations/_org_members.html.erb @@ -10,11 +10,9 @@ <% members.each do |member| %>
    - - <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %> - + <%= member.user.nil? ? '' : (link_to image_tag(url_to_avatar(member.user), :width => 32, :height => 32), user_path(member.user), :class => "st_img") %> <%= l(:label_username)%> - <%= link_to(member.user.show_name, user_url_in_org(member.user_id),:class => "ml5 c_blue02") %>
    + <%= link_to(member.user.show_name, user_url_in_org(member.user),:class => "ml5 c_blue02") %>
    身份:<%= member.user.admin_of_org?(organization)?"组织管理员":"组织成员" %> <% if member.created_at %> <%= format_time(member.created_at) %> From a44170217ce2bb9c57190e8710b3ed18ec1ce741 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 13:37:50 +0800 Subject: [PATCH 56/96] =?UTF-8?q?=E7=BB=84=E7=BB=87=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E9=93=BE=E6=8E=A5=E4=B8=AD=E5=B8=A6=E7=94=A8?= =?UTF-8?q?=E6=88=B7ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_show_org_document.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index 5fa498c63..ca0993709 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -1,12 +1,12 @@
    - <%= link_to image_tag(url_to_avatar(User.find(document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(document.creator_id) %> + <%= link_to image_tag(url_to_avatar(User.find(document.creator)), :width => 45, :heigth => 45), user_url_in_org(document.creator) %> <%= render :partial => 'users/show_detail_info', :locals => {:user => User.find(document.creator_id)} %>
    - <%= link_to document.creator.show_name, user_url_in_org(document.creator.id), :class => "newsBlue mr15" %> + <%= link_to document.creator.show_name, user_url_in_org(document.creator), :class => "newsBlue mr15" %> TO  <%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %> | <%= document.org_subfield_id.nil? ? "组织文章" :"#{OrgSubfield.find(document.org_subfield_id).name}" %> From ae6821f2521a9dbaf0f4d63d719572d3aa2d350a Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 13:43:11 +0800 Subject: [PATCH 57/96] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD=E7=94=A8=E6=88=B7url=E4=B8=BAID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/organizations/_org_member_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/organizations/_org_member_list.html.erb b/app/views/organizations/_org_member_list.html.erb index fd9e50732..12add3d69 100644 --- a/app/views/organizations/_org_member_list.html.erb +++ b/app/views/organizations/_org_member_list.html.erb @@ -1,7 +1,7 @@ <% members.each do |member|%>
      <% username = User.find(member.user_id).realname.blank? ? User.find(member.user_id).login : User.find(member.user_id).realname %> - +
    • <%= get_org_member_role_name member %> <%= form_for(member, {:as => :org_member, :remote => true, :url => Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s, From 5742a9951e530fc334f4aae3219f438be23b5bd7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 11 Nov 2016 13:44:39 +0800 Subject: [PATCH 58/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE-=E9=85=8D=E7=BD=AE-?= =?UTF-8?q?=E6=88=90=E5=91=98=EF=BC=8C=E7=BF=BB=E9=A1=B5=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E9=A1=B5=E7=94=A8=E8=93=9D=E8=89=B2=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/members_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb index 58f270332..9dd0bed8c 100644 --- a/app/helpers/members_helper.rb +++ b/app/helpers/members_helper.rb @@ -39,7 +39,7 @@ module MembersHelper end principals = paginateHelper scope,10 s = content_tag('ul', project_member_check_box_tags_ex('membership[user_ids][]', principals), :class => 'mb5', :id => 'principals') - links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true){|text, parameters, options| + links = pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){|text, parameters, options| link_to text, autocomplete_project_memberships_path(project, parameters.merge(:q => params[:q],:flag => true, :format => 'js')), :remote => true } s + content_tag('ul', links,:class => 'wlist', :id => "course_member_pagination_links" ) From 42503fa6c60d733fc8b410e0fdefad8d80ba9f43 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 13:55:38 +0800 Subject: [PATCH 59/96] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=A4=A7=E7=BA=B2?= =?UTF-8?q?=E4=B8=AD=E7=94=A8=E6=88=B7url=E7=9A=84id=E6=94=B9=E6=88=90logi?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_news_contents.html.erb | 2 +- app/views/users/_news_replies.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_news_contents.html.erb b/app/views/users/_news_contents.html.erb index 8b07de887..7897abe83 100644 --- a/app/views/users/_news_contents.html.erb +++ b/app/views/users/_news_contents.html.erb @@ -1,5 +1,5 @@
      - <%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %> + <%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user), :class => "newsBlue mr10 f14" %> <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
      <% if !comment.parent.nil? %> diff --git a/app/views/users/_news_replies.html.erb b/app/views/users/_news_replies.html.erb index 0b5464946..50a2e192b 100644 --- a/app/views/users/_news_replies.html.erb +++ b/app/views/users/_news_replies.html.erb @@ -8,7 +8,7 @@
    • - <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %> + <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user) %>
      <%= render :partial => 'users/news_contents', :locals => {:comment => comment}%> From 846ef5f72c825ef3a88b74de688dc9d9d946802f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 14:03:09 +0800 Subject: [PATCH 60/96] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E7=94=A8=E6=88=B7id=E6=94=B9=E6=88=90login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/blogs/_article.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index e6136ecfa..8ddc3062d 100644 --- a/app/views/blogs/_article.html.erb +++ b/app/views/blogs/_article.html.erb @@ -21,9 +21,9 @@
      • <% if activity.parent_id.nil? %> - <%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl" %> + <%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=> activity.author, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl" %> <% else %> - <%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl"%> + <%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl"%> <% end %> <%# if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %> From 4d1d6506fe1d9b777aab7b0e63d0341e83203ca8 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 14:13:56 +0800 Subject: [PATCH 61/96] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=90=8E=E7=82=B9=E5=B7=A6=E4=BE=A7=E4=B8=AA=E4=BA=BA=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5url=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98=E5=8F=8A?= =?UTF-8?q?=E7=94=A8=E8=AF=BE=E7=A8=8B=E5=8A=A8=E6=80=81=E4=B8=ADurl?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E6=88=90login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_user_watch_btn.html.erb | 2 +- app/views/users/_course_create.html.erb | 6 +++--- app/views/users/_course_homework.html.erb | 4 ++-- app/views/users/_course_journalsformessage.html.erb | 4 ++-- app/views/users/_course_message.html.erb | 4 ++-- app/views/users/_course_news.html.erb | 4 ++-- app/views/users/_course_poll.html.erb | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/views/layouts/_user_watch_btn.html.erb b/app/views/layouts/_user_watch_btn.html.erb index da46154ee..0e0ae1e1f 100644 --- a/app/views/layouts/_user_watch_btn.html.erb +++ b/app/views/layouts/_user_watch_btn.html.erb @@ -2,7 +2,7 @@ <% if User.current.logged?%> <% if User.current == target%>
      • <%= link_to("个人资料", my_account_path, :class => "user_editinfo") %>
      • -
      • <%= link_to '个人主页', homepage_user_path(@user.login), :class => "user_editinfo", :target => '_blank' %>
      • +
      • <%= link_to '个人主页', homepage_user_path(@user), :class => "user_editinfo", :target => '_blank' %>
      • <% else%>
      • diff --git a/app/views/users/_course_create.html.erb b/app/views/users/_course_create.html.erb index 7cddd09a7..908929ff0 100644 --- a/app/views/users/_course_create.html.erb +++ b/app/views/users/_course_create.html.erb @@ -1,15 +1,15 @@
        - <%= link_to image_tag(url_to_avatar(activity.teacher), :width => "50", :height => "50"), user_path(activity.tea_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.teacher), :width => "50", :height => "50"), user_path(activity.teacher), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.teacher} %>
        <% if activity.try(:teacher).try(:realname) == ' ' %> - <%= link_to activity.try(:teacher), user_path(activity.tea_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:teacher), user_path(activity.teacher), :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:teacher).try(:realname), user_path(activity.tea_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:teacher).try(:realname), user_path(activity.teacher), :class => "newsBlue mr15" %> <% end %> TO <%=link_to activity.syllabus.title, syllabus_path(activity.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %> diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index f234a383a..7a5dd54f2 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -2,12 +2,12 @@
        - <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
        - <%= link_to activity.user.show_name, user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> + <%= link_to activity.user.show_name, user_path(activity.user,:host=>Setting.host_user), :class => "newsBlue mr15" %> TO <%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %> diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index c4bdedb11..805e4d654 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -1,12 +1,12 @@
        - <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
        - <%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.user.show_name, user_path(activity.user), :class => "newsBlue mr15" %> TO <% course=Course.find(activity.jour_id) %> <%=link_to course.syllabus.title, syllabus_path(course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %> diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index e92d7afcf..9b0d5ac32 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -1,12 +1,12 @@
        - <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author, :host => Setting.host_user), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
        - <%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %> + <%= link_to activity.author.show_name, user_path(activity.author, :host=>Setting.host_user), :class => "newsBlue mr15" %> TO <%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index b3bd6438a..a252a45da 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -1,12 +1,12 @@
        - <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
        - <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.author.show_name, user_path(activity.author), :class => "newsBlue mr15" %> TO <%=link_to activity.course.syllabus.title, syllabus_path(activity.course.syllabus_id), :class => 'newsBlue ml15', :target => '_blank' %> diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb index ca8b49cd3..94b22488c 100644 --- a/app/views/users/_course_poll.html.erb +++ b/app/views/users/_course_poll.html.erb @@ -5,15 +5,15 @@
        - <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
        <% if activity.try(:user).try(:realname) == ' ' %> - <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:user), user_path(activity.user), :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:user).try(:realname), user_path(activity.user), :class => "newsBlue mr15" %> <% end %> TO <% course = Course.find(activity.polls_group_id) %> From 50a14ad5fe70e4d6216dc833b7cf2bbace0add1b Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 14:26:58 +0800 Subject: [PATCH 62/96] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=95=B4=E6=95=B0=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 8f7939bb3..96f0c5c3b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -322,8 +322,9 @@ class User < Principal end # id 转换成 登录名 + # 如果是整数就去ID,否则就取login def to_param - self.login.to_i > 0 ? id : login + self.login.to_i.to_s == self.login ? id : login end From 629770a7030b19a698d7d86078c3007d32e83428 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 14:50:49 +0800 Subject: [PATCH 63/96] =?UTF-8?q?Issue=E6=8C=87=E6=B4=BE=E7=BB=99=E4=B8=BA?= =?UTF-8?q?0=E7=9A=84=E6=97=B6=E5=80=99=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20161111064007_update_assgin_to_id.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 db/migrate/20161111064007_update_assgin_to_id.rb diff --git a/db/migrate/20161111064007_update_assgin_to_id.rb b/db/migrate/20161111064007_update_assgin_to_id.rb new file mode 100644 index 000000000..1dceec312 --- /dev/null +++ b/db/migrate/20161111064007_update_assgin_to_id.rb @@ -0,0 +1,8 @@ +class UpdateAssginToId < ActiveRecord::Migration + def up + Issue.find_by_sql("update `issues` set assigned_to_id = null where assigned_to_id = 0;") + end + + def down + end +end From 1fdf6e20532487a64ce3b1a762a4a575b9d3f8e3 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 14:55:19 +0800 Subject: [PATCH 64/96] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E4=B8=AD=E4=B8=80=E4=BA=9B=E7=94=A8=E6=88=B7=E7=9A=84url?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=99=BB=E5=BD=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_project_issue.html.erb | 6 +++--- app/views/users/_project_message.html.erb | 4 ++-- app/views/users/_user_blog.html.erb | 8 ++++---- app/views/users/_user_journalsformessage.html.erb | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 8a860723e..e2cf4540c 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -2,15 +2,15 @@
        - <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
        <% if activity.try(:author).try(:realname) == ' ' %> - <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:author), user_path(activity.author), :class => "newsBlue mr15" %> <% else %> - <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author), :class => "newsBlue mr15" %> <% end %> TO <%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
        diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index e3e16605e..e57de6b6f 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -1,12 +1,12 @@
        - <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
        - <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.author.show_name, user_path(activity.author), :class => "newsBlue mr15" %> TO <%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%> diff --git a/app/views/users/_user_blog.html.erb b/app/views/users/_user_blog.html.erb index d2eb57b83..5b11d5436 100644 --- a/app/views/users/_user_blog.html.erb +++ b/app/views/users/_user_blog.html.erb @@ -1,18 +1,18 @@
        - <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
        - <%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %> + <%= link_to activity.author.show_name, user_path(activity.author), :class => "newsBlue mr15" %> TO - <%= link_to activity.author.name.to_s+" | 博客", user_blogs_path(:user_id=>activity.author_id), :class => "newsBlue ml15" %> + <%= link_to activity.author.name.to_s+" | 博客", user_blogs_path(:user_id=>activity.author), :class => "newsBlue ml15" %>
        - <%= link_to activity.title.to_s, user_blog_blog_comment_path(:user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id,:in_act => true), :class => "postGrey" %> + <%= link_to activity.title.to_s, user_blog_blog_comment_path(:user_id => activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id,:in_act => true), :class => "postGrey" %> <% if activity.locked%>       <% end%> diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb index 67fbbf494..a84ec8218 100644 --- a/app/views/users/_user_journalsformessage.html.erb +++ b/app/views/users/_user_journalsformessage.html.erb @@ -1,12 +1,12 @@
        - <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %> + <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user), :alt => "用户头像" %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
        - <%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %> + <%= link_to activity.user.show_name, user_path(activity.user), :class => "newsBlue mr15" %> TO <% if activity.jour %> <%= link_to activity.jour.show_name+"("+(activity.jour.login ? activity.jour.login : activity.jour.show_name ).to_s+")的"+ (activity.private == 1? "私信":"留言"), From e8f1a388ef4123efbf19321e5ec95b5e01e781a1 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 11 Nov 2016 15:20:07 +0800 Subject: [PATCH 65/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AEissue=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20161111071624_update_fixed_version_id.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 db/migrate/20161111071624_update_fixed_version_id.rb diff --git a/db/migrate/20161111071624_update_fixed_version_id.rb b/db/migrate/20161111071624_update_fixed_version_id.rb new file mode 100644 index 000000000..b2717ab31 --- /dev/null +++ b/db/migrate/20161111071624_update_fixed_version_id.rb @@ -0,0 +1,8 @@ +class UpdateFixedVersionId < ActiveRecord::Migration + def up + Issue.find_by_sql("update `issues` set fixed_version_id = null where fixed_version_id = 0;") + end + + def down + end +end From 766e4fcb1d51e6bda92931956a1832eeaece633f Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 15:35:18 +0800 Subject: [PATCH 66/96] =?UTF-8?q?=E4=B8=8A=E7=BA=BF=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20161111064007_update_assgin_to_id.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20161111064007_update_assgin_to_id.rb b/db/migrate/20161111064007_update_assgin_to_id.rb index 1dceec312..93a62ceca 100644 --- a/db/migrate/20161111064007_update_assgin_to_id.rb +++ b/db/migrate/20161111064007_update_assgin_to_id.rb @@ -1,6 +1,6 @@ class UpdateAssginToId < ActiveRecord::Migration def up - Issue.find_by_sql("update `issues` set assigned_to_id = null where assigned_to_id = 0;") + Issue.where(:assigned_to_id => 0).update_all(:assigned_to_id => nil) end def down From 65e59e31e06851c5e5cdd0d59bd1346dafdc6574 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 11 Nov 2016 15:39:13 +0800 Subject: [PATCH 67/96] =?UTF-8?q?Issue=E8=A1=A8fixed=5Fversion=5Fid?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20161111071624_update_fixed_version_id.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20161111071624_update_fixed_version_id.rb b/db/migrate/20161111071624_update_fixed_version_id.rb index b2717ab31..1b1363ecb 100644 --- a/db/migrate/20161111071624_update_fixed_version_id.rb +++ b/db/migrate/20161111071624_update_fixed_version_id.rb @@ -1,6 +1,6 @@ class UpdateFixedVersionId < ActiveRecord::Migration def up - Issue.find_by_sql("update `issues` set fixed_version_id = null where fixed_version_id = 0;") + Issue.where(:fixed_version_id => 0).update_all(:fixed_version_id => nil) end def down From 9136da7972c7bde9ab12dfeff505b20b386ccc47 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 11 Nov 2016 15:53:29 +0800 Subject: [PATCH 68/96] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/homework_common.rb | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index c87cd3d42..ae8cf3654 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -73,24 +73,24 @@ class HomeworkCommon < ActiveRecord::Base if self.homework_detail_manual.comment_status == 0 self.course_messages.destroy_all else - # self.course.members.each do |m| - # # if m.user_id != self.user_id - # #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) - # rolesids = [] - # m.roles.each do |role| - # rolesids << role.id - # end - # if rolesids.include?(10) - # count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count - # if count == 0 - # ws = WechatService.new - # name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name - # ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") - # end - # end - # # end - # end - self.delay.send_homework_wechat_message_delay + self.course.members.each do |m| + # if m.user_id != self.user_id + #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) + rolesids = [] + m.roles.each do |role| + rolesids << role.id + end + if rolesids.include?(10) + count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count + if count == 0 + ws = WechatService.new + name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name + ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") + end + end + # end + end + # self.delay.send_homework_wechat_message_delay end end end From 442fb8a531df33df59745c21781e89d7011f2aca Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 16:09:43 +0800 Subject: [PATCH 69/96] =?UTF-8?q?=E6=B7=BB=E5=8A=A0fork=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 4 +++- app/views/projects/_applied_status.html.erb | 2 +- app/views/projects/member_forked.html.erb | 20 +++++++++++++++++--- db/schema.rb | 14 ++++++++++---- public/stylesheets/css/project.css | 11 ++++++++++- 5 files changed, 41 insertions(+), 10 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a2a78fd9d..979f2d369 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -598,7 +598,9 @@ class ProjectsController < ApplicationController end def member_forked - @members_forked = User.find_by_sql("SELECT u.* FROM `projects` p,`users` u where p.user_id = u.id and p.forked_from_project_id = #{@project.id} ;") + @forked_projects = Project.where(:forked_from_project_id => @project.id) + + # @forked_members = User.find_by_sql("SELECT u.* FROM `projects` p,`users` u where p.user_id = u.id and p.forked_from_project_id = #{@project.id} ;") end def update_message_status(user, project) diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 41bb08cbc..ec64a08ae 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -19,7 +19,7 @@ <% if User.current.id != @project.user_id %>
      • - 已加入 + 已加入 <%= Member.where(:project_id => @project.id).count %>
      • <%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %> diff --git a/app/views/projects/member_forked.html.erb b/app/views/projects/member_forked.html.erb index 45f783f69..488952057 100644 --- a/app/views/projects/member_forked.html.erb +++ b/app/views/projects/member_forked.html.erb @@ -1,3 +1,17 @@ -<% @members_forked.each do |id| %> - <% %> -<% end %> \ No newline at end of file +
        +

        成员本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户

        +
          + <% @forked_projects.each do |project| %> +
        • + <%= link_to image_tag(url_to_avatar(project.owner), :width => "50", :height => "50"), user_path(project.owner), :alt => "用户头像", :class => "pro_new_users fl mr5" %> +
          + <%= link_to project.owner.try(:show_name), user_path(project.owner), :class => "pro_new_users mt5 fl" %> + / + <%= link_to project.name, project_path(project), :class => "pro_new_users mt5 fl" %> +
          + <%=h time_tag(project.created_on) %>前 +
          +
        • + <% end %> +
        +
        diff --git a/db/schema.rb b/db/schema.rb index 3bf495cd9..7a00237f6 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 => 20161028053000) do +ActiveRecord::Schema.define(:version => 20161111064007) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -325,14 +325,16 @@ ActiveRecord::Schema.define(:version => 20161028053000) do add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false + t.integer "repository_id", :null => false + t.string "revision", :null => false t.string "committer" - t.datetime "committed_on", :null => false + t.datetime "committed_on", :null => false t.text "comments" t.date "commit_date" t.string "scmid" t.integer "user_id" + t.integer "project_id" + t.integer "type", :default => 0 end add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" @@ -993,6 +995,10 @@ ActiveRecord::Schema.define(:version => 20161028053000) do t.datetime "updated_at", :null => false end + create_table "innodb_monitor", :id => false, :force => true do |t| + t.integer "a" + end + create_table "invite_lists", :force => true do |t| t.integer "project_id" t.integer "user_id" diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index e82d524c7..c400ea7c3 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -1029,4 +1029,13 @@ textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; co /* 课程大纲 */ .icons_tishi{ width: 110px; height: 110px;margin: 135px auto 20px;} -.sy_tab_con_p{ font-size: 16px;text-align: center; margin-bottom:100px; color:#888;} \ No newline at end of file +.sy_tab_con_p{ font-size: 16px;text-align: center; margin-bottom:100px; color:#888;} +/* 成员列表20161101byLB*/ +.pro_new_font{ font-weight: normal; color: #666; font-size: 12px;} +.pro_new_users_box{ margin:0 10px;} +.pro_new_users_box li{ width:25%; float: left; margin:10px 0;} +.pro_new_users{ } +a.pro_new_users { max-width:80px; overflow:hidden;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; word-break:break-all; display: inline-block; font-weight: bold; color: #666;} +a:hover.pro_new_users {color: #3b94d6} +.pro_new_users img{ width:40px;height:40px; border: 3px solid #fff;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;} +.pro_new_users img:hover{border: 3px solid #e6e6e6;} \ No newline at end of file From 92531ce487e9cd20a645b9ed04122c47f59c320a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 11 Nov 2016 16:35:26 +0800 Subject: [PATCH 70/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=80=E4=BB=8B?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/show.html.erb | 2 +- public/stylesheets/css/project.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 8fc960e3b..b32ec6a3a 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -1,5 +1,5 @@ -
        +
        <%= render :partial => 'projects/invite_code' %>
        <% if @project.description.blank? %>

        <%= @project.name %>

        diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index e82d524c7..e04e57e3e 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -895,7 +895,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;} /*项目简介*/ .pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;} .pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;} -.pro_new_info p{ padding:5px; color: #666;} +.pro_new_info p{ padding-bottom:2px; padding-left: 5px; color: #666; padding-right: 5px} .pro_new_info_weight{ font-size: 16px; font-weight: bold;} /* 新版项目配置*/ .pro_new_setting_leftnav{ width: 162px; border:1px solid #ddd; background-color:#fff; padding:3px; padding-bottom: 0;} From 0710ddb7d18b65a0a099045bce09573a3c709dc4 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 11 Nov 2016 16:41:38 +0800 Subject: [PATCH 71/96] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/homework_common.rb | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index ae8cf3654..c87cd3d42 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -73,24 +73,24 @@ class HomeworkCommon < ActiveRecord::Base if self.homework_detail_manual.comment_status == 0 self.course_messages.destroy_all else - self.course.members.each do |m| - # if m.user_id != self.user_id - #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) - rolesids = [] - m.roles.each do |role| - rolesids << role.id - end - if rolesids.include?(10) - count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count - if count == 0 - ws = WechatService.new - name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name - ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") - end - end - # end - end - # self.delay.send_homework_wechat_message_delay + # self.course.members.each do |m| + # # if m.user_id != self.user_id + # #self.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => self.course_id, :viewed => false) + # rolesids = [] + # m.roles.each do |role| + # rolesids << role.id + # end + # if rolesids.include?(10) + # count = ShieldWechatMessage.where("container_type='User' and container_id=#{m.user_id} and shield_type='Course' and shield_id=#{self.course_id}").count + # if count == 0 + # ws = WechatService.new + # name = self.course.syllabus.nil? ? self.course.name : self.course.syllabus.title+" • "+self.course.name + # ws.homework_message_notice(m.user_id, "homework", self.id, "#{m.user.show_name},#{l(:label_new_homework_template)}", name, "新作业:"+ self.name.html_safe, "作业内容请点击“详情”查看。") + # end + # end + # # end + # end + self.delay.send_homework_wechat_message_delay end end end From f41a36557ab83cb81e21e3848d69d15a5858ee82 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 16:45:43 +0800 Subject: [PATCH 72/96] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/versions/index.html.erb | 2 +- app/views/versions/new.js.erb | 5 +++-- app/views/versions/show.html.erb | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index 1201ed36e..494fcc916 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -1,4 +1,4 @@ - +
        diff --git a/app/views/versions/new.js.erb b/app/views/versions/new.js.erb index 437dae2ca..1f6832266 100644 --- a/app/views/versions/new.js.erb +++ b/app/views/versions/new.js.erb @@ -2,5 +2,6 @@ var htmlvalue = "<%= escape_javascript(render :partial => 'versions/new_mileston pop_box_new(htmlvalue,820,316); var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: 0, showOn: 'button', buttonImageOnly: true, buttonImage: '/images/public_icon.png', showButtonPanel: true, showWeek: true, showOtherMonths: true, selectOtherMonths: true}; $(function() { $('#version_index_create_name').datepicker(datepickerOptions); -// $('#evaluation_end_time').datepicker(datepickerOptions); -}); \ No newline at end of file + $('#version_index_create_name').datepicker(datepickerOptions); +}); + diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb index 8fd672a14..20544e957 100644 --- a/app/views/versions/show.html.erb +++ b/app/views/versions/show.html.erb @@ -1,3 +1,4 @@ +
        From a655e73c50e9401be93267265052586bd7a44c51 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 16:54:24 +0800 Subject: [PATCH 73/96] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E6=88=90?= =?UTF-8?q?=E5=91=98=E9=93=BE=E6=8E=A5=E6=94=B9=E6=88=90=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e8cb002a8..16bbe23e8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1025,7 +1025,7 @@ module ApplicationHelper def project_member_check_box_tags_ex name, principals s = '' principals.each do |principal| - s << "
      • #{ check_box_tag name, principal.id, false, :id => nil} #{h link_to principal.userInfo, user_url_in_org( principal.id)}
      • \n" + s << "
      • #{ check_box_tag name, principal.id, false, :id => nil} #{h link_to principal.userInfo, user_url_in_org( principal), :target => "_blank"}
      • \n" end s.html_safe end From 7298e983faf24a89fe37fab0d6a44f4defffe660 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Nov 2016 16:59:15 +0800 Subject: [PATCH 74/96] =?UTF-8?q?=E5=A6=82=E5=9B=BE=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=A4=A7=E7=BA=B2=E4=B8=AD=E2=80=9C=E5=8A=A0=E5=85=A5=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E2=80=9D=EF=BC=8C=E8=BE=93=E5=85=A5=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=82=80=E8=AF=B7=E7=A0=81=EF=BC=8C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E2=80=9C=E6=82=A8=E5=8A=A0=E5=85=A5=E7=9A=84=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E2=80=9D=E4=B8=8D=E5=90=88=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=BA=94=E8=AF=A5=E6=98=AF=E2=80=9C=E6=82=A8=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E7=9A=84=E9=82=80=E8=AF=B7=E7=A0=81=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/join_course_multi_role.js.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/join_course_multi_role.js.erb b/app/views/courses/join_course_multi_role.js.erb index 97d6b33ce..a4762d62b 100644 --- a/app/views/courses/join_course_multi_role.js.erb +++ b/app/views/courses/join_course_multi_role.js.erb @@ -15,7 +15,7 @@ alert("班级已过期\n请联系班级管理员重启班级。(在配置班级 alert("您已经加入了班级"); window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>" <% elsif @state == 4 %> -alert("您加入的班级不存在"); +alert("您输入的邀请码错误"); <% elsif @state == 5 %> alert("您还未登录"); <% elsif @state == 6 %> From 9113c93e49b7a864c9733e5314e14175a6c95a70 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 16:59:34 +0800 Subject: [PATCH 75/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=88=90=E5=91=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=82=B9=E5=87=BB=E8=B7=B3=E5=85=A5=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/settings/_new_members.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/settings/_new_members.html.erb b/app/views/projects/settings/_new_members.html.erb index 0da2cf817..520fcb6d7 100644 --- a/app/views/projects/settings/_new_members.html.erb +++ b/app/views/projects/settings/_new_members.html.erb @@ -70,7 +70,7 @@ <% members.each do |member| %> <%= i += 1 %> - <%= link_to member.principal.show_name, user_path(member.principal) %> + <%= link_to member.principal.show_name, user_path(member.principal), :target => "_blank" %> <% if User.current.language == "zh" %> From ec36b07aabd880e6797199b50dcd78f1806de182 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Nov 2016 17:05:47 +0800 Subject: [PATCH 76/96] =?UTF-8?q?=E5=88=86=E7=8F=AD=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=90=8E=EF=BC=8C=E5=A6=82=E5=9B=BE=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E5=B7=A6=E4=BE=A7=E5=AF=BC=E8=88=AA=E5=A4=84=E6=9C=AA?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/updategroupname.js.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/courses/updategroupname.js.erb b/app/views/courses/updategroupname.js.erb index 18fe909fb..e6449dfd1 100644 --- a/app/views/courses/updategroupname.js.erb +++ b/app/views/courses/updategroupname.js.erb @@ -2,4 +2,5 @@ * Created by Administrator on 2014/12/3. */ $("#st_groups").html("<%= escape_javascript( render :partial => 'new_groups_name', locals: {:course_groups => @course_groups})%>"); -$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>"); \ No newline at end of file +$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>"); +$("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>"); From d040d2efd1db59e90d493f56b4147d387f9ef63a Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 17:21:18 +0800 Subject: [PATCH 77/96] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=BF=94=E5=9B=9E=E4=B8=8A=E4=B8=80=E7=BA=A7=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_dir_list.html.erb | 28 ++++++++++++----------- db/schema.rb | 17 ++------------ 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/app/views/repositories/_dir_list.html.erb b/app/views/repositories/_dir_list.html.erb index c17154cbf..395bf2860 100644 --- a/app/views/repositories/_dir_list.html.erb +++ b/app/views/repositories/_dir_list.html.erb @@ -1,18 +1,20 @@
        - - - - - - - - + <% unless @path.blank? %> + + + + + + + + + <% end %> <%= render :partial => 'dir_list_content' %> diff --git a/db/schema.rb b/db/schema.rb index a97bb4b69..bb1f1bc1c 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 => 20161111070615) do +ActiveRecord::Schema.define(:version => 20161111081619) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -518,20 +518,6 @@ ActiveRecord::Schema.define(:version => 20161111070615) do t.integer "container_id", :default => 0 end - create_table "course_class_post", :id => false, :force => true do |t| - t.integer "班级id", :default => 0, :null => false - t.string "班级名" - t.integer "帖子id", :default => 0, :null => false - t.integer "主贴id" - t.string "帖子标题", :default => "", :null => false - t.text "帖子内容" - t.integer "帖子用户id" - t.integer "帖子回复数", :default => 0, :null => false - t.integer "最后回帖id" - t.datetime "发帖时间", :null => false - t.datetime "帖子更新时间", :null => false - end - create_table "course_contributor_scores", :force => true do |t| t.integer "course_id" t.integer "user_id" @@ -1876,6 +1862,7 @@ ActiveRecord::Schema.define(:version => 20161111070615) do t.integer "is_leader" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.integer "course_id" end add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id" From 4a266b33e6ca194acde04e277217cde4134ee3d9 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Nov 2016 17:26:38 +0800 Subject: [PATCH 78/96] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A4=BA=E4=BE=8B=EF=BC=8C=E5=B9=B6=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0=E7=8F=AD=E7=BA=A7=E7=9A=84=E8=AF=B4=E6=98=8Etip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/syllabuses/new.html.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/syllabuses/new.html.erb b/app/views/syllabuses/new.html.erb index db68f2268..c5fd72f7a 100644 --- a/app/views/syllabuses/new.html.erb +++ b/app/views/syllabuses/new.html.erb @@ -11,7 +11,10 @@
        -
      • 正确示例:软件工程错误示例:2016软件工程
      • +
      • 正确示例:错误示例:
      • +
      • 软件工程2016软件工程
      • +
      • 统计学原理统计学原理计算机系
      • +
      • 并行处理并行处理2016秋季A班
      • @@ -29,7 +32,7 @@

        - 课程是针对一个具体的学科方向开展的教学内容与进程安排。
        本质上,一门课程就是一个教学计划。 + 课程是针对一个具体的学科方向开展的教学内容与进程安排
        本质上,一门课程就是一个教学计划

        班级是实行教学任务的群体,创建班级后才能开展在线教学

        From 1ec010038694f521bc4971a2b70ac04082fd7cc3 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 11 Nov 2016 17:35:11 +0800 Subject: [PATCH 79/96] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=80=E4=BB=8B?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=EF=BC=8C=E5=B9=B6=E4=B8=94?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E7=BD=91=E9=A1=B5=E8=83=BD=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/show.html.erb | 13 +++++++++---- public/stylesheets/css/project.css | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index b32ec6a3a..f9a88baf8 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -1,11 +1,13 @@ -
        +
        <%= render :partial => 'projects/invite_code' %>
        +
        <% if @project.description.blank? %> -

        <%= @project.name %>

        +

        <%= @project.name %>

        <% else %> -

        <%=h @project.description.html_safe %>

        +

        <%=h @project.description.html_safe %>

        <% end %> +
        @@ -34,4 +36,7 @@
        <%= render :partial => "project_activities", :locals => {:forge_acts => @events_pages, :page => 0, :type => @type} %> - \ No newline at end of file + + \ No newline at end of file diff --git a/public/stylesheets/css/project.css b/public/stylesheets/css/project.css index 667c91863..ead88aef7 100644 --- a/public/stylesheets/css/project.css +++ b/public/stylesheets/css/project.css @@ -887,7 +887,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;} /*项目简介*/ .pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;} .pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;} -.pro_new_info p{ padding-bottom:2px; padding-left: 5px; color: #666; padding-right: 5px} +.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px} .pro_new_info_weight{ font-size: 16px; font-weight: bold;} /* 新版项目配置*/ .pro_new_setting_leftnav{ width: 162px; border:1px solid #ddd; background-color:#fff; padding:3px; padding-bottom: 0;} @@ -1030,4 +1030,4 @@ textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; co a.pro_new_users { max-width:80px; overflow:hidden;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; word-break:break-all; display: inline-block; font-weight: bold; color: #666;} a:hover.pro_new_users {color: #3b94d6} .pro_new_users img{ width:40px;height:40px; border: 3px solid #fff;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;} -.pro_new_users img:hover{border: 3px solid #e6e6e6;} +.pro_new_users img:hover{border: 3px solid #e6e6e6;} From e1c216ef8043c4e6d9c28d51c2004875da8deec8 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Nov 2016 17:38:19 +0800 Subject: [PATCH 80/96] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E9=97=AE=E5=8D=B7=E4=B8=8D=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_other_poll.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/poll/_other_poll.html.erb b/app/views/poll/_other_poll.html.erb index 8ceaf5112..3f5060010 100644 --- a/app/views/poll/_other_poll.html.erb +++ b/app/views/poll/_other_poll.html.erb @@ -17,8 +17,9 @@
      • <% end %> +

        - 导  入 + 导  入 取  消 <% end -%> @@ -38,6 +39,7 @@ closeModal(); }else{ $('#error_show').html('您没有选择任何问卷'); + $('#error_show').show(); } } \ No newline at end of file From 7e762a42ed055db6fc2a885ef67f0380cb441c38 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 11 Nov 2016 17:50:42 +0800 Subject: [PATCH 81/96] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E9=83=A8=E5=88=86url=E7=9A=84id=E6=94=B9=E6=88=90=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_comment_reply_detail.html.erb | 4 ++-- app/views/users/_message_contents.html.erb | 2 +- app/views/users/_message_replies.html.erb | 2 +- app/views/users/_project_issue_reply.html.erb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/users/_comment_reply_detail.html.erb b/app/views/users/_comment_reply_detail.html.erb index 3c9f3d279..7ff26adc9 100644 --- a/app/views/users/_comment_reply_detail.html.erb +++ b/app/views/users/_comment_reply_detail.html.erb @@ -1,8 +1,8 @@
        -<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %> +<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user), :alt => "用户头像" %>
        - <%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %> + <%= link_to comment.creator_user.show_name, user_path(comment.creator_user), :class => "content-username" %> <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
        <% if comment.class == Journal %> diff --git a/app/views/users/_message_contents.html.erb b/app/views/users/_message_contents.html.erb index 7aecc354b..cc333fb71 100644 --- a/app/views/users/_message_contents.html.erb +++ b/app/views/users/_message_contents.html.erb @@ -1,5 +1,5 @@
        - <%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %> + <%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user), :class => "newsBlue mr10 f14" %> <%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
        <% if !comment.parent.nil? && !comment.parent.parent.nil? %> diff --git a/app/views/users/_message_replies.html.erb b/app/views/users/_message_replies.html.erb index ce1e70887..9dc14c3aa 100644 --- a/app/views/users/_message_replies.html.erb +++ b/app/views/users/_message_replies.html.erb @@ -8,7 +8,7 @@
      • - <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %> + <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user) %>
        <%= render :partial => 'users/message_contents', :locals => {:comment => comment}%> diff --git a/app/views/users/_project_issue_reply.html.erb b/app/views/users/_project_issue_reply.html.erb index fb2fc214e..6b16b3411 100644 --- a/app/views/users/_project_issue_reply.html.erb +++ b/app/views/users/_project_issue_reply.html.erb @@ -10,7 +10,7 @@ <% end %>
        -
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
        +
        <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author), :alt => "用户头像" %>
        <% if User.current.logged? %>
        From c352fb56042f0306828548e45412fdcdad898840 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 11 Nov 2016 17:55:25 +0800 Subject: [PATCH 82/96] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E5=88=A0=E9=99=A4=E5=92=8C=E7=BC=96=E8=BE=91=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9A=84=E5=AF=B9=E9=BD=90=E6=98=BE=E7=A4=BA=E3=80=81?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AD=A6=E7=94=9F=E6=97=B6=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=A4=B4=E9=83=A8=E7=9A=84=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_new_member_list.html.erb | 11 ++++++++--- app/views/courses/delete_member.js.erb | 1 + public/stylesheets/css/common.css | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/views/courses/_new_member_list.html.erb b/app/views/courses/_new_member_list.html.erb index d04e14cc8..796d4ae92 100644 --- a/app/views/courses/_new_member_list.html.erb +++ b/app/views/courses/_new_member_list.html.erb @@ -1,6 +1,6 @@ <% is_teacher = User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %> <% if members.any? %> -
      • - - - 返回上级目录 - -
        + + + 返回上级目录 + +
        +
        @@ -123,7 +123,7 @@ <%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id, :group_id => @group && @group != -1 ? @group.id : -1},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
        - +
        <%= select( :name,:group_id, course_group_option(@course), { :include_blank => false,:selected => member.course_group_id}, @@ -136,7 +136,7 @@ <% if is_teacher %> <% end %> @@ -159,6 +159,11 @@
        序号 - +