diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-08-25 04:27:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 04:27:47 +0200 |
commit | 50487db1224851a49ee523bbc013d5f8686a7a55 (patch) | |
tree | d257fcffb9a4f690e1e8edcd4c7f10372c9c7f07 /app/views/filters/statuses/index.html.haml | |
parent | d156e9b823e5be9e33de4a5d667b2cd32a94cbe4 (diff) |
Add ability to filter individual posts (#18945)
* Add database table for status-specific filters * Add REST endpoints, entities and attributes * Show status filters in /filters interface * Perform server-side filtering for individual posts filters * Fix filtering on context mismatch * Refactor `toServerSideType` by moving it to its own module * Move loupe and delete icons to their own module * Add ability to filter individual posts from WebUI * Replace keyword list by warnings (expired, context mismatch) * Refactor server-side filtering code * Add tests
Diffstat (limited to 'app/views/filters/statuses/index.html.haml')
-rw-r--r-- | app/views/filters/statuses/index.html.haml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/app/views/filters/statuses/index.html.haml b/app/views/filters/statuses/index.html.haml new file mode 100644 index 000000000..886de58fa --- /dev/null +++ b/app/views/filters/statuses/index.html.haml @@ -0,0 +1,38 @@ +- content_for :header_tags do + = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous' + +- content_for :page_title do + = t('filters.statuses.index.title') + \- + = @filter.title + +.filters + .back-link + = link_to edit_filter_path(@filter) do + = fa_icon 'chevron-left fw' + = t('filters.statuses.back_to_filter') + +%p.hint= t('filters.statuses.index.hint') + +%hr.spacer/ + += form_for(@status_filter_batch_action, url: batch_filter_statuses_path(@filter.id)) do |f| + = hidden_field_tag :page, params[:page] || 1 + + - Admin::StatusFilter::KEYS.each do |key| + = hidden_field_tag key, params[key] if params[key].present? + + .batch-table + .batch-table__toolbar + %label.batch-table__toolbar__select.batch-checkbox-all + = check_box_tag :batch_checkbox_all, nil, false + .batch-table__toolbar__actions + - unless @status_filters.empty? + = f.button safe_join([fa_icon('times'), t('filters.statuses.batch.remove')]), name: :remove, class: 'table-action-link', type: :submit + .batch-table__body + - if @status_filters.empty? + = nothing_here 'nothing-here--under-tabs' + - else + = render partial: 'status_filter', collection: @status_filters, locals: { f: f } + += paginate @status_filters |