diff --git a/app/helpers/topics_helper.rb b/app/helpers/topics_helper.rb new file mode 100644 index 00000000000..96ec460ccd5 --- /dev/null +++ b/app/helpers/topics_helper.rb @@ -0,0 +1,10 @@ +module TopicsHelper + + def render_topic_title(topic) + link_to(topic.title,topic.relative_url) + end + + def render_topic_next_page_link(topic, next_page) + link_to("next page", topic.relative_url + "?page=" + next_page ) + end +end diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 09b8906fe29..869cd21c099 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -1,5 +1,6 @@
- next page + <%= render_topic_next_page_link(@topic_view.topic, @next_page) %>
<% end %>