fix error
This commit is contained in:
parent
07a1d9fc64
commit
a4a38201a6
|
@ -108,6 +108,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
choice = choice.map { |value| value.inject :merge }
|
choice = choice.map { |value| value.inject :merge }
|
||||||
select_text = t('personal_journal.search_class')
|
select_text = t('personal_journal.search_class')
|
||||||
search_text = t('personal_journal.word_to_search')
|
search_text = t('personal_journal.word_to_search')
|
||||||
|
csrf_value = (0...46).map { ('a'..'z').to_a[rand(26)] }.join
|
||||||
{
|
{
|
||||||
'journal_papers' => journal_paper_list,
|
'journal_papers' => journal_paper_list,
|
||||||
'headers' => headers,
|
'headers' => headers,
|
||||||
|
@ -115,7 +116,8 @@ class PersonalJournalsController < ApplicationController
|
||||||
'url' => '/' + I18n.locale.to_s + params[:url],
|
'url' => '/' + I18n.locale.to_s + params[:url],
|
||||||
'select_text' => select_text,
|
'select_text' => select_text,
|
||||||
'search_text' => search_text,
|
'search_text' => search_text,
|
||||||
'search_value' => params[:keywords] },
|
'search_value' => params[:keywords],
|
||||||
|
'csrf_value' => csrf_value },
|
||||||
'total_pages' => journal_papers_total_pages,
|
'total_pages' => journal_papers_total_pages,
|
||||||
'choice' => choice
|
'choice' => choice
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,10 +61,10 @@ function change_mode(){
|
||||||
end
|
end
|
||||||
%>
|
%>
|
||||||
<td rowspan="<%= len %>">
|
<td rowspan="<%= len %>">
|
||||||
<%= key[0].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %>
|
<%= key[0].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') rescue t('personal_journal.no_input') %>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="<%= len %>">
|
<td rowspan="<%= len %>">
|
||||||
<%= key[1].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %>
|
<%= key[1].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') rescue t('personal_journal.no_input') %>
|
||||||
</td>
|
</td>
|
||||||
<% if params['mode']=='simple' %>
|
<% if params['mode']=='simple' %>
|
||||||
<td rowspan="<%= len %>">
|
<td rowspan="<%= len %>">
|
||||||
|
|
|
@ -11,8 +11,9 @@ $( ".selectbox" ).ready(function() {
|
||||||
<h3>{{widget-title}}</h3>
|
<h3>{{widget-title}}</h3>
|
||||||
<div class="search-widget">
|
<div class="search-widget">
|
||||||
<form action="{{url}}" method="get">
|
<form action="{{url}}" method="get">
|
||||||
{{select_text}}
|
<input type="hidden" name="authenticity_token" value="{{csrf_value}}">
|
||||||
<select class="selectbox" name="selectbox" data-level="0" data-list="choice">
|
{{select_text}}
|
||||||
|
<select class="selectbox" name="selectbox" data-level="0" data-list="choice">
|
||||||
<option value={{choice_value}} data-selected='{{choice_select}}' >
|
<option value={{choice_value}} data-selected='{{choice_select}}' >
|
||||||
{{choice_show}}</option>
|
{{choice_show}}</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
Loading…
Reference in New Issue