% 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 %>
<%= @data['content'].html_safe %>
<% property = Property.where(id: @data['property_id']).first %>
<% if !property.nil? %>
<%= k=='category' ? t('category') : t("property_hire.#{k}") %>: | <% 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 k == 'category' %> <%= v.title %> <% elsif k == 'can_be_hired' %> <%= v ? t('yes_') : t('no_') %> <% else %> <%= v %> <% end %> |