<dtml-comment>
##############################################################################
manage_listEntryForm.html

Interface for showing list of the entries

Copyright (c) 2003-2005 Atsushi Shibata All Rights Reserved.
##############################################################################
</dtml-comment>

<dtml-var manage_page_header>
<dtml-var manage_tabs>

<p class="form-help">
Manage entries for '<dtml-var title>'.
To add a new entry, push the <strong>Add Entry</strong> button and edit the new entry's information.
To delete entry, check checkbox and push <strong>Delete</strong> button below.
</p>

<dtml-if "count_category()!=0">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
	<tr>
		<td align="left" valign="top">&nbsp;</td>
		<td align="right" valign="top">
		<div class="form-element">
		<form action="<dtml-var URL1>/manage_addEntryForm" method="get">
			<input class="form-element" type="submit" name="submit" value=" Add Entry " />
		</form>
		</div>
		</td>
	</tr>
</table>
<dtml-else>
<p class="form-help" style="color: red;">
First, add some 'Category' before adding a entry. Click <a href="manage_addCategoryForm">here</a> to add new category.
<p class="form-help">
</dtml-if>

<dtml-comment>Set the values</dtml-comment>
<dtml-unless start>
<dtml-call "REQUEST.set('start',0)">
</dtml-unless start>
<dtml-call "REQUEST.set('count',20)">
<dtml-call "REQUEST.set('showsize',280)">
<dtml-call "REQUEST.set('liststart',_.max(0,start-(showsize/2)))">
<dtml-call "REQUEST.set('listend',_.min(count_entry(),liststart+showsize))">
<dtml-call "REQUEST.set('start',_.int(start))">

<form action="&dtml-URL1;/" name="objectItems" method="post">
<dtml-if count_entry>
	<table width="100%" cellspacing="0" cellpadding="2" border="0">
		<tr>
			<td colspan="8" align="right">
			<dtml-if "start !=0">
			<a href="./manage_entryForm?start:int=<dtml-var "start - count">">Prev</a>&nbsp;
			</dtml-if>
			<dtml-if "liststart !=0">
			<a href="./manage_entryForm?start:int=<dtml-var "min(0,liststart - count)">">...</a>&nbsp;
			</dtml-if>
			<dtml-in "range(liststart,listend,count)">
			<dtml-call "REQUEST.set('seqitem',_['sequence-item'])">
			<dtml-if "seqitem <= start and seqitem > start-count">
			<b>[<dtml-var  "_['sequence-index'] + (liststart/count)+1">]</b>
			&nbsp;
			<dtml-else>
			<a href="./manage_entryForm?start:int=<dtml-var seqitem>">
			<dtml-var  "_['sequence-index'] + (liststart/count)+1">
			</a>&nbsp;
			</dtml-if>
			</dtml-in>
			<dtml-if "listend !=count_entry">
			<a href="./manage_entryForm?start:int=<dtml-var "seqitem + count">">...</a>&nbsp;
			</dtml-if>
			<dtml-if "count_entry > (start + count)">
			<a href="./manage_entryForm?start:int=<dtml-var "start + count">">Next</a>
			</dtml-if>
			</td>
		</tr>
		<tr class="list-header">
			<td width="5%" align="left" >&nbsp;</td>
			<td width="35%" align="left" class="list-item"><div class="list-item">Title</div></td>
			<td width="5%" align="left" class="list-item"><div class="list-item">Status</div></td>
			<td width="5%" align="center" class="list-item"><div class="list-item"><img src="misc_/COREBlog/comment_img" border="0" alt="comment"></div></td>
			<td width="5%" align="center" class="list-item"><div class="list-item"><img src="misc_/COREBlog/trackback_img" border="0" alt="trackback"></div></td>
			<td width="10%" align="left" class="list-item"><div class="list-item">Size</div></td>
			<td width="25%" align="left" class="list-item"><div class="list-item">Created</div></td>
		</tr>
		<dtml-in "rev_entry_items(start=start,count=count,consider_moderation=0)">
		<dtml-var sequence-item>
		<tr class="<dtml-if sequence-odd>row-normal<dtml-else>row-hilite</dtml-if>">
			<td align="left" valign="top">
			<input type="checkbox" name="ids:list" value="<dtml-var id>" /><img src="misc_/COREBlog/entry_img" border="0" alt="entry">
			</td>
			<td align="left" valign="top">
			<div class="list-item">
			<a href="./<dtml-var id>/manage_main"><dtml-var title><dtml-if "_.len(title)==0">No Title</dtml-if></a>
			</div>
			</td>
			<td align="left" valign="top"><div class="list-item"><dtml-if moderated>Open<dtml-else>Closed</dtml-if></div></td>
			<td align="center" valign="top"><div class="list-item"><dtml-var count_all_comment></div></td>
			<td align="center" valign="top"><div class="list-item"><dtml-var count_all_trackback></div></td>
			<td align="left" valign="top"><div class="list-item"><dtml-var body_size></div></td>
			<td>
			<div class="list-item">
			<dtml-var date_created fmt="%Y-%m-%d %H:%M">
			</div>
			</td>
		</tr>
		</dtml-in>
		<tr>
			<td colspan="8" align="right">
			<dtml-if "start !=0">
			<a href="./manage_entryForm?start:int=<dtml-var "start - count">">Prev</a>&nbsp;
			</dtml-if>
			<dtml-if "liststart !=0">
			<a href="./manage_entryForm?start:int=<dtml-var "min(0,liststart - count)">">...</a>&nbsp;
			</dtml-if>
			<dtml-in "range(liststart,listend,count)">
			<dtml-call "REQUEST.set('seqitem',_['sequence-item'])">
			<dtml-if "seqitem <= start and seqitem > start-count">
			<b>[<dtml-var  "_['sequence-index'] + (liststart/count)+1">]</b>
			&nbsp;
			<dtml-else>
			<a href="./manage_entryForm?start:int=<dtml-var seqitem>">
			<dtml-var  "_['sequence-index'] + (liststart/count)+1">
			</a>&nbsp;
			</dtml-if>
			</dtml-in>
			<dtml-if "listend !=count_entry">
			<a href="./manage_entryForm?start:int=<dtml-var "seqitem + count">">...</a>&nbsp;
			</dtml-if>
			<dtml-if "count_entry > (start + count)">
			<a href="./manage_entryForm?start:int=<dtml-var "start + count">">Next</a>
			</dtml-if>
			</td>
		</tr>
	</table>
	<table cellspacing="0" cellpadding="2" border="0">
	<tr>
	  <td align="left" valign="top" width="16"></td>
	  <td align="left" valign="top">
	  <div class="form-element">
	  <input class="form-element" type="submit" name="manage_deleteEntries:method" 
	   value="Delete" />
	  </div>
	  </td>
	  <td align="left" valign="top">
	  <div class="form-element">
	  <input class="form-element" type="submit" name="recatalogEntries:method" 
	   value="Recatalog" />
	  </div>
	  </td>
	</tr>
	</table>
<dtml-else>
	<table cellspacing="0" cellpadding="2" border="0">
		<tr>
			<td>
			<div class="std-text">
			There are currently no entries in <em><dtml-var title></em>
			<br /><br />
			</div>
			</td>
			</tr>
	</table>
</dtml-if>

</form>

<form action="manage_exportEntries" method="post">
	<table cellspacing="0" cellpadding="2" border="0">
	<tr>
	  <td align="left" valign="top" width="16"></td>
	  <td align="left" valign="top">
		<input type="text" name="fname" size="20" value="COREBlog_Export.txt" />
	  </td>
	  <td align="left" valign="top">
	  <div class="form-element">
	  <input class="form-element" type="submit" name="export" 
	   value="Export entries" />
	  </div>
	  </td>
	</tr>
</table>
</form>

<dtml-var manage_page_footer>

