1.修改用户留言页面的宽度;2.编辑博客首页转到博客首页

This commit is contained in:
ouyangxuhua 2016-01-08 16:16:57 +08:00
parent c500fc13db
commit b2bad60b38
5 changed files with 9 additions and 5 deletions

View File

@ -52,7 +52,11 @@ class BlogCommentsController < ApplicationController
render_attachment_warning_if_needed(@article)
else
end
redirect_to user_blog_blog_comment_path(:user_id=>params[:user_id],:blog_id=>params[:blog_id],:id=>params[:id])
if params[:is_homepage]
redirect_to user_blogs_path(params[:user_id])
else
redirect_to user_blog_blog_comment_path(:user_id=>params[:user_id],:blog_id=>params[:blog_id],:id=>params[:id])
end
end
def destroy
@article = BlogComment.find(params[:id])

View File

@ -1,5 +1,5 @@
<% if User.current.logged? && User.current.id == @user.id %>
<%= form_for @article, :url =>{:controller=>'blog_comments',:action => 'update',:user_id=>@user.id , :blog_id => @article.id},:method=>'PUT',
<%= form_for @article, :url =>{:controller=>'blog_comments',:action => 'update',:user_id=>@user.id , :blog_id => @article.id, :is_homepage => params[:is_homepage]},:method=>'PUT',
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'blog_comments/edit', :locals => {:f => f, :article => @article, :edit_mode => true, :user => @user} %>
<% end %>

View File

@ -9,7 +9,7 @@
<li>
<%= link_to(
l(:button_edit_homepage),
{:controller => 'blog_comments',:action => 'edit',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id},
{:controller => 'blog_comments',:action => 'edit',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id, :is_homepage => 1},
:class => 'postOptionLink'
) if User.current && User.current.id == activity.author.id %>
</li>

View File

@ -21,7 +21,7 @@
<div class="cl"></div>
<div class="message_box mb10" id="users_setting" >
<div class="message_box mb10" id="users_setting" style="min-height:192px;">
<div nhname='new_message' style="display:none;">
<%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea' name="new_form[user_message]"></textarea>

View File

@ -1,7 +1,7 @@
$(function(){
//右侧最小高度 = 左侧高度 - 15px 保证两边高度基本一样,页面美观
$("#RSide").css("min-height",$("#LSide").height()-35);
$("#users_setting").css("min-height",$("#LSide").height()-100);
//$("#users_setting").css("min-height",$("#LSide").height()-100);
//头像相关
$("#homepage_portrait_image").on("mouseover",function(){