<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%~set secondarynav = "bookmark_nav.html"%>
<html>
<head>
  <title><%site_title%>: <%if my_folder_name%>Bookmarks: <%my_folder_name%><%else%>My Bookmarks<%endif%></title>
<%include include_common_head.html%>
</head>
<body id="bookmark_list">
<%include include_accessibility.html%>
  <div id="wrapper">
<%include include_header.html%>
<%include include_contentheader.html%>
    <div id="ocwrapper" class="clear">
      <div id="icwrapper" class="clear">
<%include include_leftsidebar.html%>
        <div id="contentwrapper" class="shadowleft">
<%include include_contentwrapper_top.html%>
          <div class="shadowtop"><div class="shadowtopleft"></div><div class="shadowtopright"></div></div>
          <div class="shadowright">
            <div id="content">
<%include include_content_top.html%>

<div class="crumb"><%Links::Utils::format_title($main_title_loop, separator => $crumb_separator, no_escape_separator => $no_escape_crumb_separator, include_home => 1, link_type => 2)%></div>
<h2><%if my_folder_name%><%my_folder_name%><%else%>My Bookmarks<%endif%></h2>

<p>
<%~if my_folder_name%>
  You have <%link_count%> link<%if link_count != 1%>s<%endif%> in this folder.
<%~else%>
  You have <%folder_count%> folder<%if folder_count != 1%>s<%endif%> with <%link_count%> link<%if link_count != 1%>s<%endif%>.
<%~endif%>
</p>

<%if paging.num_hits%><div class="paging"><%Links::Utils::paging()%></div><%endif%>

<%if Folders.length~%>
<ul class="folders">
<%~loop Folders%>
  <li>
    <a href="<%config.db_cgi_url%>/bookmark.cgi?action=folder_view;my_folder_id=<%my_folder_id%>"><%my_folder_name%></a> (<%num_links%>)
      <%if my_folder_public%><span class="bookmark-public"><span>public</span></span><%endif%>
      <%if my_folder_default%><span class="bookmark-default"><span>default</span></span><%endif%>
      <a href="<%config.db_cgi_url%>/bookmark.cgi?action=folder_edit;my_folder_id=<%my_folder_id%>">Edit</a>
      <%ifnot my_folder_default%><a href="<%config.db_cgi_url%>/bookmark.cgi?action=folder_remove;my_folder_id=<%my_folder_id%>" onclick="return confirm('Are you sure you want to delete this folder?')">Delete</a><%endif%>
      <a href="<%config.db_cgi_url%>/bookmark.cgi?action=folder_manage;my_folder_id=<%my_folder_id%>">Manage</a>
    <%if my_folder_description%><p class="description"><%my_folder_description%></p><%endif%>
  </li>
<%~endloop%>
</ul>
<%~endif%>

<%if Bookmarks.length~%>
<form action="<%config.db_cgi_url%>/bookmark.cgi" method="post">
  <input type="hidden" name="action" value="links_manage" />
  <input type="hidden" name="my_folder_id" value="<%escape_html my_folder_id%>" />
<%~loop Bookmarks%>
  <input type="checkbox" name="my_id" value="<%escape_html my_id%>" class="checkbox" />
<%~set editable = 1%>
<%include bookmark_link.html%>
<%~endloop%>
  <input type="submit" name="remove" value="Delete" class="submit" />
<%~if folder_select.length%>
  <input type="submit" name="move" value="Move Links to" class="submit" />
  <select name="move_folderid">
    <%loop folder_select%><option value="<%escape_html my_folder_id%>"><%my_folder_name%></option><%endloop%>
  </select>
<%~endif%>
</form>
<%~endif%>

<%if paging.num_hits%><div class="paging"><%Links::Utils::paging(button_id => 'paging_button2')%></div><%endif%>

<%include include_content_bottom.html%>
            </div>
          </div>
          <div class="shadowbottom"><div class="shadowbottomleft"></div><div class="shadowbottomright"></div></div>
<%include include_contentwrapper_bottom.html%>
        </div>
<%include include_rightsidebar.html%>
      </div>
    </div>
<%include include_contentfooter.html%>
<%include include_footer.html%>
  </div>
</body>
</html>
