fix error
This commit is contained in:
parent
a17980e7a7
commit
8342a17aca
|
@ -9,7 +9,6 @@
|
||||||
<% property = Property.where(id: @data['property_id']).first %>
|
<% property = Property.where(id: @data['property_id']).first %>
|
||||||
<% if !property.nil? %>
|
<% if !property.nil? %>
|
||||||
<h3><%= property['title'].collect{|k,v| v}.uniq.join('/') rescue nil %></h3>
|
<h3><%= property['title'].collect{|k,v| v}.uniq.join('/') rescue nil %></h3>
|
||||||
<%= t('property_hire.editor') %>: <%= User.find(user_id).name rescue nil %>
|
|
||||||
<% I18n.with_locale(@data['locale']) do %>
|
<% I18n.with_locale(@data['locale']) do %>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -19,14 +18,16 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% ['property_usage','note','category','property_location','property_number','can_be_hired','purchase_date','owners','other_owner','owner_email','owner_phone','price'].each do |k| %>
|
<% ['editor','property_usage','note','category','property_location','property_number','can_be_hired','purchase_date','owners','other_owner','owner_email','owner_phone','price'].each do |k| %>
|
||||||
<% v = property.send(k) %>
|
<% v = property.send(k) rescue nil %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<%= k=='category' ? t('category') : t("property_hire.#{k}") %>:
|
<%= k=='category' ? t('category') : t("property_hire.#{k}") %>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if ['purchase_date'].include?(k) %>
|
<% if k == 'editor' %>
|
||||||
|
<%= User.find(user_id).name rescue nil %>
|
||||||
|
<% elsif ['purchase_date'].include?(k) %>
|
||||||
<%= v.strftime('%Y/%m/%d %H:%M') rescue nil %>
|
<%= v.strftime('%Y/%m/%d %H:%M') rescue nil %>
|
||||||
<% elsif ['property_usage','note'].include?(k) %>
|
<% elsif ['property_usage','note'].include?(k) %>
|
||||||
<%= property[k].collect{|k,v| v}.uniq.join('/') rescue nil %>
|
<%= property[k].collect{|k,v| v}.uniq.join('/') rescue nil %>
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
<%= t('property_hire.email_edit_success') %>
|
<%= t('property_hire.email_edit_success') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<h3><%= property['title'].collect{|k,v| v}.uniq.join('/') rescue nil %></h3>
|
<h3><%= property['title'].collect{|k,v| v}.uniq.join('/') rescue nil %></h3>
|
||||||
<%= t('property_hire.editor') %>: <%= User.find(user_id).name rescue nil %>
|
|
||||||
<% I18n.with_locale(@data['locale']) do %>
|
<% I18n.with_locale(@data['locale']) do %>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -18,14 +17,16 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% ['property_usage','note','category','property_location','property_number','can_be_hired','purchase_date','owners','other_owner','owner_email','owner_phone','price'].each do |k| %>
|
<% ['editor','property_usage','note','category','property_location','property_number','can_be_hired','purchase_date','owners','other_owner','owner_email','owner_phone','price'].each do |k| %>
|
||||||
<% v = property.send(k) %>
|
<% v = property.send(k) rescue nil %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<%= k=='category' ? t('category') : t("property_hire.#{k}") %>:
|
<%= k=='category' ? t('category') : t("property_hire.#{k}") %>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if ['purchase_date'].include?(k) %>
|
<% if k == 'editor' %>
|
||||||
|
<%= User.find(user_id).name rescue nil %>
|
||||||
|
<% elsif ['purchase_date'].include?(k) %>
|
||||||
<%= v.strftime('%Y/%m/%d %H:%M') rescue nil %>
|
<%= v.strftime('%Y/%m/%d %H:%M') rescue nil %>
|
||||||
<% elsif ['property_usage','note'].include?(k) %>
|
<% elsif ['property_usage','note'].include?(k) %>
|
||||||
<%= property[k].collect{|k,v| v}.uniq.join('/') rescue nil %>
|
<%= property[k].collect{|k,v| v}.uniq.join('/') rescue nil %>
|
||||||
|
|
Loading…
Reference in New Issue