source: bookmarks/trunk/lib/Bookmarks/bookmark.tt @ 120

Last change on this file since 120 was 119, checked in by peter, 9 years ago

#15: Use Plack::Middleware::Static to serve static assets.

Moved the CSS and Javascript for creating the popup window into external static assets.

File size: 2.2 KB
Line 
1<html>
2  <head>
3    <title>Bookmark: [% bookmark.title or bookmark.uri %]</title>
4    <link rel="stylesheet" type="text/css" href="assets/bookmark.css"/>
5  </head>
6  <body>
7    <div>
8      <h1>
9      [% UNLESS bookmark.exists %]
10        <strong>New bookmark:</strong>
11      [% END %]
12      <a href="[% bookmark.uri | html %]" target="_blank">[% bookmark.title or bookmark.uri %]</a>
13      </h1>
14      [% IF bookmark.exists %]
15        <p class="timestamps">
16          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
17          <a href="http://web.archive.org/web/[% bookmark.updated_iso %]/[% bookmark.uri %]" title="Nearest Wayback Machine Link" target="_blank">[% bookmark.updated %]</a>[% END %]
18        </p>
19        [% IF bookmark.tags.size %]
20          <p class="tags">Tagged as:
21            [% FOREACH tag IN bookmark.tags %]
22              <a href=".?tag=[% tag %]" class="tag" target="_blank" onclick="if (opener && !opener.closed) { opener.location = this.href; return false; }">[% tag %]</a>
23            [% END %]
24          </p>
25        [% END %]
26      [% END %]
27      <form method="post" action="">
28        <table>
29          <tr>
30            <th>URI:</th>
31            <td>
32              <input type="text" name="uri" value="[% bookmark.uri | html %]" size="80"/>
33            </td>
34          </tr>
35          <tr>
36            <th>Title:</th>
37            <td>
38              <input type="text" name="title" value="[% bookmark.title | html %]" size="80"/>
39            </td>
40          </tr>
41          <tr>
42            <th>Tags:</th>
43            <td>
44              <input type="text" name="tags" value="[% bookmark.tags.join(' ') | html %]" size="80"/>
45            </td>
46          </tr>
47          <tr>
48            <th></th>
49            <td>
50              <input type="submit" value="Save"/>
51            </td>
52          </tr>
53        </table>
54      </form>
55    </div>
56    <script>
57window.onload = function() {
58    if (document.location.hash == '#updated') {
59        if (opener) {
60            opener.location.reload();
61        }
62    }
63};
64    </script>
65  </body>
66</html>
67
68<!--
69vim:syntax=html
70-->
Note: See TracBrowser for help on using the repository browser.