个人主页留言界面显示以及留言的删除
This commit is contained in:
parent
a667d97768
commit
e4e99df113
|
@ -0,0 +1,53 @@
|
||||||
|
<div class="message_list" id="<%= jour.id%>">
|
||||||
|
<div>
|
||||||
|
<%= link_to image_tag(url_to_avatar(jour.user),:width => '46',:height => '46'), user_path(jour.user),:class => "users_pic fl" %>
|
||||||
|
<div class="fl ml5 mes_box mb10" >
|
||||||
|
<div>
|
||||||
|
<%= link_to "#{jour.user.login} : ".html_safe, user_path(jour.user),:class => 'fl c_blue02 f14 fb mb5', :target => "_blank"%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div>
|
||||||
|
<%= jour.notes.html_safe %>
|
||||||
|
</div>
|
||||||
|
</div><!--mes_box end-->
|
||||||
|
<span class="c_grey fr mb10">
|
||||||
|
<%= time_tag(jour.created_on).html_safe %>
|
||||||
|
</span>
|
||||||
|
<div class="fr cr">
|
||||||
|
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
|
||||||
|
<% if User.current.admin? || jour.user == User.current%>
|
||||||
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => jour, :user_id => jour.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "ml5 c_purple", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<% fetch_user_leaveWord_reply(jour).each do |reply|%>
|
||||||
|
<div id = '<%= reply.id %>'>
|
||||||
|
<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
|
||||||
|
<div class="mes_box02">
|
||||||
|
<%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
|
||||||
|
<div class=" mes_box02_info fl">
|
||||||
|
<%= link_to "#{reply.user.login} : ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
|
||||||
|
<span class="fl c_grey"> 回复: </span>
|
||||||
|
<%= link_to "#{parent_jour.user.login} : ".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
|
||||||
|
<div class="cl">
|
||||||
|
<%= reply.notes.html_safe %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="c_grey fr">
|
||||||
|
<%= time_tag(reply.created_on).html_safe%>
|
||||||
|
</span>
|
||||||
|
<div class="fr cr">
|
||||||
|
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
|
||||||
|
<% if User.current.admin? || reply.user == User.current%>
|
||||||
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--mes_box02 end-->
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
</div><!--message_list end-->
|
|
@ -1,82 +1,27 @@
|
||||||
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||||
<div id="RSide" class="fl">
|
<div id="RSide" class="fl">
|
||||||
<div class="users_r_top">
|
<div class="users_r_top">
|
||||||
<h2 class="users_r_h2">用户留言</h2>
|
<h2 class="users_r_h2">用户留言</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="message_box mb10">
|
<div class="message_box mb10">
|
||||||
<textarea type="text" class="inputUsers_message" value="请输入评论内容">请输入评论内容</textarea>
|
<div nhname='new_message' style="display:none;">
|
||||||
<a href="#" target="_blank" class="icon_face fl ">表情</a>
|
<form action="<%= url_for(:controller => 'words', :action => 'create', :user_id => @user.id) %>" data-remote="true" method="post">
|
||||||
<a href="javascript:void(0)" class="grey_n_btn fr ">取消</a>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
|
||||||
<a href="javascript:void(0)" class="blue_n_btn fr mr5 ">发布</a>
|
<p nhname='contentmsg'></p>
|
||||||
|
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||||
|
<a id="new_message_submit_btn" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">留言</a>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div class="message_list_box">
|
<div class="message_list_box">
|
||||||
<div class="message_list">
|
<%if @jour%>
|
||||||
<a href="javascript:void(0)" class="users_pic fl"><img src="images/pic_users.jpg" width="27" height="27" alt="头像" /></a>
|
<% @jour.each do |jour|%>
|
||||||
<div class="fl ml5 mes_box mb10" >
|
<%= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
|
||||||
<a href="javascript:void(0)" class="fl c_blue02">黄井泉 : </a>
|
<%end%>
|
||||||
<p class="c_dark">上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。<a href="javascript:void(0)" class="c_purple ml5">回复</a><a href="javascript:void(0)" class="c_purple ml5" >删除</a></p>
|
<% end%>
|
||||||
</div><!--mes_box end-->
|
</div>
|
||||||
<span class="c_grey fr">50分钟前</span>
|
<div class="cl"></div>
|
||||||
<div class="cl"></div>
|
|
||||||
<div class=" ml80">
|
|
||||||
<textarea type="text" class="inputUsers_message02" value="请输入评论内容">请输入评论内容</textarea>
|
|
||||||
<a href="#" target="_blank" class="icon_face fl ">表情</a>
|
|
||||||
<a href="javascript:void(0)" class="grey_n_btn fr ">取消</a>
|
|
||||||
<a href="javascript:void(0)" class="blue_n_btn fr mr5 ">发布</a>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="mes_box02">
|
|
||||||
<a href="javascript:void(0)" class="users_pic fl mr5"><img src="images/pic_users.jpg" width="27" height="27" alt="头像" /></a>
|
|
||||||
<div class=" mes_box02_info fl">
|
|
||||||
<a href="javascript:void(0)" class="course_name fl c_blue02 ">尹刚尹刚尹刚</a>
|
|
||||||
<span class="fl c_grey"> 回复: </span>
|
|
||||||
<a href="javascript:void(0)" class="course_name fl c_blue02 mr5 ">黄井泉</a>
|
|
||||||
<p class="c_dark ml5">非常好!<a href="javascript:void(0)" class="c_purple ml5" >删除</a></p>
|
|
||||||
</div>
|
|
||||||
<span class="c_grey fr">30分钟前</span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--mes_box02 end-->
|
|
||||||
</div><!--message_list end-->
|
|
||||||
<div class="message_list">
|
|
||||||
<a href="javascript:void(0)" class="users_pic fl"><img src="images/pic_users.jpg" width="27" height="27" alt="头像" /></a>
|
|
||||||
<div class="fl ml5 mes_box" >
|
|
||||||
<a href="javascript:void(0)" class="fl c_blue02">白羽 : </a>
|
|
||||||
<p class="c_dark">什么时候放暑假啊?<a href="javascript:void(0)" class="c_purple ml5">回复</a><a href="javascript:void(0)" class="c_purple ml5" >删除</a></p>
|
|
||||||
</div><!--mes_box end-->
|
|
||||||
<span class="c_grey fr">50分钟前</span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--message_list end-->
|
|
||||||
<div class="message_list">
|
|
||||||
<a href="javascript:void(0)" class="users_pic fl"><img src="images/pic_users.jpg" width="27" height="27" alt="头像" /></a>
|
|
||||||
<div class="fl ml5 mes_box mb10" >
|
|
||||||
<a href="javascript:void(0)" class="fl c_blue02">黄井泉 : </a>
|
|
||||||
<p class="c_dark">上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。上周交代的bug修改完成。<a href="javascript:void(0)" class="c_purple ml5">回复</a><a href="javascript:void(0)" class="c_purple ml5" >删除</a></p>
|
|
||||||
</div><!--mes_box end-->
|
|
||||||
<span class="c_grey fr">50分钟前</span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<div class="mes_box02">
|
|
||||||
<a href="javascript:void(0)" class="users_pic fl mr5"><img src="images/pic_users.jpg" width="27" height="27" alt="头像" /></a>
|
|
||||||
<div class=" mes_box02_info fl">
|
|
||||||
<a href="javascript:void(0)" class="course_name fl c_blue02 ">尹刚尹刚尹刚</a>
|
|
||||||
<span class="fl c_grey"> 回复: </span>
|
|
||||||
<a href="javascript:void(0)" class="course_name fl c_blue02 mr5 ">黄井泉</a>
|
|
||||||
<p class="c_dark ml5">非常好!<a href="javascript:void(0)" class="c_purple ml5" >删除</a></p>
|
|
||||||
</div>
|
|
||||||
<span class="c_grey fr">30分钟前</span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--mes_box02 end-->
|
|
||||||
</div><!--message_list end-->
|
|
||||||
<div class="message_list">
|
|
||||||
<a href="javascript:void(0)" class="users_pic fl"><img src="images/pic_users.jpg" width="27" height="27" alt="头像" /></a>
|
|
||||||
<div class="fl ml5 mes_box" >
|
|
||||||
<a href="javascript:void(0)" class="fl c_blue02">白羽 : </a>
|
|
||||||
<p class="c_dark">什么时候放暑假啊?<a href="javascript:void(0)" class="c_purple ml5">回复</a><a href="javascript:void(0)" class="c_purple ml5" >删除</a></p>
|
|
||||||
</div><!--mes_box end-->
|
|
||||||
<span class="c_grey fr">50分钟前</span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--message_list end-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div><!--message_list_box end-->
|
|
||||||
</div><!--message_box end-->
|
</div><!--message_box end-->
|
||||||
</div>
|
</div>
|
|
@ -2,9 +2,10 @@
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
||||||
<% if @is_user%>
|
<% if @is_user%>
|
||||||
$("#nh_jours_<%= @journal_destroyed.id %>",$("div[nhname='container']",$("#nh_messages"))).remove();
|
var destroyedItem = $('#<%=@journal_destroyed.id%>');
|
||||||
var params = init_list_more_div_params($("#nh_messages"));
|
destroyedItem.fadeOut(600,function(){
|
||||||
change_status_4_list_more_div(params);
|
destroyedItem.remove();
|
||||||
|
});
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @bid && @jours_count %>
|
<% if @bid && @jours_count %>
|
||||||
$('#jours_count').html("<%= @jours_count %>");
|
$('#jours_count').html("<%= @jours_count %>");
|
||||||
|
|
|
@ -10,7 +10,6 @@ $(function(){
|
||||||
|
|
||||||
//个人动态
|
//个人动态
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
function init_editor(params){
|
function init_editor(params){
|
||||||
var editor = params.kindutil.create(params.textarea, {
|
var editor = params.kindutil.create(params.textarea, {
|
||||||
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||||
|
|
|
@ -87,6 +87,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.mt10{ margin-top:10px;}
|
.mt10{ margin-top:10px;}
|
||||||
.mt30{ margin-top: 30px;}
|
.mt30{ margin-top: 30px;}
|
||||||
.mb5{ margin-bottom:5px;}
|
.mb5{ margin-bottom:5px;}
|
||||||
|
.mb8{ margin-bottom:8px;}
|
||||||
.mb10{ margin-bottom:10px;}
|
.mb10{ margin-bottom:10px;}
|
||||||
.mb20{ margin-bottom:20px;}
|
.mb20{ margin-bottom:20px;}
|
||||||
.pl15{ padding-left:15px;}
|
.pl15{ padding-left:15px;}
|
||||||
|
|
|
@ -24,12 +24,14 @@ a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; dis
|
||||||
a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; }
|
a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; }
|
||||||
.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;}
|
.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;}
|
||||||
.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; }
|
.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; }
|
||||||
.message_list_box{ background:#f5f5f5; padding:10px;}
|
.message_list_box{ background:#f5f5f5; padding:10px;margin-top: 10px;}
|
||||||
.users_pic{ width:27px; height:27px; border:1px solid #e3e3e3;}
|
.users_pic{ width:46px; height:46px; border:1px solid #e3e3e3;}
|
||||||
.users_pic:hover{ border:1px solid #a5a5a5;}
|
.users_pic:hover{ border:1px solid #a5a5a5;}
|
||||||
|
.users_pic_sub{width:32px; height:32px; border:1px solid #e3e3e3;}
|
||||||
|
.users_pic_sub:hover{ border:1px solid #a5a5a5;}
|
||||||
.massage_txt{ max-width:360px; color: #666;word-break:break-all;}
|
.massage_txt{ max-width:360px; color: #666;word-break:break-all;}
|
||||||
.massage_time{ color:#8d8d8d; margin-top:5px;}
|
.massage_time{ color:#8d8d8d; margin-top:5px;}
|
||||||
.message_list{ border-bottom:1px dashed #c9c9c9; padding-bottom:10px; margin-bottom:10px;}
|
.message_list{ border-bottom:1px dashed #c9c9c9; margin-bottom:10px;color: #5f5f5f;}
|
||||||
.message_list_more{ text-align:center; width:720px;}
|
.message_list_more{ text-align:center; width:720px;}
|
||||||
/*课程动态*/
|
/*课程动态*/
|
||||||
.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;}
|
.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;}
|
||||||
|
@ -124,9 +126,9 @@ a:hover.c_lgrey{ color:#3ca5c6;}
|
||||||
.newhwork_div textarea{border:1px solid #CCC;}
|
.newhwork_div textarea{border:1px solid #CCC;}
|
||||||
.w460{ width:460px;}
|
.w460{ width:460px;}
|
||||||
/* 留言新增*/
|
/* 留言新增*/
|
||||||
.mes_box{ width:600px;}
|
.mes_box{ width:590px;}
|
||||||
.mes_box02{ margin-left:80px; border-top:1px dashed #c9c9c9; padding-top:10px;}
|
.mes_box02{ margin-left:50px; border-top:1px dashed #c9c9c9; padding-top:10px;margin-bottom: 10px;}
|
||||||
.mes_box02_info{ width:500px; margin-left:5px;}
|
.mes_box02_info{ width:540px; margin-left:5px;}
|
||||||
.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||||
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
|
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
|
||||||
|
|
||||||
|
@ -139,4 +141,5 @@ span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
|
||||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||||
div.ke-toolbar .ke-outline{border:none;}
|
div.ke-toolbar .ke-outline{border:none;}
|
||||||
|
.cr{clear: right;}
|
Loading…
Reference in New Issue