Indefero

Indefero Commit Details


Date:2008-12-05 05:28:58 (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:b660c6782f5834394c5caf3132fff0f47cb3a8bc
Parents: 5bd4fed8f4db5b426e8e18a1d3f6cd2b759f7e02
Message:Updated the timeline to link to the author profile.

Changes:

File differences

src/IDF/Commit.php
172172
173173
174174
175
176
175177
176178
177179
......
181183
182184
183185
184
186
185187
186188
187189
$out = '<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$stag = new IDF_Template_ShowUser();
$user = $stag->start($this->get_author(), $request, $this->origauthor, false);
$tag = new IDF_Template_IssueComment();
$out .= $tag->start($this->summary, $request, false);
if (0 && $this->fullmessage) {
</tr>
<tr class="extra">
<td colspan="2">
<div class="helptext right">'.__('Commit').'&nbsp;<a href="'.$url.'" class="mono">'.$this->scm_id.'</a>, '.__('by').' '.strip_tags($this->origauthor).'</div></td></tr>';
<div class="helptext right">'.__('Commit').'&nbsp;<a href="'.$url.'" class="mono">'.$this->scm_id.'</a>, '.__('by').' '.$user.'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
src/IDF/Issue.php
188188
189189
190190
191
191
192
192193
193194
194195
195
196
196197
197198
198199
$out = '<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$submitter = $this->get_submitter();
$stag = new IDF_Template_ShowUser();
$user = $stag->start($this->get_submitter(), $request, '', false);
$ic = (in_array($this->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$out .= sprintf(__('<a href="%1$s" class="%2$s" title="View issue">Issue %3$d</a>, %4$s'), $url, $ic, $this->id, Pluf_esc($this->summary)).'</td>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Creation of <a href="%s" class="%s">issue&nbsp;%d</a>'), $url, $ic, $this->id).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Creation of <a href="%s" class="%s">issue&nbsp;%d</a>'), $url, $ic, $this->id).', '.__('by').' '.$user.'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
src/IDF/IssueComment.php
136136
137137
138138
139
139
140
141
140142
141143
142144
......
168170
169171
170172
171
173
172174
173175
174176
$out = "\n".'<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$submitter = $this->get_submitter();
$stag = new IDF_Template_ShowUser();
$user = $stag->start($this->get_submitter(), $request, '', false);
$ic = (in_array($issue->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$out .= sprintf(__('<a href="%1$s" class="%2$s" title="View issue">Issue %3$d</a>, %4$s'), $url, $ic, $issue->id, Pluf_esc($issue->summary));
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Comment on <a href="%s" class="%s">issue&nbsp;%d</a>'), $url, $ic, $issue->id).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Comment on <a href="%s" class="%s">issue&nbsp;%d</a>'), $url, $ic, $issue->id).', '.__('by').' '.$user.'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
src/IDF/Middleware.php
8585
8686
8787
88
8889
8990
9091
'issuetext' => 'IDF_Template_IssueComment',
'timeline' => 'IDF_Template_TimelineFragment',
'markdown' => 'IDF_Template_Markdown',
'showuser' => 'IDF_Template_ShowUser',
));
$params['modifiers'] = array_merge($params['modifiers'],
array(
src/IDF/Template/ShowUser.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
56
57
58
59
60
61
62
63
64
65
66
<?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_ShowUser 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 Pluf_User
* @param Pluf_HTTP_Request
* @param string Alternate text ('')
*/
function start($user, $request, $text='', $echo=true)
{
if ($user == null) {
$out = (strlen($text)) ? strip_tags($text) : __('Anonymous');
} else {
$url = Pluf_HTTP_URL_urlForView('IDF_Views_User::view',
array($user->login));
if (!$user->isAnonymous() and $user->id == $request->user->id) {
$utext = __('Me');
} else {
$utext = Pluf_esc($user);
}
$out = sprintf('<a href="%s" class="username">%s</a>',
$url, $utext);
}
if ($echo) echo $out;
else return $out;
}
}
src/IDF/Upload.php
177177
178178
179179
180
180
181
181182
182183
183184
184
185
185186
186187
187188
$out = '<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$submitter = $this->get_submitter();
$stag = new IDF_Template_ShowUser();
$user = $stag->start($this->get_submitter(), $request, '', false);
$out .= sprintf(__('<a href="%1$s" title="View download">Download %2$d</a>, %3$s'), $url, $this->id, Pluf_esc($this->summary)).'</td>';
$out .= '</tr>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Addition of <a href="%s">download&nbsp;%d</a>'), $url, $this->id).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Addition of <a href="%s">download&nbsp;%d</a>'), $url, $this->id).', '.__('by').' '.$user.'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
src/IDF/WikiPage.php
192192
193193
194194
195
195
196
196197
197198
198
199
199200
200201
201202
$out = '<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$submitter = $this->get_submitter();
$stag = new IDF_Template_ShowUser();
$user = $stag->start($this->get_submitter(), $request, '', false);
$out .= sprintf(__('<a href="%1$s" title="View page">%2$s</a>, %3$s'), $url, Pluf_esc($this->title), Pluf_esc($this->summary)).'</td>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Creation of <a href="%s">page&nbsp;%s</a>'), $url, Pluf_esc($this->title)).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Creation of <a href="%s">page&nbsp;%s</a>'), $url, Pluf_esc($this->title)).', '.__('by').' '.$user.'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
src/IDF/WikiRevision.php
162162
163163
164164
165
165
166
166167
167
168168
169169
170170
......
186186
187187
188188
189
189
190190
191191
192192
$out = "\n".'<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$submitter = $this->get_submitter();
$stag = new IDF_Template_ShowUser();
$user = $stag->start($this->get_submitter(), $request, '', false);
$out .= sprintf(__('<a href="%1$s" title="View page">%2$s</a>, %3$s'), $url, Pluf_esc($page->title), Pluf_esc($this->summary));
//$out .= '<strong>'.__('Summary:').'</strong>&nbsp;'.Pluf_esc($this->summary).' ';
if ($this->changedRevision()) {
$out .= '<div class="issue-changes-timeline">';
$changes = $this->changes;
}
$out .= '</td></tr>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Change of <a href="%s">%s</a>'), $url, Pluf_esc($page->title)).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
<div class="helptext right">'.sprintf(__('Change of <a href="%s">%s</a>'), $url, Pluf_esc($page->title)).', '.__('by').' '.$user.'</div></td></tr>';
return Pluf_Template::markSafe($out);
}

Archive Download the corresponding diff file

Page rendered in 0.09348s using 13 queries.