Compare commits
1 Commits
master
...
revert-e1e
Author | SHA1 | Date |
---|---|---|
wmcheng | 17e2c67acd |
|
@ -69,51 +69,39 @@ class PropertyHiresController < ApplicationController
|
||||||
"value" => property.note
|
"value" => property.note
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
if !property_hire.property_number.blank?
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.property_number"),
|
"header" => t("property_hire.property_number"),
|
||||||
"value" => property.property_number
|
"value" => property.property_number
|
||||||
}
|
}
|
||||||
end
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.can_be_hired"),
|
"header" => t("property_hire.can_be_hired"),
|
||||||
"value" => (property.can_be_hired ? "<span class='label label-success'>Yes</span>" : "<span class='label label-danger'>No</span>")
|
"value" => (property.can_be_hired ? "<span class='label label-success'>Yes</span>" : "<span class='label label-danger'>No</span>")
|
||||||
}
|
}
|
||||||
if !property_hire.purchase_date.blank?
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.purchase_date"),
|
"header" => t("property_hire.purchase_date"),
|
||||||
"value" => property.purchase_date.strftime("%Y-%m-%d")
|
"value" => property.purchase_date.strftime("%Y-%m-%d")
|
||||||
}
|
}
|
||||||
end
|
|
||||||
if property.owners.empty?
|
if property.owners.empty?
|
||||||
owners = property.other_owner
|
owners = property.other_owner
|
||||||
else
|
else
|
||||||
owners = property.owner_profiles.collect{|mp| mp.name}.join(",")
|
owners = property.owner_profiles.collect{|mp| mp.name}.join(",")
|
||||||
end
|
end
|
||||||
if !property_hire.owners.blank?
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.owners"),
|
"header" => t("property_hire.owners"),
|
||||||
"value" => owners
|
"value" => owners
|
||||||
}
|
}
|
||||||
end
|
|
||||||
if !property_hire.owner_email.blank?
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.owner_email"),
|
"header" => t("property_hire.owner_email"),
|
||||||
"value" => property.owner_email
|
"value" => property.owner_email
|
||||||
}
|
}
|
||||||
end
|
|
||||||
if !property_hire.owner_phone.blank?
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.owner_phone"),
|
"header" => t("property_hire.owner_phone"),
|
||||||
"value" => property.owner_phone
|
"value" => property.owner_phone
|
||||||
}
|
}
|
||||||
end
|
|
||||||
if !property_hire.price.blank?
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.price"),
|
"header" => t("property_hire.price"),
|
||||||
"value" => property.price
|
"value" => property.price
|
||||||
}
|
}
|
||||||
end
|
|
||||||
data << {
|
data << {
|
||||||
"header" => t("property_hire.location"),
|
"header" => t("property_hire.location"),
|
||||||
"value" => property.get_location_name
|
"value" => property.get_location_name
|
||||||
|
|
Loading…
Reference in New Issue