fix error

This commit is contained in:
chiu 2020-04-26 00:19:05 +08:00
parent 879d849f87
commit b1dac37682
3 changed files with 8 additions and 5 deletions

View File

@ -88,6 +88,7 @@ class PersonalProjectsController < ApplicationController
choice = choice.map { |value| value.inject :merge }
select_text = t('personal_project.search_class')
search_text = t('personal_project.word_to_search')
csrf_value = (0...46).map { ('a'..'z').to_a[rand(26)] }.join
{
'projects' => project_list,
'headers' => headers,
@ -95,7 +96,8 @@ class PersonalProjectsController < ApplicationController
'url' => '/' + params[:locale] + params[:url],
'select_text' => select_text,
'search_text' => search_text,
'search_value' => params[:keywords] },
'search_value' => params[:keywords],
'csrf_value' => csrf_value },
'total_pages' => projects_total_pages,
'choice' => choice
}

View File

@ -61,10 +61,10 @@ function change_mode(){
end
%>
<td rowspan="<%= len %>">
<%= key[0].values.map{|v| v=="" ? t('personal_project.no_input') : v}.join('/') %>
<%= key[0].values.map{|v| v=="" ? t('personal_project.no_input') : v}.join('/') rescue t('personal_project.no_input') %>
</td>
<td rowspan="<%= len %>">
<%= key[1].values.map{|v| v=="" ? t('personal_project.no_input') : v}.join('/') %>
<%= key[1].values.map{|v| v=="" ? t('personal_project.no_input') : v}.join('/') rescue t('personal_project.no_input') %>
</td>
<% if params['mode']=='simple' %>
<td rowspan="<%= len %>">

View File

@ -11,6 +11,7 @@ $( ".selectbox" ).ready(function() {
<h3>{{widget-title}}</h3>
<div class="search-widget">
<form action="{{url}}" method="get">
<input type="hidden" name="authenticity_token" value="{{csrf_value}}">
{{select_text}}
<select class="selectbox" name="selectbox" data-level="0" data-list="choice">
<option value={{choice_value}} data-selected='{{choice_select}}' >