48 lines
1.7 KiB
Plaintext
48 lines
1.7 KiB
Plaintext
<% if !@data['email_set_content'].nil? %>
|
|
<% email_set_content = YAML.load(@data['email_set_content'])
|
|
now_locale = @data['locale'] %>
|
|
<%= email_set_content[now_locale].html_safe rescue nil %>
|
|
<% end %>
|
|
<br>
|
|
<%= @data['content'].html_safe %>
|
|
|
|
<% property = Property.where(id: @data['property_id']).first %>
|
|
<% if !property.nil? %>
|
|
<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 %>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</thead>
|
|
<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| %>
|
|
<% v = property.send(k) %>
|
|
<tr>
|
|
<td>
|
|
<%= k=='category' ? t('category') : t("property_hire.#{k}") %>:
|
|
</td>
|
|
<td>
|
|
<% if ['purchase_date'].include?(k) %>
|
|
<%= v.strftime('%Y/%m/%d %H:%M') rescue nil %>
|
|
<% elsif ['property_usage','note'].include?(k) %>
|
|
<%= property[k].collect{|k,v| v}.uniq.join('/') rescue nil %>
|
|
<% elsif k=='owners' %>
|
|
<%= property.owner_profiles.collect{|v| v.name}.join(', ') %>
|
|
<% elsif ['category','property_location'].include?(k) %>
|
|
<%= v.title %>
|
|
<% elsif k == 'can_be_hired' %>
|
|
<%= v ? t('yes_') : t('no_') %>
|
|
<% else %>
|
|
<%= v %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
<% end %> |