[openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)
Anton Khorev
notifications at github.com
Fri Nov 8 14:32:50 UTC 2024
@AntonKhorev commented on this pull request.
> @@ -6,6 +6,20 @@
:commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %></p>
<% end %>
+<%= form_with :url => url_for(:controller => "notes", :action => "index"), :method => :get, :data => { :turbo => true } do %>
+ <div class="row gx-2 align-items-end">
+ <div class="col-sm-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" %>
+ </div>
+ <div class="col-sm-auto mb-3">
+ <%= submit_tag t(".apply"), :class => "btn btn-primary" %>
We have this in issues search form to avoid adding `&commit=...` to urls:
```suggestion
<%= submit_tag t(".apply"), :name => nil, :class => "btn btn-primary" %>
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5297#pullrequestreview-2423967115
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5297/review/2423967115 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241108/97696770/attachment-0001.htm>
More information about the rails-dev
mailing list