2020-10-23 02:52:23 +00:00
|
|
|
<tr>
|
|
|
|
<td class="remove_div">❌</td>
|
|
|
|
<td class="sort_div"></td>
|
|
|
|
<% keys.each do |key| %>
|
|
|
|
<% if key.include? "_file" %>
|
|
|
|
<td>
|
|
|
|
<%= render :partial => 'form_file', :object => (CancerPredictMappingFile.where(:id=> property[key]).first rescue nil), :locals => {:f => make_fields, :key=>key} %>
|
|
|
|
</td>
|
|
|
|
<% else %>
|
|
|
|
<% value = property[key] %>
|
|
|
|
<% if property == {} %>
|
|
|
|
<% value_type = Cancerpredictfields::FIELDINFO[key].constantize rescue String %>
|
|
|
|
<% value = "[]" if value_type == Array %>
|
|
|
|
<% else %>
|
|
|
|
<% value_type = value.class %>
|
2019-11-15 00:44:28 +00:00
|
|
|
<% end %>
|
2020-10-23 02:52:23 +00:00
|
|
|
<% @value= value %>
|
|
|
|
<% if value_type == BSON::Document || value_type == Hash %>
|
|
|
|
<% @disp_value = @value[I18n.locale.to_s] rescue "" %>
|
|
|
|
<%else%>
|
|
|
|
<% @disp_value = @value %>
|
|
|
|
<%end%>
|
|
|
|
<% if value_type == Fixnum %>
|
|
|
|
<% if @value == 1%>
|
|
|
|
<td><%= make_fields.check_box key,{:checked=>true,:class=>"checkbox",:style=>"float:left;"}%></td>
|
|
|
|
<% else%>
|
|
|
|
<td><%= make_fields.check_box key,{:checked=>false,:class=>"checkbox",:style=>"float:left;"}%></td>
|
|
|
|
<%end%>
|
2022-01-22 04:52:03 +00:00
|
|
|
<% elsif Cancerpredictfields::NonLoclaized.exclude?(key) %>
|
2020-10-23 02:52:23 +00:00
|
|
|
<%=make_fields.fields_for I18n.locale.to_s do |locale_fields|%>
|
|
|
|
<td><%= locale_fields.text_field key,{:value=>@disp_value}%></td>
|
|
|
|
<%end%>
|
|
|
|
<% else %>
|
|
|
|
<td><%= make_fields.text_field key,{:value=>@disp_value}%></td>
|
|
|
|
<%end%>
|
|
|
|
<%end%>
|
|
|
|
<%end%>
|
|
|
|
<td><%= make_fields.hidden_field :old_num,:value=>num.to_s %></td>
|
|
|
|
</tr>
|