From b3b896a9e3ac2f50c75d2fc37dd747f8ffc35b05 Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Mon, 13 Jan 2020 21:18:29 +0000 Subject: [PATCH] Fix search by post ID and note ID links - These were missing and needed on the vanilla note versions index - Now they appear only if that particular URL parameter is not present --- app/views/note_versions/_listing.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/note_versions/_listing.html.erb b/app/views/note_versions/_listing.html.erb index ba3bc9ce7..eb95d5c6e 100644 --- a/app/views/note_versions/_listing.html.erb +++ b/app/views/note_versions/_listing.html.erb @@ -3,13 +3,13 @@ <%= table_for @note_versions, {class: "striped autofit", width: "100%"} do |t| %> <% t.column "Post", width: "5%" do |note_version| %> <%= link_to note_version.post_id, post_path(note_version.post_id) %> - <% if params.dig(:search, :note_id).present? %> + <% if !params.dig(:search, :post_id).present? %> <%= link_to "»", note_versions_path(search: {post_id: note_version.post_id}) %> <% end %> <% end %> <% t.column "Note", width: "5%" do |note_version| %> <%= link_to "#{note_version.note_id}.#{note_version.version}", post_path(note_version.post_id, anchor: "note-#{note_version.note_id}") %> - <% if params.dig(:search, :post_id).present? %> + <% if !params.dig(:search, :note_id).present? %> <%= link_to "»", note_versions_path(search: {note_id: note_version.note_id}) %> <% end %> <% end %>