Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
9184dddb5e
|
@ -73,7 +73,7 @@ class JournalsController < ApplicationController
|
|||
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
||||
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n"
|
||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n ") + "\n"
|
||||
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content << "</blockquote>"
|
||||
@content = "<blockquote style='padding-left:0px;margin-left:0px;'>" << @content << "</blockquote>\n\n<br/>"
|
||||
@id = user.id
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'talk_edit fr' if User.current.allowed_to?(:add_issues, @project) %>
|
||||
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %>
|
||||
<%= link_to l(:button_edit), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("all_attributes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:edit_issues, @project) %>
|
||||
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %>
|
||||
<%= link_to l(:label_user_newfeedback), edit_issue_path(@issue.id), :onclick => 'showAndScrollTo("update", "issue_journal_kind_reply"); return false;', :class => 'talk_edit fr', :accesskey => accesskey(:edit) if @issue.editable? && User.current.allowed_to?(:add_issue_notes, @project) %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||
<%= error_messages_for 'issue', 'time_entry' %>
|
||||
<%= render :partial => 'conflict' if @conflict %>
|
||||
|
@ -19,7 +20,7 @@
|
|||
</div>
|
||||
<input name="issue_quote_new" type="hidden" value="<%= %>" />
|
||||
<fieldset><legend>回复</legend>
|
||||
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
|
||||
<%= f.kindeditor :notes, :style => "width:99%;",:height=>'100px', :cssData =>"blockquote { padding:0px}", :rows => "5", :no_label => true, :editor_id=>'issue_journal_kind_reply' %>
|
||||
</fieldset>
|
||||
<!--<%# if @issue.safe_attribute? 'private_notes' %>-->
|
||||
<!--<label for="issue_private_notes"><%#= f.check_box :private_notes, :no_label => true %> <%#= l(:field_private_notes) %></label>-->
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<p>
|
||||
<% if journal.details.any? %>
|
||||
<% details_to_strings(journal.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<p><%= string.html_safe %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<!--编辑、引用、回复按钮-->
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
</div>
|
||||
<p style="padding-top: 5px"></p>
|
||||
<%#--引用时不能修改,剥离出引用内容--%>
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();issue_journal_kind_reply.sync();$('#issue-form').submit();">
|
||||
<%= l(:button_submit) %>
|
||||
</a>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$('#issue_notes').val("<%= raw escape_javascript(@content) %>");
|
||||
issue_journal_kind_reply.html("<%= raw escape_javascript(@content) %>");
|
||||
<%
|
||||
# when quoting a private journal, check the private checkbox
|
||||
if @journal && @journal.private_notes?
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
:id => act.id},
|
||||
:class => "problem_tit fl fb " %>
|
||||
</a><br />
|
||||
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
||||
<p class="mt5 break_word"><%= act.description.html_safe %><br />
|
||||
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"),
|
||||
{:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"}, :class => "problem_tit fl fb" %>
|
||||
</a><br />
|
||||
<p class="mt5 break_word"><%= textilizable act,:notes %><br />
|
||||
<p class="mt5 break_word"><%= act.notes.html_safe %><br />
|
||||
<%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -118,44 +118,39 @@
|
|||
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubTypeHomework fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotReadHomework fl":"homepageNewsTypeHomework fl" %>">发布了作业于课程:<%= ma.course_message.course.name %></span>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业:</span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl" style="width:315px;"><a href="javascript:void(0);" class="newsGrey">
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
<p><%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:</p>
|
||||
<p>课程名称:<%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
||||
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></p>
|
||||
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></p>
|
||||
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
|
||||
<p>
|
||||
请同学们抓紧时间提交自己的作品,谢谢!
|
||||
请抓紧时间提交自己的作品,谢谢!
|
||||
</p>
|
||||
<% else %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!
|
||||
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
|
||||
</p>
|
||||
<p>课程名称:<%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
|
||||
<p>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></p>
|
||||
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %> 24点</span></p>
|
||||
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %> 24点</span></p>
|
||||
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %> 24点</span></p>
|
||||
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
|
||||
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
|
||||
<p>
|
||||
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
||||
</p>
|
||||
|
@ -168,59 +163,62 @@
|
|||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
||||
<% if ma.viewed == 0 %>
|
||||
<li class="homepageHomeworkContent fl">
|
||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p>
|
||||
请同学们抓紧时间提交自己的作品,谢谢!
|
||||
</p>
|
||||
<% else %>
|
||||
<p>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业,详情如下:</p>
|
||||
<p><strong>课程:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
<% unless ma.course_message.description.blank? %>
|
||||
<div class="fl"><strong>作业内容:</strong></div>
|
||||
<div class="ml60"><%= ma.course_message.description.html_safe %></div>
|
||||
<% end %>
|
||||
<p><strong>作业提交截止日期:</strong><%= ma.course_message.end_time %></p>
|
||||
<p><strong>匿评自动开始日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %></p>
|
||||
<p><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %></p>
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分</p>
|
||||
<p>
|
||||
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
||||
<% else %>
|
||||
<li class="homepageNewsContent fl">
|
||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))"%>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<%= ma.course_message.name %>
|
||||
</div>
|
||||
<% end %>
|
||||
<li class="homepageHomeworkContent fl">
|
||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:onmouseover => "message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))" %>
|
||||
</li>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>同学您好!
|
||||
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
|
||||
</p>
|
||||
|
||||
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
|
||||
|
||||
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
|
||||
|
||||
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp; 24点</span></p>
|
||||
|
||||
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>
|
||||
@nbsp;@nbsp;24点</span></p>
|
||||
|
||||
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
|
||||
|
||||
<p>
|
||||
请同学们抓紧时间提交自己的作品,谢谢!
|
||||
</p>
|
||||
<% else %>
|
||||
<p><%= User.current.lastname + User.current.firstname %>您好!
|
||||
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>
|
||||
老师发布的作业截止日期快到了:</p>
|
||||
|
||||
<p><strong>课程名称:</strong><%= ma.course_message.course.name %>
|
||||
(<%= ma.course_message.course.term %>)</p>
|
||||
|
||||
<p><strong>作业标题:</strong><%= ma.course_message.name %></p>
|
||||
|
||||
<p><strong>提交截止:</strong><%= ma.course_message.end_time %>@nbsp;@nbsp;24点</p>
|
||||
|
||||
<p><strong>匿评开始:</strong><%= ma.course_message.homework_detail_manual.evaluation_start %>
|
||||
@nbsp;@nbsp;24点</p>
|
||||
|
||||
<p><strong>匿评关闭:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %>
|
||||
@nbsp;@nbsp;24点</p>
|
||||
|
||||
<p><strong>迟交扣分:</strong><%= ma.course_message.late_penalty %>分</p>
|
||||
|
||||
<p><strong>缺评扣分:</strong><%= ma.course_message.homework_detail_manual.absence_penalty %>分
|
||||
</p>
|
||||
|
||||
<p>
|
||||
您可以修改作业内容、评分规则、匿评过程等,谢谢!
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
@ -368,7 +366,7 @@
|
|||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<% if ma.course_message.reviewer_role == 3 %>
|
||||
匿名用户
|
||||
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
|
||||
<% else %>
|
||||
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
|
||||
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
|
|
|
@ -370,7 +370,9 @@ $(document).ready(function () {
|
|||
}
|
||||
|
||||
function quote_issue_journal(){
|
||||
document.getElementById("#issue_notes").focus();
|
||||
alert("test");
|
||||
issue_journal_kind_reply.focus();
|
||||
issue_journal_kind_reply.cmd.range.setStart(issue_journal_kind_reply.cmd.range.startOffset)
|
||||
}
|
||||
|
||||
/*缺陷完成度决定缺陷状态*/
|
||||
|
|
|
@ -548,7 +548,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
|||
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;}
|
||||
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
|
||||
.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; }
|
||||
.homepageNewsType {width:110px; padding-left: 5px; font-size:12px; color:#888888; display:block;}
|
||||
.homepageNewsType {padding-left: 5px; font-size:12px; color:#888888; display:block;}
|
||||
.homepageNewsTypeHomework {width:160px; padding-left: 5px; font-size:12px; color:#888888; display:block; overflow:hidden; height:49px;word-break:break-all; word-wrap:break-word; text-overflow:ellipsis;}
|
||||
.homepageNewsPubType {width:220px; font-size:12px; color:#888888; display: block;}
|
||||
.homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;}
|
||||
|
|
Loading…
Reference in New Issue