Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
0f52c24cd5
|
@ -119,7 +119,7 @@ module JournalsHelper
|
|||
content << textAreailizable(journal, :notes)
|
||||
css_classes = "wiki"
|
||||
css_classes << " editable" if editable
|
||||
content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes ,:style => "width:510px")
|
||||
content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes)
|
||||
end
|
||||
|
||||
def link_to_in_place_notes_editor(text, field_id, url, options={})
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
<% if forums.any? %>
|
||||
<% forums.each do |forum| %>
|
||||
<div class="postRow">
|
||||
<div class="postPortrait"><a href="javascript:void(0);" class="linkGrey2">
|
||||
<div class="postPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(forum.creator),:width=>75,:height => 75 ),user_path( forum.creator) %>
|
||||
</div>
|
||||
<div class="postWrap">
|
||||
<div class="postTitle">
|
||||
<!--<a href="javascript:void(0);" class="f16 linkBlue">新手讨论吧</a>-->
|
||||
<%= link_to forum.name, forum_path(forum),:class=>"f16 linkBlue" %>
|
||||
<a href="<%= forum_path(forum) %>" class="f16 linkBlue" style="word-break: break-all;word-wrap : break-word ;white-space:pre-wrap;"><%=forum.name.gsub(/(\r\n)/,'<br/>').html_safe %></a>
|
||||
<%#= link_to forum.name.gsub(/(\r\n|\s+)/,'<br/>'), forum_path(forum),:class=>"f16 linkBlue" %>
|
||||
</div>
|
||||
<div class="postDes" style="word-break: break-all;word-wrap : break-word ;"><%= textAreailizable forum.description%></div>
|
||||
<div class="postDes" style="word-break: break-all;word-wrap : break-word ;white-space:pre-wrap;"><%= textAreailizable forum.description%></div>
|
||||
<div class="postCreater">创建者:<a href="<%= user_path( forum.creator)%>" class="linkGrey2" target="_blank"><%= forum.creator.name %></a></div>
|
||||
<div class="postDate">创建时间:<%= format_date(forum.created_at) %></div>
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
function edit_desc(){
|
||||
if(<%=@forum.creator.id == User.current.id%>) {
|
||||
desc = $("#forum_desc_span").html();
|
||||
$("#forum_desc_span").html("<textarea id='forum_desc_input' onblur='change_forum_desc();' class='homepageSignatureTextarea'>" + desc + "</textarea>");
|
||||
$("#forum_desc_span").html("<textarea id='forum_desc_input' onblur='change_forum_desc();' style='width: 200px;height: 80px; max-width: 207px; max-height: 80px; border: 1px solid #d9d9d9;outline: none;margin: 0px 0px 12px 0px;'>" + desc + "</textarea>");
|
||||
$("#forum_desc_input").focus();
|
||||
}
|
||||
}
|
||||
|
@ -149,15 +149,14 @@
|
|||
<!--<div class="homepageEditProfile"><a href="javascript:void(0);" class="homepageEditProfileIcon"></a></div>-->
|
||||
</div>
|
||||
<div class="fl">
|
||||
<div class="f16 fontBlue mb10" style="word-break: break-all; word-wrap:break-word;"><%= @forum.name%></div>
|
||||
<div class="f16 fontBlue mb10" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;"><%= @forum.name%></div>
|
||||
<div class="fontGrey2 mb8">吧主:<a href="<%= user_path(@forum.creator)%>" class="linkBlue"><%= @forum.creator.name%></a></div>
|
||||
<div class="fontGrey3">回答:<a href="javascript:void(0);" class="linkOrange mr5" style="cursor: default"><%= @forum.memo_count %></a> 帖子:<a href="javascript:void(0);" class="linkOrange" style="cursor: default"><%=@forum.topic_count%></a></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="fontGrey2 mt10"><span id="forum_desc_span" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;"><%= @forum.description%></span>
|
||||
<div class="fontGrey2 mt10"><span id="forum_desc_span" style="word-break:normal; width:auto; display:block; white-space:pre-wrap;word-wrap : break-word ;overflow: hidden ;"><%= @forum.description.html_safe%></span>
|
||||
<%if @forum.creator.id == User.current.id%>
|
||||
<a href="javascript:void(0);" onclick="edit_desc();">
|
||||
<!--<img src="<%#= Rails.root%>/images/signature_edit.png" width="12" height="12" />-->
|
||||
<%= image_tag('signature_edit.png',{:width=>12,:height=>12})%>
|
||||
</a>
|
||||
<%end%>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new',prettify,'users', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new','prettify','users', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "avatars",'prettify'%>
|
||||
|
|
|
@ -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/>-->
|
||||
<!-- -->
|
||||
<!--<%# 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?) %>
|
||||
|
|
|
@ -30,6 +30,14 @@
|
|||
$(function() {
|
||||
init_activity_KindEditor_data(<%= @memo.id%>,null,"87%");
|
||||
});
|
||||
|
||||
function del_confirm(){
|
||||
if(confirm('确认删除么?')){
|
||||
$("#del_link").click();
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="postRightContainer">
|
||||
<div class="postThemeContainer">
|
||||
|
@ -43,24 +51,25 @@
|
|||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="<%= edit_forum_memo_path(@memo.forum,@memo)%>" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" class="postOptionLink">删除</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink" onclick="del_confirm();">删除</a></li>
|
||||
<li style="display: none"><a href="<%= forum_memo_path(@memo.forum,@memo) %>" data-method="delete" id="del_link" ></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<%end%>
|
||||
<div class="postDetailTitle"><a href="javascript:void(0);" class="f14 linkGrey4 fb">主题: <%= @memo.subject%></a></div>
|
||||
<div class="postDetailTitle"><a href="javascript:void(0);" class="f14 linkGrey4 fb" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;">主题: <%= @memo.subject%></a></div>
|
||||
<div class="postDetailCreater"><a href="javascript:void(0);" class="linkBlue2" target="_blank"><%= @memo.author.name%></a></div>
|
||||
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
|
||||
<span id="praise_tread" style="float: right">
|
||||
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content" >
|
||||
<div class="memo-content" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;margin-bottom: 0px !important;" >
|
||||
<%= @memo.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10 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} %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
|
||||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
|
@ -45,18 +46,29 @@
|
|||
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id%>">
|
||||
<%= activity.description.html_safe %>
|
||||
</div>
|
||||
<div class="homepagePostSetting" style="visibility: hidden" id="act-<%=user_activity_id %>">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
<% if is_teacher%>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit),edit_homework_common_path(activity,:is_in_course => 0), :class => "postOptionLink"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
||||
</li>
|
||||
<li>
|
||||
<%= homework_anonymous_comment activity %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -13,11 +13,11 @@
|
|||
<% course=Course.find(activity.jour_id) %>
|
||||
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<div class="homepagePostTitle break_word list_style upload_img">
|
||||
<% if activity.m_parent_id.nil? %>
|
||||
<%= link_to activity.notes.to_s, course_feedback_path(course), :class => "postGrey" %>
|
||||
<%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.notes.to_s, course_feedback_path(course), :class => "postGrey" %>
|
||||
<%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDate">
|
||||
|
@ -62,7 +62,7 @@
|
|||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style"><%= comment.notes.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= comment.notes.html_safe %></div>
|
||||
<% fetch_user_leaveWord_reply(comment).each do |reply| unless fetch_user_leaveWord_reply(comment).nil? %>
|
||||
<div class="recall">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
@ -83,7 +83,7 @@
|
|||
<% end %>
|
||||
<%= format_time reply.created_on %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style"><%= reply.notes.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= reply.notes.html_safe %></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img">
|
||||
<%= reply.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style"><%= comment.comments.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img">
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style"><%= reply.content.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span>
|
||||
</li>
|
||||
<span style="color: red;float: left">【系统消息】</span><li class="homepageSystenMessageContent fl" id="content_<%= usm.id %>">
|
||||
<span style="color: red;float: left">【系统消息】</span>
|
||||
<li class="homepageSystenMessageContent fl">
|
||||
|
||||
<%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
|
||||
|
@ -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; 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><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>
|
||||
<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.late_penalty %>分</span></p>
|
||||
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
|
||||
<p>您可以修改作业内容、评分规则、匿评过程等,谢谢!</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
||||
|
@ -239,14 +214,14 @@
|
|||
: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><strong>匿评自动关闭日期:</strong><%= ma.course_message.homework_detail_manual.evaluation_end %>
|
||||
<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 %>老师开启了匿评,作业详情如下:
|
||||
</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 %> 24点</span>
|
||||
</p>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
@ -265,13 +240,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.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>
|
||||
</div>
|
||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
@ -293,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>
|
||||
|
@ -383,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>
|
||||
|
@ -434,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>
|
||||
|
@ -515,7 +479,7 @@
|
|||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派了问题给你:</span>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%></span>
|
||||
</li>
|
||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
class AlterActivities < ActiveRecord::Migration
|
||||
def up
|
||||
UserActivity.all.each do |activity|
|
||||
if activity.act_type == 'JournalsForMessage'
|
||||
if activity.act
|
||||
unless activity.act.m_parent_id.nil?
|
||||
parent_act = UserActivity.where("act_id = #{activity.act.parent.id} and act_type='JournalsForMessage' and container_type='Course'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
else
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
CourseActivity.all.each do |activity|
|
||||
if activity.course_act_type == 'JournalsForMessage'
|
||||
if activity.course_act
|
||||
unless activity.course_act.m_parent_id.nil?
|
||||
parent_act = CourseActivity.where("course_act_id = #{activity.course_act.parent.id} and course_act_type='JournalsForMessage'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.course_act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
else
|
||||
activity.destroy
|
||||
end
|
||||
elsif activity.course_act_type == 'Message'
|
||||
if activity.course_act
|
||||
unless activity.course_act.parent_id.nil?
|
||||
parent_act = CourseActivity.where("course_act_id = #{activity.course_act.parent.id} and course_act_type='Message'").first
|
||||
if parent_act
|
||||
parent_act.created_at = activity.course_act.parent.children.maximum("created_on")
|
||||
parent_act.save
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
else
|
||||
activity.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,16 @@
|
|||
class UpdateCourseActivitiesUpdatedAt < ActiveRecord::Migration
|
||||
def up
|
||||
count = CourseActivity.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... count do i
|
||||
CourseActivity.page(i).per(30).each do |activity|
|
||||
activity.updated_at = activity.created_at
|
||||
activity.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
1724
db/schema.rb
1724
db/schema.rb
File diff suppressed because it is too large
Load Diff
|
@ -184,6 +184,14 @@ $(function(){
|
|||
$("#BluePopupBox").on('click', 'a.icon_add', function(){
|
||||
var html = bt('t:test-answer-list', null);
|
||||
$(this).parent('.mt10').after(html);
|
||||
var inputs = document.getElementsByName("program[input][]");
|
||||
var outputs = document.getElementsByName("program[output][]");
|
||||
if (inputs.length == outputs.length) {
|
||||
for (var i=0; i<inputs.length; i++) {
|
||||
autoTextarea2(inputs[i], outputs[i]);
|
||||
autoTextarea2(outputs[i], inputs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
$("#BluePopupBox").on('click', 'a.icon_remove', function(){
|
||||
|
|
|
@ -98,7 +98,7 @@ a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310p
|
|||
a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;}
|
||||
a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;}
|
||||
a.homepagePostTypeMine {background:url(../images/homepage_icon.png) -187px -277px no-repeat; padding-left:23px;}
|
||||
a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -185px -308px no-repeat; padding-left:23px;}
|
||||
a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -189px -308px no-repeat; padding-left:23px;}
|
||||
a.postTypeGrey {color:#888888;}
|
||||
a.postTypeGrey:hover {color:#269ac9;}
|
||||
.homepagePostBrief {width:710px; margin:0px auto; position:relative;}
|
||||
|
@ -139,7 +139,7 @@ a.postReplyCancel:hover {color:#ffffff;}
|
|||
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
|
||||
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
|
||||
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
|
||||
a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}
|
||||
.homepagePostReplyPortrait {float:left; width:33px;}
|
||||
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
|
||||
.homepagePostReplyDes {float:left; width:632px; margin-left:15px;}
|
||||
|
@ -980,6 +980,4 @@ a:hover.c_grey{ color:#333;}
|
|||
.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.last_time{width:auto; text-align:right; margin-right:70px;}
|
||||
.link_file_box{ width:360px;}
|
||||
a.postOptionLink{float: right;color: #64bdd9;display: block;padding: 1px 5px;border: 1px solid #64bdd9;width: initial;}
|
||||
a:hover.postOptionLink {color: #fff;background: #64bdd9;}
|
||||
|
||||
|
|
|
@ -553,7 +553,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
|||
.homepageNewsPubType {width:230px; font-size:12px; color:#888888; display: block;}
|
||||
.homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;}
|
||||
.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageSystenMessageContent {width:291px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||
.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -220,6 +221,7 @@ a:hover.talk_btn{ background:#2a9dc1;}
|
|||
/****讨论区内页***/
|
||||
.mt0{ margin-top:0px;}
|
||||
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
|
||||
.talk_info img {max-width:100%;}
|
||||
a.talk_edit{ color:#426e9a; margin-right:5px;}
|
||||
a:hover.talk_edit{ color:#ff5722;}
|
||||
.talk_reply { background:#eeeeee; padding:10px; margin-bottom:10px;}
|
||||
|
@ -876,4 +878,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
|||
|
||||
/*version*/
|
||||
.time_tracter{color: #64BDD9;padding: 5px;}
|
||||
.wiki {width: 510px;}
|
||||
.wiki img {max-width:100%;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue