Indefero

Indefero Commit Details


Date:2008-08-05 13:33:43 (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, release-1.1, release-1.2, release-1.3, svn
Commit:64f41c0cd219e5abd99ef46ab9045474289e77a2
Parents: 884a41fbba1708e8bcf0e1f5eeb72bf0898eb60b
Message:Fixed issue 8, show the featured downloads on the homepage.

Changes:

File differences

src/IDF/Views/Download.php
185185
186186
187187
188
189
190
191
192
193
194
195
196
197
198
199
200
188201
189202
190203
}
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);
}
}
/**
src/IDF/Views/Project.php
3939
4040
4141
42
43
44
4245
4346
4447
4548
49
4650
4751
4852
$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);
}
src/IDF/relations.php
2626
2727
2828
29
30
2931
3032
$m['IDF_Issue'] = array('relate_to' => array('IDF_Project', 'Pluf_User', 'IDF_Tag'),
'relate_to_many' => array('IDF_Tag', 'Pluf_User'));
$m['IDF_IssueComment'] = array('relate_to' => array('IDF_Issue', 'Pluf_User'));
$m['IDF_Upload'] = array('relate_to' => array('IDF_Project', 'Pluf_User'),
'relate_to_many' => array('IDF_Tag'));
return $m;
src/IDF/templates/project-home.html
1010
1111
1212
13
14
15
16
17
18
19
1320
1421
1522
......
1724
1825
1926
20
2127
2228
2329
{$project.description|markdown}
{/block}
{block context}
{if $downloads.count() > 0}
<p><strong>{trans 'Featured Downloads'}</strong><br />
{foreach $downloads as $download}
<span class="label"><a href="{url 'IDF_Views_Download::view', array($project.shortname, $download.id)}" title="{$download.summary}">{$download}</a></span><br />
{/foreach}
<span class="label"> </span><span class="note"><a href="{url 'IDF_Views_Download::index', array($project.shortname)}">{trans 'show more...'}</a></span>
{/if}
{assign $ko = 'owners'}
{assign $km = 'members'}
<p><strong>{trans 'Development Team'}</strong><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}

Archive Download the corresponding diff file

Page rendered in 0.08163s using 14 queries.