Correct tag admin list markup that I likely hacked up during recent commits. These HTML lists now validate.

This commit is contained in:
Chad Kieffer
2009-10-26 22:53:51 -06:00
committed by Tim Almdal
parent e77822a942
commit 6ce8733efc

View File

@@ -28,34 +28,32 @@
</caption>
<tr>
<td>
<? foreach ($tags as $i => $tag): ?>
<? $current_letter = strtoupper(mb_substr($tag->name, 0, 1)) ?>
<? foreach ($tags as $i => $tag): ?>
<? $current_letter = strtoupper(mb_substr($tag->name, 0, 1)) ?>
<? if ($i == 0): /* first letter */ ?>
<strong><?= html::clean($current_letter) ?></strong>
<ul>
<? elseif ($last_letter != $current_letter): /* new letter */ ?>
<? if ($column_tag_count > $tags_per_column): /* new column */ ?>
</td>
<td>
<? $column_tag_count = 0 ?>
<? endif ?>
</ul>
<strong><?= html::clean($current_letter) ?></strong>
<ul>
<? if ($i == 0): /* first letter */ ?>
<strong><?= html::clean($current_letter) ?></strong>
<ul>
<? elseif ($last_letter != $current_letter): /* new letter */ ?>
</ul>
<? if ($column_tag_count > $tags_per_column): /* new column */ ?>
<? $column_tag_count = 0 ?>
</td>
<td>
<? endif ?>
<li>
<span class="g-editable g-tag-name" rel="<?= $tag->id ?>"><?= html::clean($tag->name) ?></span>
<span class="g-understate">(<?= $tag->count ?>)</span>
<a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>"
class="g-dialog-link g-delete-link g-button">
<span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a>
</li>
<? $column_tag_count++ ?>
<? $last_letter = $current_letter ?>
<? endforeach /* $tags */ ?>
<strong><?= html::clean($current_letter) ?></strong>
<ul>
<? endif ?>
<li>
<span class="g-editable g-tag-name" rel="<?= $tag->id ?>"><?= html::clean($tag->name) ?></span>
<span class="g-understate">(<?= $tag->count ?>)</span>
<a href="<?= url::site("admin/tags/form_delete/$tag->id") ?>"
class="g-dialog-link g-delete-link g-button">
<span class="ui-icon ui-icon-trash"><?= t("Delete this tag") ?></span></a>
</li>
<? $column_tag_count++ ?>
<? $last_letter = $current_letter ?>
<? endforeach ?>
</ul>
</td>
</tr>