<div id="selCommentBlock">
    <div class="clsClearfix clsCommentBlock">
    <div class="clsFloatleft">
		<h2>{$LANG.common_total_comments} <span class="clsBlogComments">({$myobj->getFormField('total_comments')})</span></h2>

	</div>
    <div class="clsFloatright">
        <div class="clsBlogCommentTitle">
            <!-- start 1 -->
            <div class="clsBlogTop">
                {if $myobj->isShowPageBlock('selAcceptCommentBlock') && isMember()}
                    {if $myobj->isAllowedToAsk()}
                        <span id="selTop">
                            <a href="#selAddComment" onClick="new Effect.ScrollTo('selAddComment'); return false;">{$LANG.blog_cmd_add_comments}</a>
                        </span>
                    {else}
                        <div id="selMsgError">
                            <p>{$LANG.blog_cmd_info_not_allowed_to_post}</p>
                        </div>
                    {/if}
                {elseif !isMember()}
                    <span id="selTop">
                        <a id="addcomment" href="{$myobj->selCommentListBlock.login_lightwindow}" onclick="{$myobj->getBrowser('addcomment')}">{$LANG.blog_cmd_add_comments}</a>
                    </span>
                {/if}
            </div>
            <!--end 1 -->
        </div>
    </div>
</div>


	{if $CFG.admin.navigation.top}
		{include file='../general/pagination.tpl'}
	{/if}
{if $myobj->isResultsFound()}
	{foreach key=inc item=value from=$myobj->selCommentListBlock.showCommentsList}
		<div class="clsBlogDisplay" id="cmd{$value.record.comment_id}">
			<div class="clsUserThumbDetails">
	            <!-- More comment information start-->
                <div id="commentsmore{$value.record.comment_id}">
					<div class="clsClearfix" id="comment{$value.record.comment_id}">
                      	{if isUserImageAllowed()}
                           	<div class="clsFloatleft clsBlogSmallImage">{$myobj->displayProfileImage($value.userDetails, 'small', true)}</div>
                      	{/if}
                    	<div class="clsBlogDetails">
                        	<div class="clsClearfix">
                                <div class="clsFloatleft">
                                	<p class="clsBlogCommentUserName"><a href="{$value.myanswers_url}">{$value.userDetails.display_name}</a> {$LANG.blog_user_commented} :</p>
                                </div>
                                <div class="clsFloatright">
                              	  <span class="clsBlogInfoTitle"><!--{$LANG.common_date_added}{$LANG.common_title_seperator}-->&nbsp;{$value.date_added}</span>
                        	    </div>
                        	</div>
                        	<p>
                            	<span id="selEditCommentTxt_{$value.record.comment_id}">{$value.wordwrap_comment}</span>
                            	<span id="selEditComments_{$value.record.comment_id}"></span>
		               		</p>
		               		{if $value.separator_class eq ''}
								<div class="clsUserSubLinks clsClearfix">
			               			<div class="clsUserUploaded clsNoLeftBgPadngMrgn">
										{if chkVideoModuleAllowed('blogcomment') and $value.record.video_id}
				                        	<a id="{$value.ans_view_video.on_click}" href="{$value.ans_view_video.url}" onClick="{$myobj->getBrowser($value.ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusvideo.gif" alt="{$LANG.questions_video_available}" title="{$LANG.questions_video_available}" /></a>
				                    	{/if}
				                    	{if chkAudioModuleAllowed('blogcomment') and $value.record.audio_id}
				                        	<a id="{$value.ans_view_audio.on_click}" href="{$value.ans_view_audio.url}" onClick="{$myobj->getBrowser($value.ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-qusaudio.gif" alt="{$LANG.common_audio_available}" title="{$LANG.common_audio_available}" /></a>
				                    	{/if}
				                    	{if chkExternalVideoModuleAllowed('blogcomment') and $value.record.external_video_id}
				                        	<a id="{$value.ext_ans_view_video.on_click}" href="{$value.ext_ans_view_video.url}" onClick="{$myobj->getBrowser($value.ext_ans_view_video.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalvideo.gif" alt="{$LANG.external_video_available}" title="{$LANG.external_video_available}" /></a>
				                    	{/if}
				                    	{if chkExternalAudioModuleAllowed('blogcomment') and $value.record.external_audio_id}
				                        	<a id="{$value.ext_ans_view_audio.on_click}" href="{$value.ext_ans_view_audio.url}" onClick="{$myobj->getBrowser($value.ext_ans_view_audio.on_click)}"><img src="{$CFG.site.url}design/templates/{$CFG.html.template.default}/root/images/{$CFG.html.stylesheet.screen.default}/icon-externalaudio.gif" alt="{$LANG.external_video_available}" title="{$LANG.external_video_available}" /></a>
				                    	{/if}
									</div>
								</div>
							{/if}
                            <div class="clsClearfix">
                                <ul class="clsBlogInnerLinks">
                                   <!-- <li class="clsLastBlogInfo">
                                        <span class="clsBlogInfoTitle">{$LANG.common_comment_posted_by}{$LANG.common_title_seperator}</span>&nbsp;<a href="{$value.myanswers_url}">{$value.strip_name}</a>
                                    </li>-->
                                    {if isMember()}
                                        {if $value.record.status eq 'Active' }
                                            <li class="clsReply">
                                                <span class="clsBlogInfoTitle" id="{$value.replySpanIDId}">
                                                    <a href="{$value.blogcomment_url}" onClick="ajaxUpdateDiv('{$value.blogcomment_url}','{$value.blogcomment_pars}','{$value.selReplyId}'); return false;">
                                                        {$LANG.reply}
                                                    </a>
                                                </span>
                                            </li>
                                        {/if}
                                    {else}
                                        <li>
                                            <span class="clsBlogInfoTitle" id="{$value.replySpanIDId}">
                                                <a href="{$value.blogcomment_url}" >
                                                {$LANG.reply}
                                                </a>
                                            </span>
                                        </li>
                                    {/if}
                                    {if isMember() && $value.record.user_id eq $CFG.user.user_id || $CFG.user.user_id eq $myobj->getFormField('user_id')}
                                        {if $value.record.status eq 'ToActivate'}
                                            <li class="clsBlogDelete">
                                                <span class="clsBlogInfoTitle" id="selViewPublishComment_{$value.record.comment_id}">
                                                    <a href="{$value.blogcomment_url}" onClick="return Confirmation('selMsgConfirm', 'formConfirm', Array('act','comment_id','confirmMessage'), Array('publishcomments','{$value.record.comment_id}', '{$LANG.blog_cmd_confirm_message_publish}'), Array('value','value','innerHTML'));">
                                                        {$LANG.common_publish}
                                                    </a>
                                                </span>
                                            </li>
                                        {/if}
                                        {if $value.record.status eq 'Active' && $value.record.user_id eq $CFG.user.user_id}
                                            <li class="clsBlogDelete">
                                                <span class="clsBlogInfoTitle" id="selViewDeleteComment_{$value.record.comment_id}">
                                                    <a href="{$value.blogcomment_url}"  onClick="return Confirmation('selMsgConfirm', 'formConfirm', Array('act','comment_id','confirmMessage'), Array('deletecomments','{$value.record.comment_id}', '{$LANG.blog_cmd_delete_confirmation}'), Array('value','value','innerHTML'));">
                                                        {$LANG.common_delete}
                                                    </a>
                                                 </span>
                                            </li>
                                        {/if}
                                    {/if}
                                </ul>
                            </div>
                     	</div>

                  	</div>
                    <div id="{$value.selReplyId}" class="">
                        {if $myobj->hasReply($value.record.comment_id)}
                             <div id="{$value.selViewReplyId}" class="clsViewReplies">
                                {foreach key=i item=val from=$value.fetchReply}
                                    <div class="clsBlogReply">
                                        <div class="clsClearfix clsInnerBlogWidth">
                                        <div class="clsUserBlogDetails">
                                            <div class="clsBlogDetails">
                                                <p><span id="selEditCommentTxt_{$val.record.comment_id}">{$val.user_comment}</span></p>
                                                <div class="clsClearfix clsUserSubLinks clsCommentReply">
                                                    <div class="clsUserLinkBy clsNoLeftBgPadngMrgn">
                                                        {$LANG.replied_by}
                                                    </div>
                                                    {if  isUserImageAllowed()}
                                                        <div class="clsUserLinkImage">
                                                            {$myobj->displayBlogUserSmallImage($val.userDetails)}
                                                        </div>
                                                    {/if}
                                                    <div class="clsUserLinkName clsNoLeftBgPadngMrgn"><a href="{$val.myanswers_url}">{$val.strip_name}</a></div>
                                                    <div class="clsUserLinkDate">&nbsp;{$val.date_added}
                                                    </div>

                                                    {if $val.usr_chk }
                                                        <div class="clsAnsDelete">
                                                            <span class="clsBlogInfoTitle">
                                                                <a href="{$val.blogcomment_url}" onClick="{$val.onclick_confirm}" class="more">{$LANG.common_delete}</a>
                                                            </span>
                                                        </div>
                                                    {/if}
                                               </div>
                                           </div>
                                        </div></div>
                                    </div>
                                {/foreach}
                            </div>
                        {/if}
                    </div>
               	</div>
            	<!-- More comment information end-->
            </div>
		</div>
    {/foreach}

    {if $CFG.admin.navigation.bottom}
		{include file='../general/pagination.tpl'}
	{/if}
{else}
    <div id="selMsgAlert">
        <p>
        	{$LANG.blog_cmd_no_records_found}
        </p>
    </div>
{/if}
</div>
{if isAjax()}
	{include file='../general/information.tpl'}
	{literal}
	<script language="javascript" type="text/javascript">
		if($('selMsgSuccess'))
			{
				hideAnimateBlock('selMsgSuccess');
			}
	</script>
 	{/literal}
{/if}