Ejemplo n.º 1
0
function showRealese(\Model\programs\Revision $rev, \Model\programs\Version $ver)
{
    $more = "";
    if (is_numeric($rev->getDownloadLink())) {
        $dwld = new \Model\downloads\Download($rev->getDownloadLink());
        $link = "downloads.Download.html?id=" . $rev->getDownloadLink();
        $more = "(nbDownload : " . $dwld->getNbDownload() . ')';
    } else {
        $link = $rev->getDownloadLink();
    }
    echo '<li><span class="release_name">V' . $rev->getRevisionName() . '</span> -<a href="' . $link . '"><span class="release_dwld">Download</span></a>-  ' . $more . '';
    if ($rev->IsBeta()) {
        echo '<span class="realese_beta"> BETA</span>';
    }
    echo '</li>';
    if ($rev->IsBeta()) {
        //Try to find other realeses;
        $realeses = $ver->getAllRevisions();
        foreach ($realeses as $r) {
            if (!$r->IsBeta()) {
                echo '<li>V' . $r->getRevisionName() . ' -<span class="release_dwld">Download</span></li>-';
                break;
            }
        }
    }
}
Ejemplo n.º 2
0
 public function addVersion(Version $version)
 {
     $this->versions[] = $version;
     if ($version->getName() == 'main') {
         $this->masterVersion = $version;
     }
 }
Ejemplo n.º 3
0
 public function setVersion(Version $re)
 {
     $this->addParams('revisions', $re->getAllRevisions());
     return $this;
 }