% property = Property.where(id: @data['property_id']).first%>
<% email_set = property.hire_email_sets.select{|v| v.field_name == 'p_hire'} %>
<% if email_set.length != 0 %>
<% if !(email_set[0].content.nil?) %>
<%= email_set[0].content[@data['locale']].html_safe %>
<% end %>
<% else %>
<%= t('property_hire.email_p_hire_content') %>
<% end %>
<% I18n.with_locale(@data['locale']) do %>
<%= t("property_hire.#{k}") %>: | <% if ['start_time','end_time','recurring','recurring_interval','recurring_end_date','passed'].exclude?(k) %> <%= v.to_s.html_safe %> <% elsif ['start_time','end_time','recurring_end_date'].include?(k) %> <%= v.strftime('%Y/%m/%d %H:%M') rescue nil %> <% elsif k == 'recurring_interval' %> <%= t("property_hire.recurring_interval_types.#{v}") %> <% elsif 'recurring' == k %> <%= v ? t('property_hire.yes') : t('property_hire.no') %> <% else %> <%= v ? t('property_hire.yes') : t('property_hire.wait_for_permit') %> <% end %> |