% property = Property.where(id: @data['property_id']).first %> <% email_set = property.hire_email_sets.select{|v| v.field_name == 'edit'} %> <% 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_edit_success') %> <% end %>
<%= k=='category' ? t('category') : t("property_hire.#{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 %> <% 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(', ') rescue nil %> <% elsif ['category','property_location'].include?(k) %> <%= v.title rescue nil %> <% elsif k == 'can_be_hired' %> <%= v ? t('yes_') : t('no_') %> <% else %> <%= v %> <% end %> |