Indefero

Indefero Commit Details


Date:2008-11-15 04:31:43 (16 years 1 month 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:4760c4b56369c3d3aec4df4661c983277b0fb1e3
Parents: b85da85dfe8ce2f27cfc5dedb9b4b9bee327c058
Message:Improved the style of the timeline to add consistency.

The timeline is now a table with a more consistent look and feel with
respect to the other tables in the application.
Changes:

File differences

src/IDF/Commit.php
2222
2323
2424
25
2526
2627
2728
......
158159
159160
160161
161
162
163
164
165
166162
167163
168164
169
165
166
167
168
169
170
171
172
173
174
175
176
177
170178
171179
172
180
# ***** END LICENSE BLOCK ***** */
Pluf::loadFunction('Pluf_HTTP_URL_urlForView');
Pluf::loadFunction('Pluf_Template_dateAgo');
/**
* Base definition of a commit.
*/
public function timelineFragment($request)
{
$tag = new IDF_Template_IssueComment();
$out = $tag->start($this->summary, $request, false);
if ($this->fullmessage) {
$out .= '<br /><br />'.$tag->start($this->fullmessage, $request, false);
}
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::commit',
array($request->project->shortname,
$this->scm_id));
$out .= '<div class="helptext right"><br />'.__('Commit:').'&nbsp;<a href="'.$url.'" class="mono">'.$this->scm_id.'</a>, '.__('by').' '.strip_tags($this->origauthor).'</div>';
$out = '<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$tag = new IDF_Template_IssueComment();
$out .= $tag->start($this->summary, $request, false);
if (0 && $this->fullmessage) {
$out .= '<br /><br />'.$tag->start($this->fullmessage, $request, false);
}
$out .= '</td>
</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>';
return Pluf_Template::markSafe($out);
}
}
}
src/IDF/Issue.php
2222
2323
2424
25
2526
2627
2728
......
173174
174175
175176
176
177
178177
179178
180179
181
180
181
182
183
184
185
186
187
188
189
182190
183191
# ***** END LICENSE BLOCK ***** */
Pluf::loadFunction('Pluf_HTTP_URL_urlForView');
Pluf::loadFunction('Pluf_Template_dateAgo');
/**
* Base definition of an issue.
*/
public function timelineFragment($request)
{
$submitter = $this->get_submitter();
$ic = (in_array($this->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($request->project->shortname,
$this->id));
return Pluf_Template::markSafe(sprintf(__('<a href="%1$s" class="%2$s" title="View issue">Issue %3$d</a> <em>%4$s</em> created by %5$s'), $url, $ic, $this->id, Pluf_esc($this->summary), Pluf_esc($submitter)));
$out = '<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($this->creation_dtime, 'without')).
'</a></td><td>';
$submitter = $this->get_submitter();
$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">issue&nbsp;%d</a>'), $url, $this->id).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
}
src/IDF/IssueComment.php
122122
123123
124124
125
126125
127
128126
129127
130128
131
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
132168
133169
public function timelineFragment($request)
{
$submitter = $this->get_submitter();
$issue = $this->get_issue();
$ic = (in_array($issue->status, $request->project->getTagIdsByStatus('closed'))) ? 'issue-c' : 'issue-o';
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::view',
array($request->project->shortname,
$issue->id));
return Pluf_Template::markSafe(sprintf(__('<a href="%1$s" class="%2$s" title="View issue">Issue %3$d</a> <em>%4$s</em> updated by %5$s'), $url, $ic, $issue->id, Pluf_esc($issue->summary), Pluf_esc($submitter)));
$url .= '#ic'.$this->id;
$out = "\n".'<tr class="log"><td><a href="'.$url.'">'.
Pluf_esc(Pluf_Template_dateAgo($issue->creation_dtime, 'without')).
'</a></td><td>';
$submitter = $issue->get_submitter();
$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));
if ($this->changedIssue()) {
$out .= '<div class="issue-changes-timeline">';
foreach ($this->changes as $w => $v) {
$out .= '<strong>';
switch ($w) {
case 'su':
$out .= __('Summary:'); break;
case 'st':
$out .= __('Status:'); break;
case 'ow':
$out .= __('Owner:'); break;
case 'lb':
$out .= __('Labels:'); break;
}
$out .= '</strong>';
if ($w == 'lb') {
$out .= Pluf_esc(implode(', ', $v));
} else {
$out .= Pluf_esc($v);
}
$out .= ' ';
}
$out .= '</div>';
}
$out .= '</td></tr>';
$out .= "\n".'<tr class="extra"><td colspan="2">
<div class="helptext right">'.sprintf(__('Comment on <a href="%s">issue&nbsp;%d</a>'), $url, $issue->id).', '.__('by').' '.Pluf_esc($submitter).'</div></td></tr>';
return Pluf_Template::markSafe($out);
}
}
src/IDF/Timeline/Paginator.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
<?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 ***** */
/**
* Paginator to list the timeline items.
*/
class IDF_Timeline_Paginator extends Pluf_Paginator
{
/**
* Generate a standard "line" of the body.
*
* It is important to note that the table has only 2 columns, so
* the timelineFragment() method of each item must take that into
* account.
*/
function bodyLine($item)
{
$doc = Pluf::factory($item->model_class, $item->model_id);
$doc->public_dtime = $item->public_dtime;
return $doc->timelineFragment($item->request);
}
}
src/IDF/Views/Project.php
6262
6363
6464
65
66
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
6782
6883
6984
......
7388
7489
7590
76
91
7792
7893
7994
$prj = $request->project;
$title = sprintf(__('%s Timeline'), (string) $prj);
$team = $prj->getMembershipData();
$sql = new Pluf_SQL('project=%s', array($prj->id));
$timeline = Pluf::factory('IDF_Timeline')->getList(array('filter'=>$sql->gen(), 'order' => 'creation_dtime DESC'));
$pag = new IDF_Timeline_Paginator(new IDF_Timeline());
$pag->class = 'recent-issues';
$pag->item_extra_props = array('request' => $request);
$pag->summary = __('This table shows the project timeline.');
$pag->forced_where = new Pluf_SQL('project=%s', array($prj->id));
$pag->sort_order = array('creation_dtime', 'ASC');
$pag->sort_reverse_order = array('creation_dtime');
$pag->action = array('IDF_Views_Project::timeline', array($prj->shortname));
$list_display = array(
'creation_dtime' => __('Age'),
'id' => __('Change'),
);
$pag->configure($list_display, array(), array('creation_dtime'));
$pag->items_per_page = 20;
$pag->no_results_text = __('No changes were found.');
$pag->setFromRequest($request);
$downloads = array();
if ($request->rights['hasDownloadsAccess']) {
$tags = IDF_Views_Download::getDownloadTags($prj);
return Pluf_Shortcuts_RenderToResponse('project/timeline.html',
array(
'page_title' => $title,
'timeline' => $timeline,
'timeline' => $pag,
'team' => $team,
'downloads' => $downloads,
),
src/IDF/templates/project/timeline.html
77
88
99
10
11
12
13
14
1015
1116
1217
......
2328
2429
2530
31
32
2633
34
35
36
2737
2838
2939
</div>
{/block}
{block body}
{$timeline.render}
{*
<table summary="" class="tree-list">
<thead>
<tr>
{/foreach}
</tbody>
</table>
*}
{/block}
{block context}
{if count($downloads) > 0}
<p><strong>{trans 'Featured Downloads'}</strong><br />
www/media/idf/css/style.css
108108
109109
110110
111
112
113
114
111115
112116
113117
......
196200
197201
198202
203
204
205
206
207
208
209
210
211
212
199213
200214
201215
width: 90%;
}
table.recent-issues tr.log {
border-bottom: 1px solid #e7ebe3;
}
table.recent-issues th {
background-color: #e4e8E0;
vertical-align: top;
width: 60%;
}
div.issue-changes-timeline {
background-color: #eeeeec;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
margin-top: 4px;
padding: 4px;
width: 60%;
color: #888a85;
}
div.issue-submit-info {
background-color: #d3d7cf;
-moz-border-radius: 3px;

Archive Download the corresponding diff file

Page rendered in 0.09675s using 13 queries.