{if $is_com}
    {literal}
        <style type="text/css">
            div.u_online {
                background: #648028;
                color: #fff;
                font-size: 10px;
                height: 15px;
                line-height: 15px;
                text-align: center;
                border-top: 1px solid #fff;
                width: 40px;
            }
            div.u_offline {
                background: #ccc;
                color: #333;
                font-size: 10px;
                height: 15px;
                line-height: 15px;
                text-align: center;
                border-top: 1px solid #fff;
                width: 40px;
            }
            div.com_date {
                font-size: 11px;
                color: #666;
                background: #f7f7f7;
                margin-top: 2px;
            }
            div.comm_content {
                background: #eeeeee;
                border-radius: 8px;
                padding: 5px;
            }
            a.comm_link {
                font-size: 12px;
                color: #369;
                text-decoration: none;
            }
            a.comm_link:hover {
                text-decoration: underline;
            }
            span.comm_rate {
                color: #999;
                font-weight: bold;
                font-size: 11px;
            }
            div.comm_target a {
                color: #333;
                font-size: 11px;
                text-decoration: none;
                background: #e6e6e6;
                padding: 0 3px;
            }
            img.comm_arrow {
                margin-top: 10px;
            }
            img.comm_photo {
                width: 50px;
            }
            a.photo_title {
                font-size: 11px;
            }
            a.album_title {
                color: #666;
                font-size: 10px;
            }
            div.album img {
                margin: 2px 0;
            }
        </style>
    {/literal}

{if $cfg.showcols}
    {assign var="q" value="1"}
    {foreach key=aid item=comment from=$comments}
            {if $q==0}
                {assign var="q" value="1"}
            <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td valign="top" width="80" align="center">
                        {if $comment.user_ava}
                            <a href="{$comment.user_url}">
                                <img src="/images/users/avatars/small/{$comment.user_ava}" alt="" width="40" height="40">
                            </a>
                        {else}
                            <a href="{$comment.user_url}">
                                <img src="/images/users/avatars/small/nopic.jpg" alt=""  width="40" height="40">
                            </a>
                        {/if}
                        {if $comment.user_online}
                             <div class="u_online">online</div>
                         {else}
                             <div class="u_offline">offline</div>
                         {/if}
                    <div class="com_date">
                        {$comment.fpubdate}
                    </div>
                </td>
                <td  width="22px" valign="top">
                    <img class="comm_arrow" src="/modules/mod_comments_new/left.png" alt="">
                </td>

                {if $comment.photo.file}
                      <td>
                          <div class="comm_content">
                          <div class="album">
                              <table>
                                  <tr>
                                      <td colspan="2">
                                          <a class="photo_title" href="{$comment.target_link}">{$comment.target_title}</a>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td width="60">
                                          <img class="comm_photo" src="/images/photos/small/{$comment.photo.file}" alt="">
                                      </td>
                                      <td>
                                          <div>
                                              <a class="comm_link" href="{$comment.link}">{$comment.text}</a> {if $cfg.showtarg} <span class="comm_rate">({$comment.rating})</span>{/if}
                                          </div>
                                          <div class="comm_target">
                                               <a href="{$comment.target_link}">{$comment.target_title}</a>
                                          </div>
                                      </td>
                                  </tr>
                                  <tr>
                                      <td colspan="2">
                                          <a class="album_title" href="/photos/{$comment.album.id}">
                                              Альбом: {$comment.album.title}
                                          </a>
                                      </td>
                                  </tr>
                              </table>
                          </div>
                          </div>
                      </td>
                   {else}
                  <td valign="top">
                      <div class="comm_content">
                          <table  width="100%" cellpadding="0">
                              <tr>
                                  <td valign="top">
                                      <div>
                                          <a class="comm_link" href="{$comment.link}">{$comment.text}</a> {if $cfg.showtarg} <span class="comm_rate">({$comment.rating})</span>{/if}
                                      </div>
                                      <div class="comm_target">
                                           <a href="{$comment.target_link}">{$comment.target_title}</a>
                                      </div>
                                  </td>
                              </tr>
                          </table>
                      </div>
                  </td>
                  {/if}

            </tr>
            </table>
            {else}
                {assign var="q" value="0"}
            <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td valign="top">
                    <div class="comm_content">
                        <table width="100%" cellpadding="2">
                            <tr>
                                {if $comment.photo.file}
                                      <td>
                                          <div class="album">
                                              <table>
                                                  <tr>
                                                      <td colspan="2">
                                                          <a class="photo_title" href="{$comment.target_link}">{$comment.target_title}</a>
                                                      </td>
                                                  </tr>
                                                  <tr>
                                                      <td width="60">
                                                          <img class="comm_photo" src="/images/photos/small/{$comment.photo.file}" alt="">
                                                      </td>
                                                      <td>
                                                          <div>
                                                              <a class="comm_link" href="{$comment.link}">{$comment.text}</a> {if $cfg.showtarg} <span class="comm_rate">({$comment.rating})</span>{/if}
                                                          </div>
                                                          <div class="comm_target">
                                                               <a href="{$comment.target_link}">{$comment.target_title}</a>
                                                          </div>
                                                      </td>
                                                  </tr>
                                                  <tr>
                                                      <td colspan="2">
                                                          <a class="album_title" href="/photos/{$comment.album.id}">
                                                              Альбом: {$comment.album.title}
                                                          </a>
                                                      </td>
                                                  </tr>
                                              </table>
                                          </div>
                                      </td>
                                   {else}
                                  <td valign="top">
                                      <div class="comm_content">
                                          <table  width="100%" cellpadding="0">
                                              <tr>
                                                  <td valign="top">
                                                      <div>
                                                          <a class="comm_link" href="{$comment.link}">{$comment.text}</a> {if $cfg.showtarg} <span class="comm_rate">({$comment.rating})</span>{/if}
                                                      </div>
                                                      <div class="comm_target">
                                                           <a href="{$comment.target_link}">{$comment.target_title}</a>
                                                      </div>
                                                  </td>
                                              </tr>
                                          </table>
                                      </div>
                                  </td>
                                  {/if}
                            </tr>
                        </table>
                    </div>
                </td>
                <td width="24px" valign="top">
                    <img class="comm_arrow" src="/modules/mod_comments_new/right.png" alt="">
                </td>
                <td valign="top" width="80" align="center">
                        {if $comment.user_ava}
                            <a href="{$comment.user_url}">
                                <img src="/images/users/avatars/small/{$comment.user_ava}" alt="" width="40" height="40">
                            </a>
                        {else}
                            <a href="{$comment.user_url}">
                                <img src="/images/users/avatars/small/nopic.jpg" alt=""  width="40" height="40">
                            </a>
                        {/if}
                        {if $comment.user_online}
                             <div class="u_online">online</div>
                         {else}
                             <div class="u_offline">offline</div>
                         {/if}
                    <div class="com_date">
                        {$comment.fpubdate}
                    </div>
                </td>
            </tr>
            </table>
            {/if}
            <div style="height: 10px;"></div>
        {/foreach}
    {else}
        <table width="100%" cellpadding="0" cellspacing="0">
            {foreach key=aid item=comment from=$comments}
                <tr>
                    <td valign="top" width="80" align="center">
                            {if $comment.user_ava}
                                <a href="{$comment.user_url}">
                                    <img src="/images/users/avatars/small/{$comment.user_ava}" alt="" width="40" height="40">
                                </a>
                            {else}
                                <a href="{$comment.user_url}">
                                    <img src="/images/users/avatars/small/nopic.jpg" alt=""  width="40" height="40">
                                </a>
                            {/if}
                            {if $comment.user_online}
                                 <div class="u_online">online</div>
                             {else}
                                 <div class="u_offline">offline</div>
                             {/if}
                        <div class="com_date">
                            {$comment.fpubdate}
                        </div>
                    </td>
                    <td  width="22px" valign="top">
                        <img class="comm_arrow" src="/modules/mod_comments_new/left.png" alt="">
                    </td>
                    <td valign="top">
                        <div class="comm_content">
                            <table  width="100%" cellpadding="2">
                                <tr>
                                    {if $comment.photo.file}
                                        <td>
                                            <div class="album">
                                                <table>
                                                    <tr>
                                                        <td colspan="2">
                                                            <a class="photo_title" href="{$comment.target_link}">{$comment.target_title}</a>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td width="60">
                                                            <img class="comm_photo" src="/images/photos/small/{$comment.photo.file}" alt="">
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <a class="comm_link" href="{$comment.link}">{$comment.text}</a> {if $cfg.showtarg} <span class="comm_rate">({$comment.rating})</span>{/if}
                                                            </div>
                                                            <div class="comm_target">
                                                                 <a href="{$comment.target_link}">{$comment.target_title}</a>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2">
                                                            <a class="album_title" href="/photos/{$comment.album.id}">
                                                                Альбом: {$comment.album.title}
                                                            </a>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                     {else}
                                    <td valign="top">
                                        <div class="comm_content">
                                            <table  width="100%" cellpadding="0">
                                                <tr>
                                                    <td valign="top">
                                                        <div>
                                                            <a class="comm_link" href="{$comment.link}">{$comment.text}</a> {if $cfg.showtarg} <span class="comm_rate">({$comment.rating})</span>{/if}
                                                        </div>
                                                        <div class="comm_target">
                                                             <a href="{$comment.target_link}">{$comment.target_title}</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                    {/if}
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td></td>
                    <td>
                        <div style="height: 10px;"></div>
                    </td>
                </tr>
            {/foreach}
        </table>
    {/if}
    {if $cfg.showrss}
        <div style="margin-top:15px">
            <a href="/rss/comments/all/feed.rss" class="mod_latest_rss">Лента комментариев</a>
        </div>
    {/if}
    <div style="margin-top:5px">
        <a href="/comments" class="mod_com_all">Все комментарии</a>
    </div>
{else}            
    <p>{$LANG.COMMENTS_NOT_COMM}</p>
{/if}