Management overview for pkBlog posts
The pkBlog "Manage blog posts" screen is generated by a Ditto call, with a template chunk that creates two forms for each item. A little Javascript is used to make hyperlinks behave like Submit buttons for the forms. I prefer this to building up a long string of parameters for a URL query string, which could work just as well.
There is also an Add Item button at the top to add a new item.
Status of items (Draft, Published, Waiting publication, eXpired, Unpublished/Unknown status) is shown in the left column, and publication dates are shown alongside the main item date. Green on a date indicates a live item, bright red that it has expired, and orange that it is waiting for its publication date to arrive.
The Manage Blog Posts page looks like this (note the Ditto extender that is used to create status flags):
<input type="submit" value="Add item" />
</form>
<div>
<table>
<thead><tr>
<th colspan="2">Item & status</th><th>Date</th><th>Publish</th>
<th>To</th></tr>
</thead>
<tbody>
[[Ditto?parents=`2` &tpl=`blog.manage.tpl` &showPublishedOnly=`0` &orderBy=`pkDate DESC,menuindex DESC` &extenders=`pkStatus` ]]
</tbody>
</table>
</div>
The template chunk, blog.manage.tpl, creates a table row for each item:
<td class="flagColumn [+status:statusFormat=`flag`+]">[+status+]</td>
<td title="[+longtitle+]">
<form name="edit_[+id+]" action="/admin/post-edit" method="post">
<input type="hidden" name="docId" value="[+id+]" />
<input type="hidden" name="returnId" value = "[*id*]" />
<input type="hidden" name="preview" value="[+pkPreviewFlag+]" />
<input type="hidden" name="command" value="edit" />
<input type="hidden" name="tags" value="[+pwTags+]" />
<a href="javascript:document.edit_[+id+].submit();">[+pagetitle:limit=`32`+]</a>
</form></td>
<td class="dateColumn [+status:statusFormat=`start`+]">[+pkDate:date=`%d-%m-%y`+]</td>
<td class="dateColumn [+status:statusFormat=`pub`+]">[+pub_date:dateIfSet=`%d-%m-%y`+]</td>
<td class="dateColumn [+status:statusFormat=`end`+]">[+pkDateTo:dateIfSet=`%d-%m-%y`+]</td>
<td><form name="del_[+id+]" action="/admin/post-edit" method="post">
<input type="hidden" name="docId" value = "[+id+]" />
<input type="hidden" name="returnId" value = "[*id*]" />
<input type="hidden" name="command" value = "delete" />
<a href="javascript:document.del_[+id+].submit();">Delete</a></form></td>
<td><a href="[~[+id+]~]">View</a></td>
</tr>