From 3476731b83a418fa31153866e64245a6ecb16554 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Wed, 9 Dec 2015 09:59:13 +0800
Subject: [PATCH 01/66] =?UTF-8?q?=E5=B0=86at=20js=20data=E6=95=B4=E5=90=88?=
=?UTF-8?q?=E5=88=B0=E6=96=87=E4=BB=B6=E4=B8=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/at_controller.rb | 25 +++++++++++++++++++++++
app/controllers/issues_controller.rb | 29 ++++++++++-----------------
app/helpers/application_helper.rb | 10 +--------
app/views/at/show.js.erb | 8 ++++++++
app/views/issues/show.html.erb | 2 +-
config/routes.rb | 3 ++-
public/assets/kindeditor/at/config.js | 5 ++---
7 files changed, 50 insertions(+), 32 deletions(-)
create mode 100644 app/controllers/at_controller.rb
create mode 100644 app/views/at/show.js.erb
diff --git a/app/controllers/at_controller.rb b/app/controllers/at_controller.rb
new file mode 100644
index 000000000..92506d4e8
--- /dev/null
+++ b/app/controllers/at_controller.rb
@@ -0,0 +1,25 @@
+#coding=utf-8
+
+class AtController < ApplicationController
+ respond_to :js
+
+ def show
+ type = params[:type]
+ case type
+ when "Issue"
+ @users = find_issue(params)
+ else
+ end
+ end
+
+ private
+ def find_issue(params)
+ #1. issues list persons
+ #2. project persons
+ issue = Issue.find(params[:id])
+ journals = issue.journals
+ at_persons = journals.map(&:user) + issue.project.users
+ at_persons.uniq{|u| u.id}.delete_if{|u| u.id == User.current.id}
+ end
+
+end
\ No newline at end of file
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 7cdc838e2..6f441c29a 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -142,24 +142,17 @@ class IssuesController < ApplicationController
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
- #id name email
- #1. issues list persons
- #2. project persons
- @at_persons = @journals.map(&:user) + @issue.project.users
- @at_persons = @at_persons.uniq{|u| u.id}.delete_if{|u| u.id == User.current.id}
- @at_persons = nil
-
- respond_to do |format|``
- format.html {
- retrieve_previous_and_next_issue_ids
- render :template => 'issues/show', :layout => @project_base_tag#by young
- }
- format.api
- format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
- format.pdf {
- pdf = issue_to_pdf(@issue, :journals => @journals)
- send_data(pdf, :type => 'application/pdf', :filename => filename_for_content_disposition("#{@project.identifier}-#{@issue.id}.pdf") )
- }
+ respond_to do |format|
+ format.html {
+ retrieve_previous_and_next_issue_ids
+ render :template => 'issues/show', :layout => @project_base_tag#by young
+ }
+ format.api
+ format.atom { render :template => 'journals/index', :layout => false, :content_type => 'application/atom+xml' }
+ format.pdf {
+ pdf = issue_to_pdf(@issue, :journals => @journals)
+ send_data(pdf, :type => 'application/pdf', :filename => filename_for_content_disposition("#{@project.identifier}-#{@issue.id}.pdf") )
+ }
end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index ba8fe4f53..227de930f 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -2624,15 +2624,7 @@ int main(int argc, char** argv){
opt = {enable_at: true, prettify: false, init_activity: false}.merge default_opt
ss = ''
if opt[:enable_at]
- ss = '"
+ ss += %Q||
end
ss += javascript_include_tag("/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg')
diff --git a/app/views/at/show.js.erb b/app/views/at/show.js.erb
new file mode 100644
index 000000000..df253f237
--- /dev/null
+++ b/app/views/at/show.js.erb
@@ -0,0 +1,8 @@
+(function(){
+ window.atPersonLists = [];
+ <% @users && @users.each_with_index do |person,index| %>
+ var o = {id: <%=index%>, name: '<%=person.show_name%>', login: '<%=person.login%>', searchKey: '<%=person.get_at_show_name%>'};
+ atPersonLists.push(o);
+ <% end %>
+
+})();
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index 80d3aaac1..67d1186c4 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -1,5 +1,5 @@
<%= content_for(:header_tags) do %>
-<%= import_ke(enable_at: true) %>
+<%= import_ke(enable_at: {id: @issue.id, type: 'Issue'}) %>
<% end %>
diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb
index 44f3e5a64..b7cc1a0c2 100644
--- a/app/views/memos/show.html.erb
+++ b/app/views/memos/show.html.erb
@@ -34,7 +34,7 @@
}
}
$(function() {
- init_activity_KindEditor_data(<%= @memo.id%>,null,"87%");
+ init_activity_KindEditor_data(<%= @memo.id%>,null,"87%", "<%=@memo.class.to_s%>");
});
function del_confirm(){
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index 0f39b73d2..e06c04775 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -27,7 +27,7 @@
}
}
$(function() {
- init_activity_KindEditor_data(<%= @topic.id%>,null,"85%");
+ init_activity_KindEditor_data(<%= @topic.id%>,null,"85%", "<%=@topic.class.to_s%>");
showNormalImage('message_description_<%= @topic.id %>');
});
diff --git a/app/views/messages/quote.js.erb b/app/views/messages/quote.js.erb
index eee820c61..b0e8ecb85 100644
--- a/app/views/messages/quote.js.erb
+++ b/app/views/messages/quote.js.erb
@@ -11,7 +11,7 @@ if($("#reply_message_<%= @message.id%>").length > 0) {
$(function(){
$('#reply_subject').val("<%= raw escape_javascript(@subject) %>");
$('#quote_quote').val("<%= raw escape_javascript(@temp.content.html_safe) %>");
- init_activity_KindEditor_data(<%= @message.id%>,null,"85%");
+ init_activity_KindEditor_data(<%= @message.id%>,null,"85%", "<%=@message.class.to_s%>");
});
}else if($("#reply_to_message_<%= @message.id%>").length >0) {
$("#reply_to_message_<%= @message.id%>").replaceWith("
");
diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb
index ac80de3b4..518479344 100644
--- a/app/views/messages/reply.js.erb
+++ b/app/views/messages/reply.js.erb
@@ -3,4 +3,4 @@
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
<%end%>
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
\ No newline at end of file
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
\ No newline at end of file
diff --git a/app/views/org_document_comments/_reply_form.html.erb b/app/views/org_document_comments/_reply_form.html.erb
index 7871b910d..8808ff8b7 100644
--- a/app/views/org_document_comments/_reply_form.html.erb
+++ b/app/views/org_document_comments/_reply_form.html.erb
@@ -1,2 +1,2 @@
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
diff --git a/app/views/org_document_comments/add_reply.js.erb b/app/views/org_document_comments/add_reply.js.erb
index 40ed2eeb2..84f8c1f83 100644
--- a/app/views/org_document_comments/add_reply.js.erb
+++ b/app/views/org_document_comments/add_reply.js.erb
@@ -1,3 +1,3 @@
$("#organization_document_<%= @act.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document, :act => @act}) %>");
-init_activity_KindEditor_data(<%= @act.id %>,"","87%");
\ No newline at end of file
+init_activity_KindEditor_data(<%= @act.id %>,"","87%", "<%=@act.class.to_s%>");
\ No newline at end of file
diff --git a/app/views/org_document_comments/index.html.erb b/app/views/org_document_comments/index.html.erb
index 331e61bfd..ddbb6bf9c 100644
--- a/app/views/org_document_comments/index.html.erb
+++ b/app/views/org_document_comments/index.html.erb
@@ -19,7 +19,7 @@
<% @documents.each do |document| %>
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document, :act => OrgActivity.where("org_act_type='OrgDocumentComment'and org_act_id=?", document.id).first} %>
diff --git a/app/views/org_document_comments/quote.js.erb b/app/views/org_document_comments/quote.js.erb
index a71b23f0e..7ea5daf7b 100644
--- a/app/views/org_document_comments/quote.js.erb
+++ b/app/views/org_document_comments/quote.js.erb
@@ -3,7 +3,7 @@ if($("#reply_message_<%= @org_comment.id%>").length > 0) {
$(function(){
$('#reply_subject').val("<%= raw escape_javascript(@subject) %>");
$('#quote_quote').val("<%= raw escape_javascript(@temp.content.html_safe) %>");
- init_activity_KindEditor_data(<%= @org_comment.id%>,null,"85%");
+ init_activity_KindEditor_data(<%= @org_comment.id%>,null,"85%", "<%=@org_comment.class.to_s%>");
});
}else if($("#reply_to_message_<%= @org_comment.id %>").length >0) {
$("#reply_to_message_<%= @org_comment.id%>").replaceWith("");
diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb
index 1b1eca418..3a50e5faa 100644
--- a/app/views/org_document_comments/show.html.erb
+++ b/app/views/org_document_comments/show.html.erb
@@ -5,7 +5,7 @@
diff --git a/app/views/organizations/_org_activities.html.erb b/app/views/organizations/_org_activities.html.erb
index 33ac13e76..8f9acbc7b 100644
--- a/app/views/organizations/_org_activities.html.erb
+++ b/app/views/organizations/_org_activities.html.erb
@@ -2,7 +2,7 @@
<% org_activities.each do |act| %>
<% if act.container_type == 'Organization' %>
diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb
index 7200761a3..9d62dd1f9 100644
--- a/app/views/organizations/show.html.erb
+++ b/app/views/organizations/show.html.erb
@@ -59,7 +59,7 @@
<% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 %>
<% act = OrgActivity.where("org_act_type = 'OrgDocumentComment' and org_act_id =?", @organization.home_id).first %>
diff --git a/app/views/student_work/forbidden_anonymous_comment.js.erb b/app/views/student_work/forbidden_anonymous_comment.js.erb
index a72c29509..47dfb4b51 100644
--- a/app/views/student_work/forbidden_anonymous_comment.js.erb
+++ b/app/views/student_work/forbidden_anonymous_comment.js.erb
@@ -1,7 +1,7 @@
<% if @user_activity_id == -1 %>
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => "users/user_homework_detail",:locals => {:homework_common => @homework, :is_in_course => @is_in_course})%>");
-init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@homework.class.to_s%>");
<% else %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@course_activity}) %>");
-init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
<% end %>
\ No newline at end of file
diff --git a/app/views/student_work/set_score_rule.js.erb b/app/views/student_work/set_score_rule.js.erb
index ff3a0e7ed..180f04faa 100644
--- a/app/views/student_work/set_score_rule.js.erb
+++ b/app/views/student_work/set_score_rule.js.erb
@@ -1,8 +1,8 @@
clickCanel();
<% if @user_activity_id %>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id}) %>");
- init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
+ init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
<% else %>
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework,:is_in_course => @is_in_course}) %>");
- init_activity_KindEditor_data(<%= @homework.id%>,"","87%");
+ init_activity_KindEditor_data(<%= @homework.id%>,"","87%", "<%=@homework.class.to_s%>");
<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 4f1d3a5d8..557b9e9ee 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -1,12 +1,12 @@
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
+ <%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<% end %>
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
+ <%= javascript_include_tag "init_KindEditor" %>
<% end %>
\ No newline at end of file
+
+<% end %>
\ No newline at end of file
From 85bc9ce43d4a6a02bfef40cc317fc7adbd89c03e Mon Sep 17 00:00:00 2001
From: ouyangxuhua
Date: Fri, 18 Dec 2015 14:30:25 +0800
Subject: [PATCH 28/66] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BB=84=E7=BB=87?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E4=B8=80=E4=BA=9Bbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/_upload_subfield_file.html.erb | 2 +-
app/views/org_document_comments/edit.html.erb | 2 +-
app/views/organizations/_join_course_menu.html.erb | 8 ++++----
app/views/organizations/_join_project_menu.html.erb | 8 ++++----
app/views/organizations/_org_members.html.erb | 2 +-
app/views/organizations/join_course_menu.js.erb | 2 +-
app/views/organizations/join_courses.js.erb | 11 ++++++-----
app/views/organizations/join_project_menu.js.erb | 2 +-
app/views/organizations/join_projects.js.erb | 11 ++++++-----
9 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/app/views/files/_upload_subfield_file.html.erb b/app/views/files/_upload_subfield_file.html.erb
index 7137e14e7..33e4ce97c 100644
--- a/app/views/files/_upload_subfield_file.html.erb
+++ b/app/views/files/_upload_subfield_file.html.erb
@@ -9,7 +9,7 @@
<%= form_tag(org_subfield_files_path(org_subfield, :in_org => params[:in_org]), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
<% if params[:in_org] %>
- <% count=course.journals_for_messages.where('m_parent_id IS NULL').count %>
+ <% count = fetch_user_leaveWord_reply(activity).count %>
@@ -47,7 +47,7 @@
<% if count > 0 %>
- <% course.journals_for_messages.where('m_parent_id IS NULL').reorder("created_on desc").each do |comment| %>
+ <% fetch_user_leaveWord_reply(activity).each do |comment| unless fetch_user_leaveWord_reply(activity).nil? %>
-
-
- <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.user_id), :alt => "用户头像" %>
-
-
-
- <% if reply.try(:user).try(:realname) == ' ' %>
- <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
- <% else %>
- <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
- <% end %>
- <%= l(:label_reply_to)%>
- <% if comment.try(:user).try(:realname) == ' ' %>
- <%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14 ml10" %>
- <% else %>
- <%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14 ml10" %>
- <% end %>
- <%= format_time reply.created_on %>
-
-
- <%= reply.notes.html_safe %>
-
-
-
-
- <% end %>
- <% end %>
+ <%= comment.notes.html_safe %>
+
+ <% end %>
<% end %>
From c38191eb424e722182bda8eeb24a28aa3977004a Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Fri, 18 Dec 2015 16:25:14 +0800
Subject: [PATCH 37/66] =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=9B=9E=E5=A4=8Dat?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/issues/_list.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb
index 115a70e7a..fd6171f18 100644
--- a/app/views/issues/_list.html.erb
+++ b/app/views/issues/_list.html.erb
@@ -18,7 +18,7 @@
}
$(function () {
- init_activity_KindEditor_data(<%= issue.id%>, null, "87%");
+ init_activity_KindEditor_data(<%= issue.id%>, null, "87%", "<%= issue.class.name %>");
showNormalImage('activity_description_<%= issue.id %>');
if ($("#intro_content_<%= issue.id %>").height() > 360) {
$("#intro_content_show_<%= issue.id %>").show();
From 71a0802a498eddab43add025663b40fa4458ae09 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Fri, 18 Dec 2015 16:46:35 +0800
Subject: [PATCH 38/66] =?UTF-8?q?at=E5=90=8E=E5=AD=97=E4=BD=93=E6=94=B9?=
=?UTF-8?q?=E8=89=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/assets/kindeditor/kindeditor.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 6f8e489f8..bd7c7ec35 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -260,7 +260,7 @@ K.options = {
bodyClass : 'ke-content',
indentChar : '\t',
cssPath : K.basePath +'plugins/code/previewcode.css',
- cssData : '',
+ cssData : 'font{color:#7d7d7d;}',
minWidth : 650,
minHeight : 100,
minChangeSize : 1,
From d0e139650f9a60846c0b93925edd564e0cbdaf33 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Fri, 18 Dec 2015 16:50:44 +0800
Subject: [PATCH 39/66] =?UTF-8?q?issue=E5=9B=9E=E5=A4=8D=E7=9A=84at?=
=?UTF-8?q?=E5=87=BA=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/issues/show.html.erb | 4 ++--
public/javascripts/create_kindeditor.js | 8 ++++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index c832c884f..4af757c77 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -1,9 +1,9 @@
<%= content_for(:header_tags) do %>
- <%= import_ke(enable_at: false) %>
+ <%= import_ke(enable_at: true) %>
<%= javascript_include_tag 'create_kindeditor'%>
<% end %>
From 4dda355d2efbec6df3f8a10c6b01794d6134814a Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 18 Dec 2015 18:28:20 +0800
Subject: [PATCH 48/66] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/project_score_helper.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/helpers/project_score_helper.rb b/app/helpers/project_score_helper.rb
index 4049cdd76..67cb41234 100644
--- a/app/helpers/project_score_helper.rb
+++ b/app/helpers/project_score_helper.rb
@@ -22,10 +22,10 @@ module ProjectScoreHelper
#代码提交数量
def changesets_num project
- # g = Gitlab.client
- # project.gpid.nil? ? 0 : g.commits_total_count(project.gpid)
+ g = Gitlab.client
+ project.gpid.nil? ? 0 : g.commits_total_count(project.gpid)
# commits_total_count(project.gpid)
- project.changesets.count
+ # project.changesets.count
end
#讨论区帖子数量
From 6a563d4256956301893c0c0091887354fca3c2f8 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 18 Dec 2015 18:47:36 +0800
Subject: [PATCH 49/66] =?UTF-8?q?=E5=8C=BF=E8=AF=84=E7=BB=93=E6=9D=9F?=
=?UTF-8?q?=E5=90=8E=E4=B8=8D=E5=8F=AF=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E7=9A=84=E6=88=AA=E6=AD=A2=E6=97=A5=E6=9C=9F=EF=BC=8C=E4=BD=9C?=
=?UTF-8?q?=E4=B8=9A=E5=8F=91=E5=B8=83=E5=90=8E=E4=B8=8D=E5=8F=AF=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E4=BD=9C=E4=B8=9A=E7=9A=84=E5=8F=91=E5=B8=83=E6=97=A5?=
=?UTF-8?q?=E6=9C=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_homework_form.html.erb | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb
index 265118def..a060cf386 100644
--- a/app/views/users/_user_homework_form.html.erb
+++ b/app/views/users/_user_homework_form.html.erb
@@ -26,14 +26,18 @@
<% end %>
- <%= calendar_for('homework_end_time')%>
+ <% if homework.homework_detail_manual.comment_status.to_i < 3 %>
+ <%= calendar_for('homework_end_time')%>
+ <% end %>
<% if edit_mode %>
<% end %>
- <%= calendar_for('homework_publish_time')%>
+ <% if homework.homework_detail_manual.comment_status.to_i == 0 %>
+ <%= calendar_for('homework_publish_time')%>
+ <% end %>