app/helpers/search_results_helper.rb in iqvoc-4.2.0 vs app/helpers/search_results_helper.rb in iqvoc-4.3.0
- old
+ new
@@ -14,12 +14,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
module SearchResultsHelper
- def select_search_checkbox?(lang)
+ def search_language_selected?(lang)
(params[:languages] && params[:languages].include?(lang.to_s)) ||
(!params[:query] && I18n.locale.to_s == lang.to_s)
+ end
+
+ def search_dataset_selected?(adaptor)
+ params[:datasets] && params[:datasets].include?(adaptor.to_s)
end
def highlight_query(text, query)
query.split(/\n/).each do |q|
# call to ActiveSupport's highlight