Ejemplo n.º 1
0
 */
$content = new Content();
$content->set('browser_title', 'Editions');
$content->set('page_title', '<h2>Editions</h2>');
/*
 * Get editions.
 */
$editions = $edition_obj->all();
$body = '<p>
	These are the available editions of the code.
</p>';
$body .= '<ol class="edition-list">';
foreach ($editions as $edition) {
    // If we have a passed url, use it.
    if ($_GET['from']) {
        $from_permalink = $permalink_obj->translate_permalink($_GET['from'], $edition->id);
    }
    // Translate our url into a shiny new permalink.
    $browse_permalink = $permalink_obj->translate_permalink('/browse/', $edition->id);
    $body .= '<li>';
    if ($edition->current) {
        $body .= '<span class="current-edition">' . $edition->name . '</span>';
    } else {
        $body .= $edition->name;
    }
    if ($edition->last_import) {
        $body .= ' - updated ' . date('M d, Y', strtotime($edition->last_import)) . '';
    }
    if ($edition->current) {
        $body .= ' (Current Edition)';
    }