mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 23:55:43 +08:00
render_topic_next_page_link
This commit is contained in:
parent
0f54dbb36e
commit
00883842f4
@ -3,4 +3,8 @@ module TopicsHelper
|
|||||||
def render_topic_title(topic)
|
def render_topic_title(topic)
|
||||||
link_to(topic.title,topic.relative_url)
|
link_to(topic.title,topic.relative_url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def render_topic_next_page_link(topic, next_page)
|
||||||
|
link_to("next page", topic.relative_url + "?page=" + next_page )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<h2>
|
<h2>
|
||||||
<%= render_topic_title(@topic_view.topic) %>
|
<%= render_topic_title(@topic_view.topic) %>
|
||||||
link_to(@topic_view.topic.title, @topic_view.topic.relative_url)
|
|
||||||
</h2>
|
</h2>
|
||||||
<% (@post ? [@post] : @topic_view.posts).each do |post| %>
|
<% (@post ? [@post] : @topic_view.posts).each do |post| %>
|
||||||
<div class='creator'>
|
<div class='creator'>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<% if @next_page%>
|
<% if @next_page%>
|
||||||
<p>
|
<p>
|
||||||
<b><%= link_to("next page", @topic_view.topic.relative_url + "?page=" + @next_page ) %></b>
|
<b><%= render_topic_next_page_link(@topic_view.topic, @next_page) %></b>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user