fix thread & reply navigator links

This commit is contained in:
jomo
2016-05-08 19:30:52 +02:00
parent 37cccdff18
commit bd061d3441
3 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
%> %>
<h1>Edit thread</h1> <h1>Edit thread</h1>
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %><%= link_to @thread.forum, @thread.forum %> New thread <%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %><%= link_to @thread.forum, @thread.forum %><%= link_to @thread, @thread %> → Edit thread
<%= form_for @thread do |f|%> <%= form_for @thread do |f|%>
<table> <table>
<% if mod? %> <% if mod? %>
+1 -1
View File
@@ -7,7 +7,7 @@
end end
%> %>
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %><%= link_to @thread.forum, @thread.forum %> New thread <%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %><%= link_to @thread.forum, @thread.forum %> → New thread
<h1>New thread</h1> <h1>New thread</h1>
<%= form_for @thread do |f|%> <%= form_for @thread do |f|%>
<table> <table>
+6 -1
View File
@@ -1,6 +1,11 @@
<% title "Edit Thread Reply: #{@reply.thread.title}" %> <% 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> <h1>Edit reply</h1>
<%= form_for [@reply.thread, @reply] do |f| %> <%= form_for [@reply.thread, @reply] do |f| %>
<%= render partial: "md_editor", locals: {name: "threadreply[content]", content: @reply.content} %> <%= render partial: "md_editor", locals: {name: "threadreply[content]", content: @reply.content} %>