Merge branch 'master' into 'master'
fix search error See merge request !5
This commit is contained in:
commit
a70abccae1
|
@ -29,6 +29,10 @@ class PersonalProjectsController < ApplicationController
|
||||||
projects_show = projects_temp.select { |value| search_all_words(t(value.send('language')), params[:keywords]) }
|
projects_show = projects_temp.select { |value| search_all_words(t(value.send('language')), params[:keywords]) }
|
||||||
when 'participator'
|
when 'participator'
|
||||||
projects_show = projects_temp.select { |value| search_all_words(get_authors_text(value), params[:keywords]) }
|
projects_show = projects_temp.select { |value| search_all_words(get_authors_text(value), params[:keywords]) }
|
||||||
|
when 'abstract'
|
||||||
|
projects_show = projects_temp.select { |value| search_all_words(Nokogiri::HTML(value.abstract).text, params[:keywords]) }
|
||||||
|
when 'note'
|
||||||
|
projects_show = projects_temp.select { |value| search_all_words(Nokogiri::HTML(value.note).text, params[:keywords]) }
|
||||||
else
|
else
|
||||||
projects_show = projects_temp.select { |value| search_all_words(value.send(params[:selectbox]).to_s, params[:keywords]) }
|
projects_show = projects_temp.select { |value| search_all_words(value.send(params[:selectbox]).to_s, params[:keywords]) }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,17 +1,7 @@
|
||||||
<script src="https://kit.fontawesome.com/1fa49cfdc9.js" crossorigin="anonymous"></script>
|
<script src="https://kit.fontawesome.com/1fa49cfdc9.js" crossorigin="anonymous"></script>
|
||||||
<script>
|
<script>
|
||||||
function MergeUrl(){
|
function MergeUrl(){
|
||||||
var temp_url = location.href
|
location.href = '<%= merge_admin_projects_path %>'
|
||||||
if (temp_url.search("locale=")!=-1){
|
|
||||||
var tp=temp_url.lastIndexOf('/')
|
|
||||||
location.href = temp_url.substring(0,tp+1)+"merge/"+temp_url.substring(tp+1)
|
|
||||||
}
|
|
||||||
else if (temp_url.slice(-1)=='/'){
|
|
||||||
location.href = location.href + "merge"
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
location.href = location.href + "/merge"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<table class="table main-list">
|
<table class="table main-list">
|
||||||
|
|
Loading…
Reference in New Issue