summaryrefslogtreecommitdiff
path: root/app/views/threadreplies/edit.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/threadreplies/edit.html.erb')
-rw-r--r--app/views/threadreplies/edit.html.erb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/threadreplies/edit.html.erb b/app/views/threadreplies/edit.html.erb
index d3218cd..c009cb0 100644
--- a/app/views/threadreplies/edit.html.erb
+++ b/app/views/threadreplies/edit.html.erb
@@ -1,6 +1,11 @@
<% title "Edit Thread Reply: #{@reply.thread.title}" %>
-<%= link_to @reply.thread.forum.group, forumgroup_path(@reply.thread.forum.group) %> → <%= link_to @reply.thread.forum, @reply.thread.forum %> → <%= link_to @reply.thread, @reply.thread %> → Edit reply
+<%
+ position = @reply.thread.replies.index(@reply)
+ page = position / Kaminari.config.default_per_page + 1
+%>
+
+<%= link_to @reply.thread.forum.group, forumgroup_path(@reply.thread.forum.group) %> → <%= link_to @reply.thread.forum, @reply.thread.forum %> → <%= link_to @reply.thread, forumthread_path(@reply.thread, page: page) + "#reply-#{@reply.id}" %> → Edit reply
<h1>Edit reply</h1>
<%= form_for [@reply.thread, @reply] do |f| %>
<%= render partial: "md_editor", locals: {name: "threadreply[content]", content: @reply.content} %>