mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-09 22:55:34 +08:00
Fix protocol table filtering by keywords [SCI-957]
This commit is contained in:
parent
3e6d11a087
commit
17a53cbd7f
1 changed files with 4 additions and 2 deletions
|
|
@ -190,9 +190,11 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base
|
||||||
kws = record.protocol_keywords_str.split(", ")
|
kws = record.protocol_keywords_str.split(", ")
|
||||||
res = []
|
res = []
|
||||||
kws.sort_by{ |word| word.downcase }.each do |kw|
|
kws.sort_by{ |word| word.downcase }.each do |kw|
|
||||||
res << "<a href='#' data-action='filter' data-param='#{kw}'>#{kw}</a>"
|
sanitized_kw = sanitize_input(kw)
|
||||||
|
res << "<a href='#' data-action='filter' " \
|
||||||
|
"data-param='#{sanitized_kw}'>#{sanitized_kw}</a>"
|
||||||
end
|
end
|
||||||
sanitize_input(res.join(', '))
|
res.join(', ')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue