This commit is contained in:
nwb 2014-05-15 17:36:52 +08:00
commit b736dc91ed
3 changed files with 17 additions and 7 deletions

View File

@ -277,9 +277,18 @@ class AccountController < ApplicationController
end
call_hook(:controller_account_success_authentication_after, {:user => user })
#by young
# redirect_back_or_default my_page_path
code = //
#根据home_url生产正则表达式
class_eval("code = " + "/" + home_url.gsub(/\//,"\\\/") + "\\\/*(welcome)?\\\/*(\\\/index)?\/")
if code.match(params[:back_url])
redirect_to user_activities_path(user)
else
#redirect_back_or_default my_page_path
redirect_back_or_default User.current
# redirect_to User.current
#redirect_to User.current
end
end
def set_autologin_cookie(user)

View File

@ -65,7 +65,7 @@
<% pages_count = @reply_pages.offset %>
<% @replies.each do |reply| %>
<div class="reply" id="<%= "reply-#{reply.id}" %>">
<p class="font_lighter"><span style="display: none"><%= pages_count += 1 %>楼 :</span></p>
<p class="font_lighter"><!--<span style="display: inline"><%= pages_count += 1 %>楼 :</span>--></p>
<div class="contextual-borad">
<!-- <%= link_to(
image_tag('comment.png'),
@ -103,7 +103,7 @@
) if reply.destroyable_by?(User.current) %>
</div>
<br/>
<table class="borad-text-list">
<tr>
<td rowspan="3" valign="top" width="60px">

View File

@ -124,7 +124,8 @@
<table class="borad-text-list">
<tr>
<td class="font_lighter"><span style="display: none"><%= reply_count += 1 %>楼</span> </td>
<!--<td class="font_lighter"> </td> -->
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
<td>
<div class="contextual-borad">
<%= link_to(
@ -150,7 +151,7 @@
</div></td>
</tr>
<tr>
<td rowspan="3" valign="top" width="60px"><%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %></td>
<td class="comments">
<div class="wiki">
<%= textilizable message, :content, :attachments => message.attachments %>