Fixed issue 8, show the featured downloads on the homepage.
This commit is contained in:
@@ -185,6 +185,19 @@ class IDF_Views_Download
|
||||
}
|
||||
return substr($auto, 0, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the download tags.
|
||||
*
|
||||
* @param IDF_Project
|
||||
* @return ArrayObject The tags
|
||||
*/
|
||||
public static function getDownloadTags($project)
|
||||
{
|
||||
return $project->getTagsFromConfig('labels_downloads_predefined',
|
||||
IDF_Form_UploadConf::init_predefined);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -39,10 +39,14 @@ class IDF_Views_Project
|
||||
$prj = $request->project;
|
||||
$team = $prj->getMembershipData();
|
||||
$title = (string) $prj;
|
||||
$tags = IDF_Views_Download::getDownloadTags($prj);
|
||||
// the first tag is the featured, the last is the deprecated.
|
||||
$downloads = $tags[0]->get_idf_upload_list();
|
||||
return Pluf_Shortcuts_RenderToResponse('project-home.html',
|
||||
array(
|
||||
'page_title' => $title,
|
||||
'team' => $team,
|
||||
'downloads' => $downloads,
|
||||
),
|
||||
$request);
|
||||
}
|
||||
|
Reference in New Issue
Block a user