Indefero

Indefero Commit Details


Date:2008-07-29 14:18:02 (16 years 4 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, newdiff, release-1.1, release-1.2, release-1.3, svn
Commit:c50e218704dcc81eb346cc757e4c1bdbd0808d8b
Parents: ccf24df13120ae1e64225ec27db1ee647c9df4d4
Message:Added a project home.

Changes:

File differences

src/IDF/Views/Project.php
3232
3333
3434
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
3552
3653
3754
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.
*/
public $admin_precond = array('IDF_Precondition::projectOwner');
src/IDF/templates/base.html
4141
4242
4343
44
44
4545
4646
4747
<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}
src/IDF/templates/index.html
66
77
88
9
9
1010
1111
1212
{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}
src/IDF/templates/project-home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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}

Archive Download the corresponding diff file

Page rendered in 0.09829s using 13 queries.