<form method='post' action='/id/{$node.node_id}' name="bookmarks_full">

{if $bookstyl eq 0}
{get_bookmarks}
{foreach from=$get_bookmarks item=bookmark_category}
{* showing bookmark category  *}
{if $bookmark_category.node_name neq false}
 kategoria::<a class='important'
href='/id/{$bookmark_category.node_id}/'>{$bookmark_category.node_name|stripslashes}</a>
        {if $bookmark_category.sum neq false}
                :: <span class='most_important'> {$bookmark_category.sum} NEW</span>
        {/if}
{/if}
<br>

{foreach from=$bookmark_category.children item=bookmarks}
<input style='height: 11px; width: 11px;' type='checkbox' name='bookmarks_chosen[]'
value='{$bookmarks.node_id}'
{if $bookmarks.node_user_subchild_count neq false} class='mark' {/if}
{if $bookmarks.node_user_subchild_count eq false and
    $bookmarks.lastdescendant_created < $bookmarks.last_visit and
    $bookmarks.node_updated < $bookmarks.last_visit} class='empty'
{/if}>
{if $bookmarks.node_name}
<a href='/id/{$bookmarks.node_id}'>{$bookmarks.node_name|stripslashes}</a>
{if $bookmarks.node_user_subchild_count neq false}
:: <span class='most_important'> {$bookmarks.node_user_subchild_count} NEW Child</span>
{/if}
{if $bookmarks.lastdescendant_created > $bookmarks.last_visit}
:: <span class='important'>descdnt</span>
{/if}
{if $bookmarks.node_updated > $bookmarks.last_visit}
:: <span class='important'>changed</span>
{/if}
{/if}
<br>
{/foreach}
<br>
{/foreach}
{/if}

{* -------------------------------------------  *}




{if $bookstyl eq 1}
  {get_bookmarks}
  {foreach from=$get_bookmarks item=bookmark_category}
    {* showing bookmark category  *}
    {if $bookmark_category.node_name neq false}
      kategoria::<a class='important'
      href='/id/{$bookmark_category.node_id}/'>{$bookmark_category.node_name|stripslashes}</a>
    {/if}
    <br>
    
    {foreach from=$bookmark_category.children item=bookmarks}
      {if $bookmarks.lastdescendant_created > $bookmarks.last_visit}
        <input style='height: 11px; width: 11px;' type='checkbox' name='bookmarks_chosen[]'
        value='{$bookmarks.node_id}' {if $bookmarks.node_user_subchild_count neq false} class='mark' {/if}>
        {if $bookmarks.node_name}
          <a href='/id/{$bookmarks.node_id}'>{$bookmarks.node_name|stripslashes}</a>
          {if $bookmarks.node_user_subchild_count neq false}
            :: <span class='most_important'> {$bookmarks.node_user_subchild_count} NEW Child</span>
          {/if}
          {if $bookmarks.lastdescendant_created > $bookmarks.last_visit}
            :: <span class='important'>descdnt</span>
          {/if}
          {if $bookmarks.node_updated > $bookmarks.last_visit}
            :: <span class='important'>changed</span>
          {/if}
        {/if}
        <br>
      {/if}
    {/foreach}

    {if $bookmark_category.children}
      <h3 class="h3_unread_books">all+</h3><div class="div_unread_books" style="display:none">
      {foreach from=$bookmark_category.children item=bookmarks}
        {if $bookmarks.lastdescendant_created < $bookmarks.last_visit}
          <input style='height: 11px; width: 11px;' type='checkbox' name='bookmarks_chosen[]' value='{$bookmarks.node_id}' class='empty'>
          {if $bookmarks.node_name|stripslashes}
            <a href='/id/{$bookmarks.node_id}'>{$bookmarks.node_name|stripslashes}</a>
            {if $bookmarks.node_user_subchild_count neq false}
              :: <span class='most_important'> {$bookmarks.node_user_subchild_count} NEW Child</span>
            {/if}
            {if $bookmarks.lastdescendant_created > $bookmarks.last_visit}
              :: <span class='important'>descdnt</span>
            {/if}
            {if $bookmarks.node_updated > $bookmarks.last_visit}
              :: <span class='important'>changed</span>
            {/if}
          {/if}
          <br>
        {/if}
      {/foreach}
      </div>
    {/if}
    

    <br>
  {/foreach}
{/if}


{* -------------------------------------------  *}


{if $bookstyl eq 2}

  {get_bookmarks}
  {foreach from=$get_bookmarks item=bookmark_category}
    {* showing bookmark category  *}
    {if $bookmark_category.node_name neq false}
      kategoria::<a class='important'
      href='/id/{$bookmark_category.node_id}/'>{$bookmark_category.node_name|stripslashes}</a>
      {if $bookmark_category.sum neq false}
        :: <span class='most_important'> {$bookmark_category.sum} NEW</span>
      {/if}
    {/if}
    <br>

    {foreach from=$bookmark_category.children item=bookmarks}
      {if $bookmarks.node_user_subchild_count neq false}
        <input style='height: 11px; width: 11px;' type='checkbox' name='bookmarks_chosen[]'
        value='{$bookmarks.node_id}' {if $bookmarks.node_user_subchild_count neq false} class='mark' {/if}>
        {if $bookmarks.node_name}
          <a href='/id/{$bookmarks.node_id}'>{$bookmarks.node_name|stripslashes}</a>
          {if $bookmarks.node_user_subchild_count neq false}
            :: <span class='most_important'> {$bookmarks.node_user_subchild_count} NEW Child</span>
          {/if}
          {if $bookmarks.lastdescendant_created > $bookmarks.last_visit}
            :: <span class='important'>descdnt</span>
          {/if}
          {if $bookmarks.node_updated > $bookmarks.last_visit}
            :: <span class='important'>changed</span>
          {/if}

        {/if}
        <br>
      {/if}
    {/foreach}
    
    {if $bookmark_category.children}
      <h3 class="h3_unread_books">all+</h3><div class="div_unread_books" style="display:none">
      {foreach from=$bookmark_category.children item=bookmarks}
        {if $bookmarks.node_user_subchild_count eq false}
          <input style='height: 11px; width: 11px;' type='checkbox' name='bookmarks_chosen[]' value='{$bookmarks.node_id}' class='empty'>
          {if $bookmarks.node_name|stripslashes}
            <a href='/id/{$bookmarks.node_id}'>{$bookmarks.node_name|stripslashes}</a>
            {if $bookmarks.node_user_subchild_count neq false}
              :: <span class='most_important'> {$bookmarks.node_user_subchild_count} NEW Child</span>
            {/if}
            {if $bookmarks.lastdescendant_created > $bookmarks.last_visit}
              :: <span class='important'>descdnt</span>
            {/if}
            {if $bookmarks.node_updated > $bookmarks.last_visit}
              :: <span class='important'>changed</span>
            {/if}
          {/if}
          <br>
        {/if}
      {/foreach}
      </div>
    {/if}

    <br>
  {/foreach}
{/if}

{* -------------------------------------------  *}

{if $bookstyl eq 3}
  {get_bookmarks}
  {foreach from=$get_bookmarks item=bookmark_category}
    {* showing bookmark category  *}

    {if $bookmark_category.node_name neq false}
      kategoria::<a class='important' href='/id/{$bookmark_category.node_id}/'>{$bookmark_category.node_name|stripslashes}</a>
      {if $bookmark_category.sum neq false}
        :: <span class='most_important'> {$bookmark_category.sum} NEW</span>
      {/if}
    {/if}
    <br>

    {foreach from=$bookmark_category.children item=bookmarks}
      {if $bookmarks.node_user_subchild_count neq false || $bookmarks.lastdescendant_created > $bookmarks.last_visit}
        <input style='height: 11px; width: 11px;' type='checkbox' name='bookmarks_chosen[]'
        value='{$bookmarks.node_id}' {if $bookmarks.node_user_subchild_count neq false} class='mark'{/if}>

        {if $bookmarks.node_name|stripslashes}
          <a href='/id/{$bookmarks.node_id}'>{$bookmarks.node_name|stripslashes}</a>
          {if $bookmarks.node_user_subchild_count neq false}
            :: <span class='most_important'> {$bookmarks.node_user_subchild_count} NEW Child</span>
          {/if}
          {if $bookmarks.lastdescendant_created > $bookmarks.last_visit}
            :: <span class='important'>descdnt</span>
          {/if}
          {if $bookmarks.node_updated > $bookmarks.last_visit}
            :: <span class='important'>changed</span>
          {/if}
          <br>
        {/if}
      {/if}
    {/foreach}

    {if $bookmark_category.children}
      <h3 class="h3_unread_books">all+</h3><div class="div_unread_books" style="display:none">
      {foreach from=$bookmark_category.children item=bookmarks}
        {if $bookmarks.node_user_subchild_count eq false || $bookmarks.lastdescendant_created < $bookmarks.last_visit}
          <input style='height: 11px; width: 11px;' type='checkbox' name='bookmarks_chosen[]' value='{$bookmarks.node_id}' class='empty'>
          {if $bookmarks.node_name|stripslashes}
            <a href='/id/{$bookmarks.node_id}'>{$bookmarks.node_name|stripslashes}</a>
            {if $bookmarks.node_updated > $bookmarks.last_visit}
              :: <span class='important'>changed</span>
            {/if}
          {/if}
          <br>
        {/if}
      {/foreach}
      </div>
    {/if}

    <br>
  {/foreach}
{/if}


<br>

<select name="bookmark_category_id">
  {foreach from=$get_bookmarks item=bookmark_category}
    {if $bookmark_category.node_name neq false}
      <option value="{$bookmark_category.node_id}">{$bookmark_category.node_name|stripslashes|truncate:40:"...":true}</option>
    {/if}
  {/foreach}
  <option value="">...no category</option>
</select>
<input type='submit' name='event' value='set_bookmark_category' /><br /><br />
<span class="important">Novú kategóriu</span> si vytvorte cez klasické bookmarky <a href="/id/19">/id/19</a><br /><br />

<input type='submit' name='event' value='unbook_multi' />
<input type='submit' name='event' value='set_as_read' /><br />
<span class="bookcat0"><input type='radio' value='0' name='bookstyl'> all</span>
<span class="bookcat1"><input type='radio' value='1' name='bookstyl'> new descendant</span>
<span class="bookcat2"><input type='radio' value='2' name='bookstyl'> new children</span>
<span class="bookcat3"><input type='radio' value='3' name='bookstyl'> new children & new descendant</span>
<input type='submit' name='event' value='bookstyl' />
</form>
