[openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

Emin Kocan notifications at github.com
Mon Oct 21 15:12:29 UTC 2024


@kcne commented on this pull request.



> @@ -6,41 +7,69 @@
            :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %></p>
 <% end %>
 
-<% if @notes.empty? %>
-  <h4><%= t ".no_notes" %></h4>
+<%= form_tag(url_for("controller" => "notes", "action" => "index"), "method" => :get, "data" => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %>
+  <div class="row gx-2">
+    <div class="col-md-auto mb-3">
+      <%= label_tag :status, t(".status") %>
+      <%= select_tag  :status,
+                      options_for_select([[t(".all"), "all"], [t(".open"), "open"], [t(".closed"), "closed"]], params[:status] || "all"),
+                      :class => "form-select",
+                      :onchange => "this.form.requestSubmit()" %>

Locally, this works as expected for me. Could you provide more details on how to reproduce this issue locally, or is this something that only occurs on production servers? Thanks.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5255#discussion_r1809017667
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5255/review/2382431399 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241021/f46f0564/attachment.htm>


More information about the rails-dev mailing list