-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List all Replies on user profile page.
- Loading branch information
Showing
13 changed files
with
87 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<%= render_list class: "nav nav-tabs" do |li| | ||
li << link_to(t("users.menu.profile"), user_path(@user)) | ||
li << link_to(t("users.menu.topics"), topics_user_path(@user)) | ||
li << link_to(t("users.menu.replies"), replies_user_path(@user)) | ||
li << link_to(t("users.menu.favorites"), favorites_user_path(@user)) | ||
li << link_to(t("users.menu.notes"), notes_user_path(@user)) | ||
li << link_to("关注者", followers_user_path(@user)) | ||
li << link_to("正在关注", following_user_path(@user)) | ||
li << link_to("已屏蔽", blocked_user_path(@user)) if owner?(@user) and current_user.blocked_users? | ||
li << link_to(t("users.menu.following"), followers_user_path(@user)) | ||
li << link_to(t("users.menu.followers"), following_user_path(@user)) | ||
li << link_to(t("users.menu.blocked"), blocked_user_path(@user)) if owner?(@user) and current_user.blocked_users? | ||
end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
<ul class="list-group"> | ||
<ul class="list-group recent-replies"> | ||
<% replies.each do |reply| %> | ||
<% next if reply.topic.blank? %> | ||
<li class="list-group-item"> | ||
<div class="title"> | ||
<%= link_to(reply.topic.title, topic_path(reply.topic_id)) %> | ||
<span class="info">at <%= timeago(reply.created_at) %></span> | ||
</div> | ||
<div class="body markdown"> | ||
<%= raw reply.body_html %> | ||
</div> | ||
</li> | ||
<% cache(['users', reply]) do %> | ||
<% next if reply.topic.blank? %> | ||
<li class="list-group-item"> | ||
<div class="title"> | ||
<%= link_to(reply.topic.title, topic_path(reply.topic_id)) %> | ||
<span class="info">at <%= timeago(reply.created_at) %></span> | ||
</div> | ||
<div class="body markdown"> | ||
<%= raw reply.body_html %> | ||
</div> | ||
</li> | ||
<% end %> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,5 @@ | |
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="row"> | ||
<%= render "sidebar", user: @user %> | ||
|
||
<div class="col-md-8"> | ||
<%= render "menu" %> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"> | ||
<%= render "replies", replies: @replies %> | ||
</div> | ||
<div class="panel-footer"> | ||
<%= will_paginate @replies %> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,8 @@ | |
profile: "个人信息" | ||
favorites: "收藏" | ||
notes: "记事本" | ||
replies: "回帖" | ||
following: "正在关注" | ||
followers: "关注者" | ||
blocked: "已屏蔽" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters