?>
<div id="last_docs" class="latest">
<?php 
if (!isset($default_open)) {
    $default_open = true;
}
include_partial('documents/home_section_title', array('module' => 'docs', 'custom_title_icon' => 'list', 'has_title_link' => false, 'has_title_rss' => true, 'custom_title_text' => __('Latest documents'), 'custom_rss' => link_to('', $sf_request->getUriPrefix() . '/static/rss/latest_docs.rss', array('class' => 'home_title_right picto_rss', 'title' => __("Subscribe to latest documents creations")))));
?>
<div id="last_docs_section_container" class="home_container_text">
<?php 
try {
    $rssfile = SF_ROOT_DIR . '/web/static/rss/latest_docs.rss';
    if (file_exists($rssfile)) {
        $rss = file_get_contents($rssfile);
        $feed = sfFeedPeer::createFromXml($rss, $sf_request->getUriPrefix() . '/documents/latest');
        $items = array_reverse(sfFeedPeer::aggregate(array($feed))->getItems(), true);
    } else {
        $items = array();
    }
} catch (Exception $e) {
    $items = array();
}
if (count($items) == 0) {
    ?>
    <p><?php 
    echo __('No recent changes available');
    ?>
</p>
<?php 
} else {
    ?>
 /**
  * Displays the latest changes to the registry
  *
  */
 public function getChangeFeed()
 {
     try {
         $feed1 = sfFeedPeer::createFromWeb($this->getRequest()->getUriPrefix() . "/schemahistory/feed.atom");
         $feed2 = sfFeedPeer::createFromWeb($this->getRequest()->getUriPrefix() . "/history/feed.atom");
         if ($feed1 && $feed2) {
             $image = new sfFeedImage();
             $image->setFavicon($this->getRequest()->getUriPrefix() . "/favicon.ico");
             $image->setFeed($this->getRequest()->getUriPrefix() . "/allhistoryfeeds.atom");
             $image->setLink($image->getFeed());
             $image->setTitle("Metadata Registry Change History");
             $this->feed = sfFeedPeer::aggregate(array($feed1, $feed2), array('limit' => 100, 'format' => 'atom1', 'link' => $image->getLink(), 'title' => $image->getTitle(), 'feedUrl' => $image->getFeed(), 'image' => $image, 'description' => 'A statement-level list of all of the recent changes to the vocabularies and element sets maintained in the Metadata registry.'));
             $this->changeFeedItems = $this->feed->getItems();
         }
     } catch (Exception $e) {
     }
 }