app/views/searches/index.html.slim
- search_breadcrumb
- content_for :page_header_title, Search::Save.model_name.human(count: 2)
.page_content x-data="{ saveSearchPanel: true, graphPanel: true }"
.container-fluid
= render partial: "#{parent_resources}/filters"
- if saved_searches.present?
.row
.col-lg-12
= table_builder_2 saved_searches,
[ \
TableBuilderHelper::Column.new( \
key: :name, \
attribute: :name, \
link_to: lambda { |saved_search| saved_search_path(saved_search) } \
),
TableBuilderHelper::Column.new( \
key: :description, \
attribute: :description \
),
TableBuilderHelper::Column.new( \
key: :last_used_at, \
attribute: Proc.new { |n| l(n.last_used_at, format: :short_with_time) if n.last_used_at }, \
),
TableBuilderHelper::Column.new( \
key: :creator, \
attribute: :creator \
),
].compact,
cls: 'table has-filter has-search'
- else
.row.mt-xs
.col-lg-12
= replacement_msg t('searches.search_no_results')