Added ticket 45, base implementation of a timeline.

Still some cleaning of the code to have a nicer display of the timeline
especially for the issue updates.
This commit is contained in:
Loic d'Anterroches
2008-11-14 15:41:51 +01:00
parent 386ff894fc
commit b85da85dfe
13 changed files with 585 additions and 32 deletions

View File

@@ -45,7 +45,7 @@ class IDF_Views_Project
// 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',
return Pluf_Shortcuts_RenderToResponse('project/home.html',
array(
'page_title' => $title,
'team' => $team,
@@ -54,6 +54,32 @@ class IDF_Views_Project
$request);
}
/**
* Timeline of the project.
*/
public function timeline($request, $match)
{
$prj = $request->project;
$title = sprintf(__('%s Timeline'), (string) $prj);
$team = $prj->getMembershipData();
$sql = new Pluf_SQL('project=%s', array($prj->id));
$timeline = Pluf::factory('IDF_Timeline')->getList(array('filter'=>$sql->gen(), 'order' => 'creation_dtime DESC'));
$downloads = array();
if ($request->rights['hasDownloadsAccess']) {
$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/timeline.html',
array(
'page_title' => $title,
'timeline' => $timeline,
'team' => $team,
'downloads' => $downloads,
),
$request);
}
/**
* Administrate the summary of a project.