Use text::alternate() instead of hand-rolled even/odd code.

This commit is contained in:
Bharat Mediratta
2009-11-15 19:34:44 -08:00
parent 64ef86a8ee
commit e0f4e6500d
6 changed files with 10 additions and 22 deletions

View File

@@ -103,8 +103,8 @@
<?= t("Actions") ?>
</th>
</tr>
<? foreach ($comments as $i => $comment): ?>
<tr id="g-comment-<?= $comment->id ?>" class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>">
<? foreach ($comments as $comment): ?>
<tr id="g-comment-<?= $comment->id ?>" class="<?= text::alternate("g-odd", "g-even") ?>">
<td>
<a href="#">
<img src="<?= $comment->author()->avatar_url(40, $theme->url("images/avatar.jpg", true)) ?>"