❌ |
|
<% keys.each do |key| %>
<% if key.include? "_file" %>
<%= render :partial => 'form_file', :object => (CancerPredictMappingFile.where(:id=> property[key]).first rescue nil), :locals => {:f => make_fields, :key=>key} %>
|
<% else %>
<% value = property[key] %>
<% if property == {} %>
<% value_type = Cancerpredictfields::FIELDINFO[key].constantize rescue String %>
<% value = "[]" if value_type == Array %>
<% else %>
<% value_type = value.class %>
<% end %>
<% @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%>
<%= make_fields.check_box key,{:checked=>true,:class=>"checkbox",:style=>"float:left;"}%> |
<% else%>
<%= make_fields.check_box key,{:checked=>false,:class=>"checkbox",:style=>"float:left;"}%> |
<%end%>
<% elsif Cancerpredictfields::NonLoclaized.exclude?(key) %>
<%=make_fields.fields_for I18n.locale.to_s do |locale_fields|%>
<%= locale_fields.text_field key,{:value=>@disp_value}%> |
<%end%>
<% else %>
<%= make_fields.text_field key,{:value=>@disp_value}%> |
<%end%>
<%end%>
<%end%>
<%= make_fields.hidden_field :old_num,:value=>num.to_s %> |