%%document-index-editor-html%%
2002-07-21 14:10

%%preprocess%%
// format the object for display
$this->beryliumToHtml(); 
$this->getRuntimeVars();

// convert generic flavor to objtype:
if ($this->flavor=="Generic") $this->flavor= "Document";


// headline fix if only title
if ($this->title=="" && $this->headline=="") $this->title= "Untitled ($this->name)";
elseif ($this->title=="") $this->title= $this->headline;

// more tag if body exists
if ($this->body!="") $this->moreTag="<a href='$this->baseUrl'>full document</a> &raquo; |";

// alternating rows
$session=$GLOBALS[session];
if ($session->row=="" || $session->row=="odd") {
	$this->rowclass="oddrow";
	}
else {
	$this->rowclass="evenrow";
	}
 
// show folder link?
if ($folder->id != $this->folderid) $this->folderTag= bparsebml(" in [folder:$this->folderid]");
	
// show archive link?
if ($folder->rank<=500) {
	$this->archiveTag="
		<table class=objTable cellspacing=5 cellpadding=5>
			<tr>
				<td align='center'>
					<a href='$folder->baseUrl$this->objtype-.html?method=listall&listranksign=<$session->cgi'>$folder->title $this->objtype archive</a>
				</td>
			</tr>
		</table>";
	}
	
// how many comments?
$query= "SELECT COUNT(obj.id) FROM comment AS obj WHERE obj.parentobjtype='$this->objtype' AND obj.parentid='$this->id' $session->statuswhere $session->publicwhere";
if ($result=@mysql_query($query)) {
	$commentTotal= mysql_fetch_row($result);
	$this->commentTotal= $commentTotal[0];
	}
else $this->commentTotal= "0";
	
%%header%%



%%css%%


%%template%%
<table class='objTable' cellspacing=5 cellpadding=5>
	<tr class='$this->rowclass'>
		<td>
			<table class='objHeader'>
				<tr>
					<td width='1' valign='middle'>$this->iconTag</td>
					<td>
						<span class='objFlavor'>$this->flavor:<br></span>
						<span class='objTitle'><a href="$this->baseUrl">$this->title</a>
						<span class='objByline'> <br> 
							By $this->authorTag on $this->dateTag$this->folderTag. $this->updateTag <img src='/bicons/event.png' alt='updated $this->updated' title='created $this->created - updated $this->updated' align=absmiddle border=0></a></span>
					</td>
				</tr>
			</table>
			<blockquote class='objDescription'>$this->description</blockquote>
			<p align="right" class='info'>$this->moreTag 
				<a href='$this->baseUrl#comments'><img src='/bicons/comment.png' alt='' title='view/add comments' align=absmiddle border=0></a> 
				<a href='$this->baseUrl#comments'>$this->commentTotal comments</a> | 
				<a href="$this->baseUrl?method=toggleRank&return=$object->baseUrl"><img src='/bicons/bulbsgif/$this->glow.gif' alt='$this->publishStatus' title='document:$this->id is $this->publishStatus' align=absmiddle border=0></a> |
				<a href="$this->baseUrl?method=edit$session->cgi"><img src='/bicons/edit.png' alt='edit' title='edit this object' align=absmiddle border=0></a> |
				<a href="$this->baseUrl?method=pickup$session->cgi"><img src='/bicons/pickup.png' alt='pick up' title='pick up this object' align=absmiddle border=0></a>
			</p>
		</td>
	</tr>
</table>



%%listrow%%
 



%%nullobject%%
 



%%footer%%
$this->archiveTag


%%postprocess%%



%%end of context%%
