Commit ae60deec authored by Thomas Löffler's avatar Thomas Löffler

Add energy pass table

parent a1ed42ba
......@@ -159,6 +159,19 @@ class RealEstate
return $this->getAussenCourtage(false, true) ?: $this->getInnenCourtage(false, true);
}
/**
* @return string
*/
public function getEnergyPassClass()
{
$energyPassClass = $this->getWertklasse();
if (!$energyPassClass) {
$energyPassClass = (string)$this->xml->xpath('//user_defined_simplefield[@feldname="epass_wertklasse"]')[0];
}
return $energyPassClass;
}
/**
* @param string $method
* @param array $arguments
......
......@@ -40,7 +40,8 @@ class OpenImmoXsdService
*/
public function getTypeOfField($field)
{
$elementType = $this->schema->getElement($field)->getType();
$elementType = $this->schema->getElement($field) ? $this->schema->getElement($field)->getType() : false;
$type = 'string';
if ($elementType instanceof \GoetasWebservices\XML\XSDReader\Schema\Type\SimpleType) {
$type = $elementType->getName();
} elseif ($elementType instanceof \GoetasWebservices\XML\XSDReader\Schema\Type\ComplexType) {
......
......@@ -9,6 +9,12 @@
<trans-unit id="Buero_praxen" xml:space="preserve">
<source>Büro / Praxen</source>
</trans-unit>
<trans-unit id="epart_BEDARF" xml:space="preserve">
<source>Eenergiebedarfsausweis</source>
</trans-unit>
<trans-unit id="epart_VERBRAUCH" xml:space="preserve">
<source>Energieverbrauchkennwert</source>
</trans-unit>
</body>
</file>
</xliff>
<tr>
<th scope="row">Endenergiebedarf</th>
<td>{re.endenergiebedarf -> f:format.number(decimals:'2',decimalSeparator:',',thousandsSeparator:'.')} kWh / m<sup>2</sup>a</td>
</tr>
<tr>
<th scope="row">Effizienzklasse</th>
<td>{re.energyPassClass}</td>
</tr>
......@@ -91,6 +91,15 @@
</tbody>
</table>
<f:if condition="{re.epart}">
<table class="property-detail__table">
<caption><f:translate key="epart_{re.epart}" /></caption>
<tbody>
<f:render partial="Show/EnergyPass/{re.epart}" arguments="{re: re}" />
</tbody>
</table>
</f:if>
<h4>Beschreibung</h4>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment