File tree Expand file tree Collapse file tree
app/views/rails_admin/main
lib/rails_admin/config/sections Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383 < i class ="fas fa-times "> </ i >
8484 </ button >
8585 </ div >
86+ <% if @model_config . list . search_help . present? %>
87+ < div class ="form-text "> <%= @model_config . list . search_help %> </ div >
88+ <% end %>
8689 </ div >
8790 < div class ="col-sm-6 text-end ">
8891 <% if export_action %>
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ class List < RailsAdmin::Config::Sections::Base
3030 nil
3131 end
3232
33+ register_instance_option :search_help do
34+ nil
35+ end
36+
3337 register_instance_option :sort_by do
3438 parent . abstract_model . primary_key
3539 end
Original file line number Diff line number Diff line change 321321 } ,
322322 ]
323323 end
324+
325+ it 'shows the help text below the search box' do
326+ RailsAdmin . config Player do
327+ list do
328+ search_help 'Use this box to search!'
329+ end
330+ end
331+ visit index_path ( model_name : 'player' )
332+ is_expected . to have_css ( '.form-text' , text : /Use this box/ )
333+ end
324334 end
325335
326336 describe 'fields' do
You can’t perform that action at this time.
0 commit comments