diff --git a/app/views/notes/index.html.erb b/app/views/notes/index.html.erb index d5efe0d79c..542fd39d74 100644 --- a/app/views/notes/index.html.erb +++ b/app/views/notes/index.html.erb @@ -1,3 +1,4 @@ +<% content_for :heading_class, "pb-0" %> <% content_for :heading do %>

<%= t ".heading", :user => @user.display_name %>

<%= t ".subheading_html", @@ -8,8 +9,37 @@ <% if @notes.empty? %>

<%= t ".no_notes" %>

- <% else %> + <%= form_tag(url_for("controller" => "notes", "action" => "index"), "method" => :get, "data" => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %> +
+
+ <%= label_tag :status, t(".status") %> + <%= select_tag :status, + options_for_select([[t(".all"), "all"], [t(".open"), "open"], [t(".closed"), "closed"]], params[:status]), + :include_blank => t(".select_status"), + :class => "form-select" %> +
+
+ <%= label_tag :note_type, t(".note_type") %> + <%= select_tag :note_type, + options_for_select([[t(".all_types"), ""], [t(".submitted"), "submitted"], [t(".commented"), "commented"]], params[:note_type]), + :include_blank => t(".select_note_type"), + :class => "form-select" %> +
+
+ <%= label_tag :from, t(".from") %> + <%= date_field_tag :from, params[:from], :placeholder => t(".from"), :class => "form-control", :autocomplete => "off" %> +
+
+ <%= label_tag :to, t(".to") %> + <%= date_field_tag :to, params[:to], :placeholder => t(".to"), :class => "form-control", :autocomplete => "off" %> +
+
+ <%= submit_tag t(".filter"), :class => "btn btn-primary" %> +
+
+ <% end %> + <%= render :partial => "notes_paging_nav" %> diff --git a/config/locales/en.yml b/config/locales/en.yml index f40709e480..faa09a34ea 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2966,6 +2966,19 @@ en: description: "Description" created_at: "Created at" last_changed: "Last changed" + open: "Open" + closed: "Closed" + all: "All" + filter: "Filter" + from: "From" + to: "To" + status: "Status" + select_status: "Select Status" + note_type: "Note Type" + all_types: "All Types" + submitted: "Submitted" + commented: "Commented" + select_note_type: "Select Note Type" show: title: "Note: %{id}" description: "Description"