Added a project home.
This commit is contained in:
parent
ccf24df131
commit
c50e218704
@ -31,6 +31,23 @@ Pluf::loadFunction('Pluf_Shortcuts_GetFormForModel');
|
||||
*/
|
||||
class IDF_Views_Project
|
||||
{
|
||||
/**
|
||||
* Home page of a project.
|
||||
*/
|
||||
public function home($request, $match)
|
||||
{
|
||||
$prj = $request->project;
|
||||
$team = $prj->getMembershipData();
|
||||
$title = (string) $prj;
|
||||
return Pluf_Shortcuts_RenderToResponse('project-home.html',
|
||||
array(
|
||||
'page_title' => $title,
|
||||
'team' => $team,
|
||||
),
|
||||
$request);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Administrate the summary of a project.
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@
|
||||
<div id="header">
|
||||
<div id="main-tabs">
|
||||
{if $project}
|
||||
{* <a href="{url 'IDF_Views_Project::home', array($project.shortname)}"{block tabhome}{/block}>{trans 'Project Home'}</a> *}
|
||||
<a href="{url 'IDF_Views_Project::home', array($project.shortname)}"{block tabhome}{/block}>{trans 'Project Home'}</a>
|
||||
<a href="{url 'IDF_Views_Issue::index', array($project.shortname)}"{block tabissues}{/block}>{trans 'Issues'}</a>
|
||||
<a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, 'master')}"{block tabsource}{/block}>{trans 'Source'}</a>
|
||||
{if $isOwner}
|
||||
|
@ -6,7 +6,7 @@
|
||||
{if $user.administrator}<p>{blocktrans}Create a new project.{/blocktrans}</p>{/if}
|
||||
{else}
|
||||
<ul>{foreach $projects as $p}
|
||||
<li><a href="{url 'IDF_Views::projectHome', array($p.shortname)}">{$p}</a> - {$p.description}</li>
|
||||
<li><a href="{url 'IDF_Views_Project::home', array($p.shortname)}">{$p}</a></li>
|
||||
{/foreach}</ul>
|
||||
{/if}
|
||||
{/block}
|
||||
|
29
src/IDF/templates/project-home.html
Normal file
29
src/IDF/templates/project-home.html
Normal file
@ -0,0 +1,29 @@
|
||||
{extends "base.html"}
|
||||
{block tabhome} class="active"{/block}
|
||||
{block subtabs}
|
||||
<div id="sub-tabs">
|
||||
{trans 'Welcome'} {superblock}
|
||||
</div>
|
||||
{/block}
|
||||
{block body}
|
||||
{$project.description}
|
||||
{/block}
|
||||
{block context}
|
||||
{assign $ko = 'owners'}
|
||||
{assign $km = 'members'}
|
||||
<p><strong>{trans 'Development Team'}</strong><br />
|
||||
{trans 'Admins'}<br />
|
||||
{foreach $team[$ko] as $owner}
|
||||
<span class="label">{$owner}</span><br />
|
||||
{/foreach}
|
||||
|
||||
{if count($team[$km]) > 0}
|
||||
{trans 'Happy Crew'}<br />
|
||||
{foreach $team[$km] as $member}
|
||||
<span class="label">{$member}</span><br />
|
||||
{/foreach}
|
||||
{/if}
|
||||
</p>
|
||||
{/block}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user