Skip to content

Commit

Permalink
updating timeline rss
Browse files Browse the repository at this point in the history
  • Loading branch information
gwoo committed Jan 6, 2010
1 parent a92f1d0 commit bc9fef0
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions views/timeline/rss/index.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,34 @@ foreach ($timeline as $data) {
$author = $data['User']['username'];
break;
case 'Ticket':
$status = " ({$data['Ticket']['status']})";
$status = $data['Ticket']['status'];
if (!empty($data['Comment']['reason'])) {
$status = " ({$data['Comment']['reason']})";
$status = $data['Comment']['reason'];
}
$title = "Ticket/#{$data['Ticket']['number']}{$status} {$data['Ticket']['title']}";
$link = array('controller' => 'tickets', 'action' => 'view', $data[$type]['number']);
$pubDate = $data[$type]['created'];
$description = $text->truncate(nl2br($data[$type]['content']), 200, array(
$status = Inflector::humanize($status);
$type = strtoupper(Inflector::humanize($data['Ticket']['type']));
$title = "{$status}/{$type}/{$data['Ticket']['title']}";
$link = array('controller' => 'tickets', 'action' => 'view', $data['Ticket']['number']);
$pubDate = $data['Ticket']['created'];
$description = $text->truncate(nl2br($data['Ticket']['description']), 200, array(
'exact' => true, 'html' => false
));
$author = $data['Reporter']['username'];
break;
case 'Comment':
$status = " ({$data['Ticket']['status']})";
$status = $data['Ticket']['status'];
if (!empty($data['Comment']['reason'])) {
$status = " ({$data['Comment']['reason']})";
$status = $data['Comment']['reason'];
}
$title = "Ticket/#{$data['Ticket']['number']}{$status} {$data['Ticket']['title']}";
$type = strtoupper(Inflector::humanize($data['Ticket']['type']));
$title = "{$status} > {$type} > {$data['Ticket']['title']}";
$link = array(
'controller' => 'tickets', 'action' => 'view', $data['Ticket']['number'],
'#' => 'c'.$data['Comment']['id']
);
$pubDate = $data['Comment']['created'];
$description = null;

if (!empty($data['Comment']['changes'])) {
$description .= $chaw->changes($data['Comment']['changes']);
}
Expand Down

0 comments on commit bc9fef0

Please sign in to comment.