view openmindattribute/templates/openmindattribute_PERSON.tpl.php @ 9:cf772424f725

changed representation of relations in template. relations have source and target now.
author casties
date Mon, 22 Jun 2015 19:02:34 +0200
parents f651752ee9ad
children
line wrap: on
line source

<h3 class="openmindattribute-header">Details</h3>

<table class="openmindattribute-table" >
<tr class="openmindattribute-row">
<td class="openmindattribute-cell openmindattribute-name">Name</td>
<td class="openmindattribute-cell"><?php print $attributes['name']['ov'] ?><br/>
<?php print $attributes['name_translit']['romanization']?></td>
</tr>

<?php if (isset($attributes['birth_date_text']['ov'])): ?>
<tr class="openmindattribute-row">
<td class="openmindattribute-cell openmindattribute-name">Birth Date</td>
<td class="openmindattribute-cell"><?php print $attributes['birth_date_text']['ov'] ?></td>
</tr>
<?php endif; ?>

<?php if (isset($relations['was_born_in'])): ?>
<tr class="openmindattribute-row">
<td class="openmindattribute-cell openmindattribute-name">Place of Birth</td>
<td class="openmindattribute-cell"><?php print $relations['was_born_in'][0]['target']->title ?></td>
</tr>
<?php endif; ?>

<?php if (isset($attributes['death_date_text']['ov'])): ?>
<tr class="openmindattribute-row">
<td class="openmindattribute-cell openmindattribute-name">Death Date</td>
<td class="openmindattribute-cell"><?php print $attributes['death_date_text']['ov'] ?></td>
</tr>
<?php endif; ?>

<?php if (isset($relations['died_in'])): ?>
<tr class="openmindattribute-row">
<td class="openmindattribute-cell openmindattribute-name">Place of Death</td>
<td class="openmindattribute-cell"><?php print $relations['died_in'][0]['target']->title ?></td>
</tr>
<?php endif; ?>

<?php if (isset($relations['was_student_of'])): ?>
<tr class="openmindattribute-row">
<td class="openmindattribute-cell openmindattribute-name">Teachers</td>
<td class="openmindattribute-cell"><?php print $relations['was_student_of'][0]['target']->title ?></td>
</tr>
<?php endif; ?>

<?php if (isset($attributes['notes']['ov'])): ?>
<tr class="openmindattribute-row">
<td class="openmindattribute-cell openmindattribute-name">Notes</td>
<td class="openmindattribute-cell"><?php print $attributes['notes']['ov'] ?></td>
</tr>
<?php endif; ?>

</table>