isLastPage()}}data-lastPage{{endif}} data-feedID='records{$record::$customDatabaseId}-{$record->_id}' id='comments'>
{template="featuredComments" group="global" app="core" params="$record->featuredComments(), $record->url()->setQueryString('tab', 'comments')->setQueryString('recommended', 'comments')"}
{template="commentMultimodHeader" app="core" group="global" params="$record, '#comments'"}
{{if $record->commentPageCount() > 1}}
{$record->commentPagination( array( 'tab' ) )|raw}
{{endif}}
{{if \count( $record->comments( NULL, NULL, 'date', 'asc', NULL, NULL, NULL, NULL, FALSE, isset( \IPS\Request::i()->showDeleted ) ) )}}
{{else}}
{lang="no_comments"}
{{endif}}
{{if $record->commentPageCount() > 1}}
{$record->commentPagination( array( 'tab' ) )|raw}
{{endif}}
{{if $record->commentForm() || $record->locked() || \IPS\Member::loggedin()->restrict_post || \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings'] || !\IPS\Member::loggedIn()->checkPostsPerDay()}}
{{if $record->commentForm()}}
{{if $record->locked()}}
{lang="cms_locked_can_comment" sprintf="$record::database()->recordWord(1)"}
{{endif}}
{$record->commentForm()|raw}
{{else}}
{{if $record->locked()}}
{template="commentUnavailable" group="forms" location="front" app="core" params="'record_locked_cannot_comment'"}
{{elseif \IPS\Member::loggedin()->restrict_post}}
{template="commentUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment', \IPS\Member::loggedIn()->warnings(5,NULL,'rpa'), \IPS\Member::loggedIn()->restrict_post"}
{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
{template="commentUnavailable" group="forms" location="front" app="core" params="'unacknowledged_warning_cannot_post', \IPS\Member::loggedIn()->warnings( 1, FALSE )"}
{{elseif !\IPS\Member::loggedIn()->checkPostsPerDay()}}
{template="commentUnavailable" group="forms" location="front" app="core" params="'member_exceeded_posts_per_day'"}
{{endif}}
{{endif}}
{{endif}}