1.修改用户留言页面的宽度;2.编辑博客首页转到博客首页
This commit is contained in:
parent
c500fc13db
commit
b2bad60b38
|
@ -52,8 +52,12 @@ class BlogCommentsController < ApplicationController
|
||||||
render_attachment_warning_if_needed(@article)
|
render_attachment_warning_if_needed(@article)
|
||||||
else
|
else
|
||||||
end
|
end
|
||||||
|
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])
|
redirect_to user_blog_blog_comment_path(:user_id=>params[:user_id],:blog_id=>params[:blog_id],:id=>params[:id])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
def destroy
|
def destroy
|
||||||
@article = BlogComment.find(params[:id])
|
@article = BlogComment.find(params[:id])
|
||||||
if @article.parent_id.nil? #如果是文章被删,那么跳转到用户博客界面,如果带了course_id过来,那么就要跳转到课程首页
|
if @article.parent_id.nil? #如果是文章被删,那么跳转到用户博客界面,如果带了course_id过来,那么就要跳转到课程首页
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if User.current.logged? && User.current.id == @user.id %>
|
<% 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| %>
|
: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} %>
|
<%= render :partial => 'blog_comments/edit', :locals => {:f => f, :article => @article, :edit_mode => true, :user => @user} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<li>
|
<li>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_edit_homepage),
|
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'
|
:class => 'postOptionLink'
|
||||||
) if User.current && User.current.id == activity.author.id %>
|
) if User.current && User.current.id == activity.author.id %>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<div class="cl"></div>
|
<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;">
|
<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|%>
|
<%= 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>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
$(function(){
|
$(function(){
|
||||||
//右侧最小高度 = 左侧高度 - 15px 保证两边高度基本一样,页面美观
|
//右侧最小高度 = 左侧高度 - 15px 保证两边高度基本一样,页面美观
|
||||||
$("#RSide").css("min-height",$("#LSide").height()-35);
|
$("#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(){
|
$("#homepage_portrait_image").on("mouseover",function(){
|
||||||
|
|
Loading…
Reference in New Issue