This commit is contained in:
cxt 2015-09-28 14:11:56 +08:00
commit 5909df1f69
5 changed files with 36 additions and 25 deletions

View File

@ -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>

View File

@ -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%>

View File

@ -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'%>

View File

@ -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">
<% 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

@ -191,14 +191,14 @@
请同学们抓紧时间提交自己的作品,谢谢!
</p>
<% else %>
<p><%= User.current.lastname + User.current.firstname %>您好!
<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>作业标题:<%= ma.course_message.name %></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>
@ -239,14 +239,15 @@
: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 %>&nbsp;&nbsp;24点</span>
</p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
@ -265,8 +266,10 @@
: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>
<%= 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>
@ -515,7 +518,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"}",