%# BEGIN LICENSE BLOCK
%# 
%#  Copyright (c) 2002-2003 Jesse Vincent <jesse@bestpractical.com>
%#  
%#  This program is free software; you can redistribute it and/or modify
%#  it under the terms of version 2 of the GNU General Public License 
%#  as published by the Free Software Foundation.
%# 
%#  A copy of that license should have arrived with this
%#  software, but in any event can be snarfed from www.gnu.org.
%# 
%#  This program 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.
%# 
%# END LICENSE BLOCK

<& /Elements/TitleBoxStart, title => loc("[_1] newest articles", $rows), bodyclass=> '' &>
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<th align="right"><&|/l&>#</&></th>
<th align="left"><&|/l&>Name</&></th>
<th align="left" width="20%"><&|/l&>Created by</&></th>
<th align="left">&nbsp;</th>
</tr>
% while (my $Article = $MyArticles->Next) {
% $i++;
<tr class="<% $i%2 ? 'oddline' : 'evenline'%>">                                
<td align="right"><%$Article->Id%></td>
<td><a href="<% $RT::WebPath %>/RTFM/Article/Display.html?id=<%$Article->Id%>"><%$Article->Name || loc('(no name)')%></a></td>
<td><%$Article->CreatorObj->Name%></td>
<td align="right">[<a href="<% $RT::WebPath %>/RTFM/Article/Edit.html?id=<%$Article->Id%>"><&|/l&>Update</&></a>]</td>
</tr>
<tr class="<% $i%2 ? 'oddline' : 'evenline'%>">
<td>&nbsp;</td>
<td colspan="3"><small><%$Article->Summary || loc('(no Summary)')%></small></td>
</tr>
% }
</table>
<& /Elements/TitleBoxEnd &>
<%INIT>
my $rows = 10;
my $i;
my $MyArticles;
$MyArticles = new RT::FM::ArticleCollection ($session{'CurrentUser'});
$MyArticles->UnLimit;
$MyArticles->RowsPerPage($rows);
$MyArticles->OrderBy(FIELD => 'LastUpdated', ORDER => 'DESC');

</%INIT>
