This commit is contained in:
cxt 2015-09-28 15:24:27 +08:00
commit e1348a4845
4 changed files with 32 additions and 100 deletions

View File

@ -1,4 +1,4 @@
<div class="mt10 fl" >
<div class="mt10 fl" style="width: 600px">
<% for attachment in attachments %>
<!--<p style="width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">-->
<!--<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">-->
@ -20,43 +20,13 @@
<div class="cl"></div>
<% else %>
<span class="pic_files fl "></span>
<%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 32 -%>
<%= link_to_short_attachment attachment, :class => 'fl FilesName02', :download => true, :length => 45 -%>
<a href="javascript:void(0);" class="fl FilesName02"> (<%= number_to_human_size attachment.filesize , :precision => 0 %>)</a>
<% if options[:deletable] %>
<%#= link_to image_tag('delete.png'), attachment_path(attachment),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:class => 'delete',
#:remote => true,
#:id => "attachments_" + attachment.id.to_s,
:title => l(:button_delete) %>
<a href="<%=attachment_path(attachment) %>" onclick="confirm(<%=l(:text_are_you_sure) %>)" data-method="delete"> <span class="pic_del fl "></span> </a>
<% end %>
<div class="cl"></div>
<% end %>
<%# if attachment.is_text? %>
<%#= link_to image_tag('magnifier.png'),
:controller => 'attachments',
:action => 'show',
:id => attachment,
:filename => attachment.filename%>
<%# end %>
<!--<span title="<%#= attachment.description%>">-->
<!--<%#= h(truncate(" - #{attachment.description}", length: options[:length] ? options[:length]:15, omission: '...')) unless attachment.description.blank? %>-->
<!--</span>-->
<!--<%# if options[:wrap] %>-->
<!--<br/>-->
<!--&nbsp;-->
<!--<%# end %>-->
<!--<%# if options[:author] %>-->
<!--<span class="author" title="<%#= attachment.author%>">-->
<%#= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author) %>
<!--<%#= format_time(attachment.created_on) %>-->
<!--</span>-->
<!--<%# end %>-->
<!--</p>-->
<% end %>
<% if defined?(thumbnails) && thumbnails %>
<% images = attachments.select(&:thumbnailable?) %>

View File

@ -69,7 +69,7 @@
<%= @memo.content.html_safe%>
</div>
<div class="cl"></div>
<div class=" fl">
<div class=" fl" style="width: 600px">
<% if @memo.attachments.any?%>
<% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
<%= render :partial => 'attachments_links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %>

View File

@ -127,7 +127,7 @@
: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.allowed_to?(:as_teacher,ma.course_message) %>
<% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
<p>
<%= User.current.lastname + User.current.firstname %>老师您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
@ -175,47 +175,22 @@
<%= 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;&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.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>
请同学们抓紧时间提交自己的作品,谢谢!
</p>
<p>请同学们抓紧时间提交自己的作品,谢谢!</p>
<% else %>
<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><%= 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;@nbsp;24点</span></p>
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>
@nbsp;@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.homework_detail_manual.evaluation_start %>@nbsp;@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>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span>
</p>
<p>
您可以修改作业内容、评分规则、匿评过程等,谢谢!
</p>
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p>您可以修改作业内容、评分规则、匿评过程等,谢谢!</p>
<% end %>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li>
@ -240,14 +215,13 @@
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学' : '老师' %>
您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学' : '老师' %>您好!
<%= 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.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span>
截止日期<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span>
</p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
@ -267,14 +241,11 @@
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学':'老师'%>您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学':'老师'%>您好!
<%= 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>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
@ -296,13 +267,12 @@
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<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>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
<%= 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>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
@ -386,13 +356,8 @@
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style" >
<%= ma.content.html_safe %>
<p><strong>课程:</strong><%= ma.course.name %>
(<%= ma.course.term %>)</p>
<p><strong>作业标题:</strong><%=ma.course_message.student_work.homework_common.name %></p>
<% unless ma.course_message.student_work.homework_common.description.blank? %>
<div class="fl"><strong>作业内容:</strong></div>
<div class="ml60"><%= ma.course_message.student_work.homework_common.description.html_safe %></div>
<% end %>
<p>课程名称:<%= ma.course.name %>(<%= ma.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%=ma.course_message.student_work.homework_common.name %></span></p>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
@ -437,16 +402,12 @@
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<div class="fl"><strong>回复内容:</strong></div>
<div class="fl">回复内容:</div>
<div class="ml60"><%= ma.course_message.notes %></div>
<div class="fl"><strong>您的作品评论:</strong></div>
<div class="ml80"><%= ma.course_message.jour.comment %></div>
<p><strong>课程:</strong><%= ma.course.name %>(<%= ma.course.term %>)</p>
<p><strong>作业标题:</strong><%=ma.course_message.jour.student_work.homework_common.name %></p>
<% unless ma.course_message.jour.student_work.homework_common.description.blank? %>
<div class="fl"><strong>作业内容:</strong></div>
<div class="ml60"><%= ma.course_message.jour.student_work.homework_common.description.html_safe %></div>
<% end %>
<div class="fl">您的评论:</div>
<div class="ml60"><%= ma.course_message.jour.comment %></div>
<p>课程名称:<%= ma.course.name %>(<%= ma.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%=ma.course_message.jour.student_work.homework_common.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>

View File

@ -168,6 +168,7 @@ a.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px s
a:hover.problem_pic{border:1px solid #64bdd9;}
.issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;}
.problem_txt{ width:600px; margin-left:10px; color:#777777; }
.problem_txt img {max-width:100%;}
.pro_txt_w{width:610px;}
a.problem_name{ color:#ff5722;max-width: 80px;
overflow: hidden;