The categories.html template is used in three places:
1) for the tabs on the result page
2) for the default category selection in the preferences
3) for the advanced search category selection in the oscar theme
The search_on_category_select plugin only makes the checkboxes in 1)
behave like tabs. The previous commit however hides the checkboxes
in all three places when the plugin is loaded, which we don't want:
The categories in 2) and 3) always act like checkboxes, so the
checkboxes in these places should actually always be visible.
The search tabs are actually labels for checkboxes because multiple can
be selected. To still make them work like tabs the plugin
search_on_category_select adds a JavaScript that submits the form on
label click.
The problem with this is that when the plugin is disabled (e.g. because
JavaScript is disabled or a user chose to disable it in the settings),
then the tabs still look like tabs but act as checkboxes
(which is very confusing).
This commit changes fixes this so that the checkboxes are visible by
default. The next commit makes the plugin hide them again. This way
they are visible when the plugin is disabled ... as they should be.
Previously all categories were displayed as search engine tabs.
This commit changes that so that only the categories listed under
categories_as_tabs in settings.yml are displayed.
This lets us introduce more categories without cluttering up the UI.
Categories not displayed as tabs can still be searched with !bangs.