Indefero

Indefero Commit Details


Date:2008-12-05 07:51:51 (16 years 17 days 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
Commit:6c5da013193a225966443bc077bbbf61c0659aff
Parents: b660c6782f5834394c5caf3132fff0f47cb3a8bc
Message:Added the link to the author profile when possible.

Changes:

File differences

src/IDF/Middleware.php
8686
8787
8888
89
8990
9091
9192
'timeline' => 'IDF_Template_TimelineFragment',
'markdown' => 'IDF_Template_Markdown',
'showuser' => 'IDF_Template_ShowUser',
'ashowuser' => 'IDF_Template_AssignShowUser',
));
$params['modifiers'] = array_merge($params['modifiers'],
array(
src/IDF/Template/AssignShowUser.php
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
# ***** BEGIN LICENSE BLOCK *****
# This file is part of InDefero, an open source project management application.
# Copyright (C) 2008 CĂ©ondo Ltd and contributors.
#
# InDefero is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# InDefero is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# ***** END LICENSE BLOCK ***** */
Pluf::loadFunction('Pluf_HTTP_URL_urlForView');
/**
* Show the name of a user in a template.
*
* It will automatically make the link to the profile if needed. In
* the future it will allow us to add little badges on the side of the
* user based on karma or whatever.
*
* This will also provide a consistent display of a user name in the
* application.
*/
class IDF_Template_AssignShowUser extends Pluf_Template_Tag
{
/**
* We need the user object and the request.
*
* If the user object is null (for example a non associated
* commit), we can use the $text value for an alternative display.
*
* @param string Which variable to assign
* @param Pluf_User
* @param Pluf_HTTP_Request
* @param string Alternate text ('')
*/
function start($var, $user, $request, $text='')
{
$t = new IDF_Template_ShowUser($this->context);
$this->context->set($var,
Pluf_Template::markSafe($t->start($user, $request, $text, false)));
}
}
src/IDF/Views/Source.php
5353
5454
5555
56
5657
5758
58
59
5960
60
61
6162
6263
6364
6465
6566
66
67
6768
6869
6970
......
216217
217218
218219
220
219221
220222
221223
......
228230
229231
230232
233
231234
232235
233236
return new Pluf_HTTP_Response_Redirect($url);
}
$changes = $scm->getChangeLog($commit, 25);
$rchanges = array();
// Sync with the database
foreach ($changes as $change) {
IDF_Commit::getOrAdd($change, $request->project);
$rchanges[] = IDF_Commit::getOrAdd($change, $request->project);
}
$changes = new Pluf_Template_ContextVars($changes);
$rchanges = new Pluf_Template_ContextVars($rchanges);
$scmConf = $request->conf->getVal('scm', 'git');
return Pluf_Shortcuts_RenderToResponse('idf/source/changelog.html',
array(
'page_title' => $title,
'title' => $title,
'changes' => $changes,
'changes' => $rchanges,
'commit' => $commit,
'branches' => $branches,
'scm' => $scmConf,
$title = sprintf(__('%s Commit Details'), (string) $request->project);
$page_title = sprintf(__('%s Commit Details - %s'), (string) $request->project, $commit);
$cobject = $scm->getCommit($commit);
$rcommit = IDF_Commit::getOrAdd($cobject, $request->project);
$diff = new IDF_Diff($cobject->changes);
$diff->parse();
$scmConf = $request->conf->getVal('scm', 'git');
'commit' => $commit,
'branches' => $branches,
'scm' => $scmConf,
'rcommit' => $rcommit,
),
$request);
}
src/IDF/templates/idf/downloads/view.html
4747
4848
4949
50
50
5151
5252
5353
{/if}
{/block}
{block context}
{assign $submitter = $file.get_submitter()}
{ashowuser 'submitter', $file.get_submitter(), $request}
<p><strong>{trans 'Uploaded:'}</strong> <span class="nobrk">{$file.creation_dtime|dateago}</span> <span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
{if $file.modif_dtime != $file.creation_dtime}<p>
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$file.modif_dtime|dateago}</span></p>{/if}
src/IDF/templates/idf/issues/view.html
33
44
55
6
7
6
7
88
9
9
1010
1111
1212
1313
14
14
1515
1616
1717
......
118118
119119
120120
121
122
121
122
123123
124124
125125
126126
127
128
127
128
129129
130130
131131
{block body}
{assign $i = 0}
{assign $nc = $comments.count()}
{foreach $comments as $c}
<div class="issue-comment{if $i == 0} issue-comment-first{/if}{if $i == ($nc-1)} issue-comment-last{/if}" id="ic{$c.id}">{assign $who = $c.get_submitter()}{aurl 'whourl', 'IDF_Views_User::view', array($who.login)}<img style="float:right; position: relative;" src="http://www.gravatar.com/avatar/{$who.email|md5}.jpg?s=60&amp;d={media}/idf/img/spacer.gif" alt=" " />
{foreach $comments as $c}{ashowuser 'submitter', $c.get_submitter(), $request}{assign $who = $c.get_submitter()}
<div class="issue-comment{if $i == 0} issue-comment-first{/if}{if $i == ($nc-1)} issue-comment-last{/if}" id="ic{$c.id}"><img style="float:right; position: relative;" src="http://www.gravatar.com/avatar/{$who.email|md5}.jpg?s=60&amp;d={media}/idf/img/spacer.gif" alt=" " />
{if $i == 0}
<p>{blocktrans}Reported by <a href="{$whourl}">{$who}</a>, {$c.creation_dtime|date}{/blocktrans}</p>
<p>{blocktrans}Reported by {$submitter}, {$c.creation_dtime|date}{/blocktrans}</p>
{else}
{aurl 'url', 'IDF_Views_Issue::view', array($project.shortname, $issue.id)}
{assign $id = $c.id}
{assign $url = $url~'#ic'~$c.id}
<p>{blocktrans}Comment <a href="{$url}">{$i}</a> by <a href="{$whourl}">{$who}</a>, {$c.creation_dtime|date}{/blocktrans}</p>
<p>{blocktrans}Comment <a href="{$url}">{$i}</a> by {$submitter}, {$c.creation_dtime|date}{/blocktrans}</p>
{/if}
{/block}
{block context}
<div class="issue-info">
{assign $submitter = $issue.get_submitter()}{aurl 'url', 'IDF_Views_User::view', array($submitter.login)}
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$issue.creation_dtime|dateago}</span> <span class="nobrk">{blocktrans}by <a href="{$url}">{$submitter}</a>{/blocktrans}</span></p>
{ashowuser 'submitter', $issue.get_submitter(), $request}
<p><strong>{trans 'Created:'}</strong> <span class="nobrk">{$issue.creation_dtime|dateago}</span> <span class="nobrk">{blocktrans}by {$submitter}{/blocktrans}</span></p>
{if $issue.modif_dtime != $issue.creation_dtime}<p>
<strong>{trans 'Updated:'}</strong> <span class="nobrk">{$issue.modif_dtime|dateago}</span></p>{/if}
<p>
<strong>{trans 'Status:'}</strong> {$issue.get_status.name}</p>
{if $issue.get_owner != null}<p>{aurl 'url', 'IDF_Views_User::view', array($issue.get_owner().login)}
<strong>{trans 'Owner:'}</strong> <a href="{$url}">{$issue.get_owner}</a>
{if $issue.get_owner != null}<p>
<strong>{trans 'Owner:'}</strong> {showuser $issue.get_owner(), $request}
</p>{/if}{assign $tags = $issue.get_tags_list()}{if $tags.count()}
<p>
<strong>{trans 'Labels:'}</strong><br />
src/IDF/templates/idf/source/changelog.html
1010
1111
1212
13
13
1414
15
16
15
16
1717
1818
1919
20
21
20
21
2222
2323
2424
</thead>
<tbody>
{foreach $changes as $change}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $change.commit)}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $change.scm_id)}
<tr class="log">
<td><a href="{$url}">{$change.date|dateago:"wihtout"}</a></td>
<td>{issuetext $change.title, $request}{if $change.full_message}<br /><br />{issuetext $change.full_message, $request}{/if}</td>
<td><a href="{$url}">{$change.creation_dtime|dateago:"wihtout"}</a></td>
<td>{issuetext $change.summary, $request}{if $change.fullmessage}<br /><br />{issuetext $change.fullmessage, $request}{/if}</td>
</tr>
<tr class="extra">
<td colspan="2">
<div class="helptext right">{trans 'Commit'}&nbsp;<a href="{$url}" class="mono">{$change.commit}</a>,
{trans 'by'} {$change.author|strip_tags} {* this remove the email address *}
<div class="helptext right">{trans 'Commit'}&nbsp;<a href="{$url}" class="mono">{$change.scm_id}</a>,
{trans 'by'} {showuser $change.get_author(), $request, $change.origauthor}
</div>
</td>
src/IDF/templates/idf/source/commit.html
77
88
99
10
10
1111
1212
1313
<th><strong>{trans 'Date:'}</strong></th><td>{$cobject.date|date:"%Y-%m-%d %H:%M:%S"} ({$cobject.date|dateago})</td>
</tr>
<tr>
<th><strong>{trans 'Author:'}</strong></th><td>{$cobject.author|strip_tags}</td>
<th><strong>{trans 'Author:'}</strong></th><td>{showuser $rcommit.get_author(), $request}</td>
</tr>
<tr>
<th><strong>{trans 'Commit:'}</strong></th><td class="mono"><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}" title="{trans 'View corresponding source tree'}">{$cobject.commit}</a></td>

Archive Download the corresponding diff file

Page rendered in 0.09986s using 13 queries.