<?php include 'en/admin/_adminheader.php'; ?>
<h2>Resources Page: Articles</h2>
<p>
	Below is a list of the articles that you have on the Resources page.
	You can add, edit or delete articles.
</p>
<p>
	<a href='/admin/resources.php?what=articles&do=add' title='Add an Article' class='action'>Add an article</a>
</p>
<table>
	<thead>
		<tr>
			<td>Name</td>
			<td>File</td>
			<td>Actions</td>
		</tr>
	</thead>
	<tbody>
<?php $count = 0; foreach($this->data['articles'] as $article): ?>
		<tr <?php if($count % 2 == 1): echo "class='alt_row'"; endif; $count++; ?>>
			<td><?php echo $article->title ?></td>
			<td><?php echo $article->link ?></td>
			<td>
				<a href='/admin/resources.php?what=articles&do=edit&which=<?php echo $article['id'] ?>' title='Edit Article' class='action'>Edit</a>
				<a href='/admin/resources.php?what=articles&do=delete&which=<?php echo $article['id'] ?>' title='Delete Article' class='action'>Delete</a>
			</td>
		</tr>
<?php endforeach; ?>
	</tbody>
</table>
	