__section__
default
__description__
Display a comment link string (reply, parent, etc.), included by
dispComment

It's silly to do the complex check over and over to see whether the user
can delete comments.  This is done in several templates but this one's
the worst.  We should have a _can_del in Slash.pm and pass a can_del in
to this template in a field, just like can_mod.

__title__

__page__
misc
__lang__
en_US
__name__
dispLinkComment
__template__
[% IF user.mode != 'metamod' %]
	[% IF user.is_admin || original_pid || !user.state.discussion_archived %]
		[% do_parent = ( original_pid ); #&& !(discussion2 && (!form.cid || form.cid != cid)) );
		   do_mod    = ( (constants.authors_unlimited && user.seclev >= constants.authors_unlimited) || user.acl.candelcomments_always ) %]
		<div class="commentSub">

		[ [% IF !user.state.discussion_archived && !user.state.discussion_future_nopost %]
			[% Slash.linkComment({
				sid	=> sid,
				pid	=> cid,
				op	=> 'Reply',
				subject	=> 'Reply to This',
				subject_only => 1,
				#onclick	=> (discussion2 ? "return replyTo($cid)" : '')
			}) %]
		[% END %]

		[% IF !(user.state.discussion_archived) && ( do_parent || can_mod || do_mod ) %] | [% END %]

		[% IF do_parent %][% Slash.linkComment({
			sid	=> sid,
			cid	=> original_pid,
			pid	=> original_pid,
			subject	=> 'Parent',
			subject_only => 1,
			onclick	=> (discussion2 ? "return selectParent($original_pid)" : '')
		}, 1) %][% END %]
		
		[% IF do_parent && ( can_mod || do_mod ) %] | [% END %]

		[% IF can_mod %]
		<div class="modsel">[% Slash.createSelect("reason_$cid", reasons, '', 1, 1) 
		%]</div>[% END %]

		[% IF can_mod && do_mod %] | [% END %]

		[% IF (constants.authors_unlimited && user.seclev >= constants.authors_unlimited)
			|| user.acl.candelcomments_always %]
		<input type="checkbox" name="del_[% cid %]">
		[% END %]
		]
		</div>
	[% END %]

[% END %]

__seclev__
10000
__version__
$Id: dispLinkComment;misc;default,v 1.33 2006/05/17 01:49:01 pudge Exp $
