diff --git a/app/controllers/blog_comments_controller.rb b/app/controllers/blog_comments_controller.rb index 7c09e2cdf..ae6aff794 100644 --- a/app/controllers/blog_comments_controller.rb +++ b/app/controllers/blog_comments_controller.rb @@ -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]) diff --git a/app/views/blog_comments/edit.html.erb b/app/views/blog_comments/edit.html.erb index a878063db..43a8aae92 100644 --- a/app/views/blog_comments/edit.html.erb +++ b/app/views/blog_comments/edit.html.erb @@ -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 %> diff --git a/app/views/blogs/_homepage.html.erb b/app/views/blogs/_homepage.html.erb index a7fe42a75..30e1b69a5 100644 --- a/app/views/blogs/_homepage.html.erb +++ b/app/views/blogs/_homepage.html.erb @@ -9,7 +9,7 @@
  • <%= 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 %>
  • diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb index 9389c57cc..1035f5656 100644 --- a/app/views/users/user_newfeedback.html.erb +++ b/app/views/users/user_newfeedback.html.erb @@ -21,7 +21,7 @@
    -
    +
    <%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%> diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 65741adc8..567d2322f 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -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(){