mirror of
https://github.com/danpros/htmly.git
synced 2026-04-23 05:56:22 +05:30
Improve admin/categories
This commit is contained in:
parent
9dd9f87cf5
commit
5abad2275b
1 changed files with 21 additions and 17 deletions
|
|
@ -1,21 +1,25 @@
|
||||||
<?php
|
<?php $desc = get_category_info(null); ?>
|
||||||
$desc = get_category_info(null);
|
|
||||||
?>
|
|
||||||
|
|
||||||
<a href="<?php echo site_url();?>add/category">Add category</a>
|
<a href="<?php echo site_url();?>add/category">Add category</a>
|
||||||
<table class="category-list">
|
<table class="category-list">
|
||||||
<tr class="head">
|
<tr class="head">
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Contents</th>
|
<th>Contents</th>
|
||||||
<th>Operations</th>
|
<th>Operations</th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php foreach ($desc as $d):?>
|
<tr>
|
||||||
<tr>
|
<td><a href="<?php echo site_url();?>category/uncategorized" target="_blank">Uncategorized</a></td>
|
||||||
<td><a href="<?php echo $d->url;?>" target="_blank"><?php echo $d->title;?></a></td>
|
<td><p>Topics that don't need a category, or don't fit into any other existing category.</p></td>
|
||||||
<td><?php echo $d->body;?></td>
|
<td><?php $total = get_draftcount('uncategorized') + get_categorycount('uncategorized'); echo $total?></td>
|
||||||
<td><?php $total = get_draftcount($d->md) + get_categorycount($d->md); echo $total?></td>
|
<td></td>
|
||||||
<td><a href="<?php echo $d->url;?>/edit?destination=admin/categories">Edit</a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a href="' . $d->url . '/delete?destination=admin/categories">Delete</a>';}?></td>
|
</tr>
|
||||||
</tr>
|
<?php foreach ($desc as $d):?>
|
||||||
<?php endforeach;?>
|
<tr>
|
||||||
|
<td><a href="<?php echo $d->url;?>" target="_blank"><?php echo $d->title;?></a></td>
|
||||||
|
<td><?php echo $d->body;?></td>
|
||||||
|
<td><?php $total = get_draftcount($d->md) + get_categorycount($d->md); echo $total?></td>
|
||||||
|
<td><a href="<?php echo $d->url;?>/edit?destination=admin/categories">Edit</a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a href="' . $d->url . '/delete?destination=admin/categories">Delete</a>';}?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach;?>
|
||||||
</table>
|
</table>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue