<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="master.html" />
<?python
from turbogears.i18n.format import format_date
def dateandtime(d):
    return format_date(d, format="full", time_format=", %X %Z")
?>

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title py:content="pagetitle" />
</head>
<body>
  <h3>Your recent pastes</h3>

  <p>The SpammCan will remember your visit by setting a browser cookie that
  expires ${tg.config('spammcan.uid_cookie_expiry', 3600*24*90) / (3600*24)}
  days after your last visit. If you visit the SpammCan again within this time
  period, you can browse a list of the pastes which you have created, provided
  you use the same computer and browser and your browser has saved the
  cookie.</p>

  <p>If you want to access your pastes from another computer, you have to either
  know the paste URL or you can use the following URL to access this page:</p>

  <blockquote><a href="${tg.url(['/mypastes', uid])}"
      >${tg.abs_url(['/mypastes', uid])}</a></blockquote>

  <p>Pastes will be purged by a periodic clean-up procedure
    ${tg.config('spammcan.paste_expiry', 180)} days after they have been last
    viewed.</p>

  <div py:with="pastes=tg.ipeek(pastes)" py:strip="True">
    <p py:if="not pastes">No pastes found.</p>
    <div py:if="pastes" id="paste-container">
      <div class="paste-header" py:for="paste in pastes">
        <p>
        <span py:if="paste.title" py:strip="True"><a py:content="paste.title"
          href="${tg.url(['/paste', paste.guid])}" />
          (${paste.format.display_name})</span>
        <a py:if="not paste.title" href="${tg.url(['/paste', paste.guid])}"
          >${paste.format.display_name} paste</a>
        , added on <span class="paste-date" py:content="dateandtime(paste.created)" />
        - <a href="${tg.url(['/new', paste.guid])}">Copy &amp; Edit</a> ∙
          <a href="${tg.url(['/download', paste.guid])}">Download</a>
          <!--! ∙<a href="${mailto_url}">Send link</a> -->
          </p>
      </div>
    </div>
  </div>

</body>
</html>
