Index: trunk/lib/Bookmarks/Controller.pm
===================================================================
--- trunk/lib/Bookmarks/Controller.pm	(revision 92)
+++ trunk/lib/Bookmarks/Controller.pm	(revision 95)
@@ -147,5 +147,6 @@
         } else {
             # display the bookmark form for this bookmark
-            my $template = Template->new;
+            require File::Basename;
+            my $template = Template->new({ INCLUDE_PATH => File::Basename::dirname($INC{'Bookmarks/Controller.pm'}) });
             $template->process(
                 'bookmark.tt',
Index: trunk/lib/Bookmarks/List.pm
===================================================================
--- trunk/lib/Bookmarks/List.pm	(revision 92)
+++ trunk/lib/Bookmarks/List.pm	(revision 95)
@@ -179,5 +179,6 @@
 
     require Template;
-    my $template = Template->new;
+    require File::Basename;
+    my $template = Template->new({ INCLUDE_PATH => File::Basename::dirname($INC{'Bookmarks/List.pm'}) });
 
     my @all_tags = $self->bookmarks->get_tags({ selected => @{ $self->tags }[0] });
Index: trunk/lib/Bookmarks/bookmark.tt
===================================================================
--- trunk/lib/Bookmarks/bookmark.tt	(revision 95)
+++ trunk/lib/Bookmarks/bookmark.tt	(revision 95)
@@ -0,0 +1,84 @@
+<html>
+  <head>
+    <title>Bookmark: [% bookmark.title or bookmark.uri %]</title>
+    <style type="text/css">
+body, th, td {
+    font-size: .875em;
+}
+h1 {
+  font-size: 1.25em;
+}
+li {
+    margin-bottom: .5em;
+}
+th {
+    text-align: right;
+    font-weight: normal;
+}
+    </style>
+  </head>
+  <body>
+    <div>
+      <h1>
+      [% UNLESS bookmark.exists %]
+        <strong>New bookmark:</strong>
+      [% END %]
+      <a href="[% bookmark.uri | html %]" target="_blank">[% bookmark.title or bookmark.uri %]</a>
+      </h1>
+      [% IF bookmark.exists %]
+        <p class="timestamps">
+	  Bookmark created <a href="http://web.archive.org/web/[% bookmark.created_iso %]/[% bookmark.uri %]" title="Nearest Wayback Machine Link" target="_blank">[% bookmark.created %]</a>[% IF bookmark.mtime != bookmark.ctime %]; updated
+	  <a href="http://web.archive.org/web/[% bookmark.updated_iso %]/[% bookmark.uri %]" title="Nearest Wayback Machine Link" target="_blank">[% bookmark.updated %]</a>[% END %]
+        </p>
+        [% IF bookmark.tags.size %]
+          <p class="tags">Tagged as:
+            [% FOREACH tag IN bookmark.tags %]
+              <a href=".?tag=[% tag %]" class="tag" target="_blank" onclick="if (opener && !opener.closed) { opener.location = this.href; return false; }">[% tag %]</a>
+            [% END %]
+          </p>
+        [% END %]
+      [% END %]
+      <form method="post" action="">
+        <table>
+          <tr>
+            <th>URI:</th>
+            <td>
+              <input type="text" name="uri" value="[% bookmark.uri | html %]" size="80"/>
+            </td>
+          </tr>
+          <tr>
+            <th>Title:</th>
+            <td>
+              <input type="text" name="title" value="[% bookmark.title | html %]" size="80"/>
+            </td>
+          </tr>
+          <tr>
+            <th>Tags:</th>
+            <td>
+              <input type="text" name="tags" value="[% bookmark.tags.join(' ') | html %]" size="80"/>
+            </td>
+          </tr>
+          <tr>
+            <th></th>
+            <td>
+              <input type="submit" value="Save"/>
+            </td>
+          </tr>
+        </table>
+      </form>
+    </div>
+    <script>
+window.onload = function() {
+    if (document.location.hash == '#updated') {
+        if (opener) {
+            opener.location.reload();
+        }
+    }
+};
+    </script>
+  </body>
+</html>
+
+<!--
+vim:syntax=html
+-->
Index: trunk/lib/Bookmarks/list.tt
===================================================================
--- trunk/lib/Bookmarks/list.tt	(revision 95)
+++ trunk/lib/Bookmarks/list.tt	(revision 95)
@@ -0,0 +1,160 @@
+<html>
+  <head>
+    <title>[% title %]</title>
+    <base href="[% base_url %]"/>
+    <style type="text/css">
+a:hover {
+    text-decoration: none;
+}
+.edit {
+    font-size: .85em;
+}
+input, select {
+    font-size: .875em;
+    font-family: 'DejaVu Sans', sans-serif;
+}
+body, th, td {
+    margin: 0;
+    font-size: .75em;
+    font-family: 'DejaVu Sans', sans-serif;
+}
+ul {
+    margin: 0;
+    padding: 0;
+}
+ul.main {
+    height: 60%;
+    border-top: 6px solid #eee;
+    border-bottom: 6px solid #eee;
+}
+.alternate-links {
+    margin: .5em .25em;
+}
+.alternate-links li {
+    display: inline;
+}
+.alternate-links li+li:before {
+    content: ' | ';
+    color: #ccc;
+}
+.refine {
+    height: 15%;
+}
+.refine form {
+    margin: 0;
+}
+.buttons {
+    margin: .5em;
+}
+.cotags {
+    height: 75%;
+    border-top: 1px dotted #999;
+    border-bottom: 1px dotted #999;
+}
+ul.main, ul.cotags {
+    overflow-y: scroll !important;
+}
+li {
+    padding: .25em 0 0 .25em;
+    color: #999;
+    white-space: nowrap;
+    list-style-type: none;
+}
+th {
+    text-align: right;
+    font-weight: normal;
+}
+form {
+    margin: .5em;
+}
+p {
+    margin: .5em;
+}
+.tags a {
+    color: #999;
+    text-decoration: none;
+}
+.tags a:hover {
+    text-decoration: underline;
+}
+.tags {
+    color: #999;
+    margin-top: .125em;
+    margin-left: 3em;
+    font-size: .875em;
+}
+    </style>
+  </head>
+  <body>
+    <form method="get" action="">
+      <select name="tag" onchange="document.forms[0].submit()">
+	<option value="">All bookmarks</option>
+	[% FOREACH tag IN all_tags %]
+	  <option value="[% tag.tag %]" [% IF tag.selected %]selected="selected"[% END %]>[% tag.tag %] ([% tag.count %])</option>
+	[% END %]
+      </select>
+      <input type="submit" value="Go"/>
+    </form>
+    <ul class="main">
+      [%  FOREACH resource IN resources %]
+        <li>
+          <span class="edit">
+	    (<a href="[% resource.id %]" onclick="window.open(this.href, 'edit_bookmark', 'width=800,height=250').focus(); return false;">Edit</a>)
+	  </span>
+          <a href="[% resource.uri | html %]" title="[% resource.title | html %] ([% resource.tags.join(', ') %])">[% resource.title or resource.uri %]</a>
+          <div class="tags">
+	    [% FOREACH tag IN resource.tags %]
+	      [% IF loop.first %]([% END %]<a target="_self" href="?tag=[% tag %]">[% tag %]</a>[% IF loop.last %])[% ELSE %], [% END %]
+	    [% END %]
+	  </div>
+        </li>
+      [%  END %]
+    </ul>
+    <ul class="alternate-links">
+      [% FOREACH link IN links %]
+	<li>
+	  <a href="[% link.href.canonical | html %]" type="[% link.type %]" rel="[% link.rel %]">[% link.text %]</a>
+	</li>
+      [% END %]
+    </ul>
+    <div class="refine">
+      <form method="get" action="">
+        <label>Search: <input type="text" name="q" value="[% query | html %]" size="30"/></label>
+        <div class="taglists">
+          <ul class="searchtags">
+            [% FOREACH tag IN search_tags %]
+              <li>
+                <label>
+                  <input type="checkbox" name="tag" value="[% tag %]" checked="checked"/>
+                  [% tag %]
+                </label>
+              </li>
+            [% END %]
+          </ul>
+          [% IF cotags.size %]
+            <ul class="cotags">
+              [% FOREACH tag IN cotags %]
+                <li>
+                  <label>
+                    <input type="checkbox" name="tag" value="[% tag.tag %]"/>
+                    [% tag.tag %] ([% tag.count %])
+                  </label>
+                </li>
+              [% END %]
+            </ul>
+          [% END %]
+        </div>
+        <div class="buttons">
+          <input type="submit" value="Refine"/>
+        </div>
+      </form>
+      <p>
+	<a class="bookmarklet" href="javascript:(function(){window.open(%22[% base_url %]?uri=%22+encodeURIComponent(document.location)+%22&title=%22+encodeURIComponent(document.title),%22edit_bookmark%22,%22width=800,height=250%22)})()" title="Javascript Bookmarklet">Make Bookmark</a>
+      </p>
+    </div>
+  </body>
+</html>
+
+<!--
+vim:syntax=html
+-->
