<?php

if (sfConfig::get('app_multi_repository')) {
    ?>
  <?php 
    echo render_show_repository(sfConfig::get('app_ui_label_repository'), $resource);
}
?>

<?php 
echo get_component('informationobject', 'creator', array('resource' => $resource));
?>

<?php 
echo get_component('digitalobject', 'imageflow', array('resource' => $resource));
?>

<div>
  <h3>
    <?php 
if (isset($resource->getCollectionRoot()->levelOfDescription)) {
    ?>
      <?php 
    echo $resource->getCollectionRoot()->levelOfDescription;
    ?>
    <?php 
} else {
    ?>
      <?php 
    echo sfConfig::get('app_ui_label_collection');
    ?>
      <h3><?php 
    echo __('Related function');
    ?>
</h3>
      <div>
        <?php 
    echo link_to(render_title($item->subject->getLabel()), array($item->subject, 'module' => 'function'));
    ?>
      </div>
    </div>
  <?php 
}
?>

  <?php 
echo render_show_repository(__('Repository'), $resource);
?>

  <?php 
echo render_show(__('Archival history'), render_value($resource->getArchivalHistory(array('cultureFallback' => true))));
?>

  <?php 
echo render_show(__('Immediate source of acquisition or transfer'), render_value($resource->getAcquisition(array('cultureFallback' => true))));
?>

</div> <!-- /.section#contextArea -->

<div class="section" id="contentAndStructureArea">

  <?php 
?>

<?php 
echo render_show(__('Source'), render_value($resource->getLocationOfOriginals(array('cultureFallback' => true))));
?>

<?php 
foreach ($resource->language as $code) {
    ?>
  <?php 
    echo render_show(__('Language'), format_language($code));
}
?>

<?php 
echo render_show_repository(__('Relation (isLocatedAt)'), $resource);
?>

<?php 
foreach ($dc->coverage as $item) {
    ?>
  <?php 
    echo render_show(__('Coverage (spatial)'), link_to(render_title($item), array($item, 'module' => 'term', 'action' => 'browseTerm')));
}
?>

<?php 
echo render_show(__('Rights'), render_value($resource->getAccessConditions(array('cultureFallback' => true))));
?>

<div class="section" id="rightsArea">