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

Last change on this file since 121 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
RevLine 
[2]1<html>
2  <head>
[66]3    <title>Bookmark: [% bookmark.title or bookmark.uri %]</title>
[119]4    <link rel="stylesheet" type="text/css" href="assets/bookmark.css"/>
[2]5  </head>
6  <body>
7    <div>
[64]8      <h1>
[66]9      [% UNLESS bookmark.exists %]
[2]10        <strong>New bookmark:</strong>
11      [% END %]
[66]12      <a href="[% bookmark.uri | html %]" target="_blank">[% bookmark.title or bookmark.uri %]</a>
[64]13      </h1>
[66]14      [% IF bookmark.exists %]
[64]15        <p class="timestamps">
[66]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 %]
[64]18        </p>
[66]19        [% IF bookmark.tags.size %]
[3]20          <p class="tags">Tagged as:
[66]21            [% FOREACH tag IN bookmark.tags %]
[3]22              <a href=".?tag=[% tag %]" class="tag" target="_blank" onclick="if (opener && !opener.closed) { opener.location = this.href; return false; }">[% tag %]</a>
[2]23            [% END %]
24          </p>
25        [% END %]
26      [% END %]
27      <form method="post" action="">
28        <table>
29          <tr>
30            <th>URI:</th>
31            <td>
[66]32              <input type="text" name="uri" value="[% bookmark.uri | html %]" size="80"/>
[2]33            </td>
34          </tr>
35          <tr>
36            <th>Title:</th>
37            <td>
[66]38              <input type="text" name="title" value="[% bookmark.title | html %]" size="80"/>
[2]39            </td>
40          </tr>
41          <tr>
42            <th>Tags:</th>
43            <td>
[66]44              <input type="text" name="tags" value="[% bookmark.tags.join(' ') | html %]" size="80"/>
[2]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') {
[3]59        if (opener) {
60            opener.location.reload();
61        }
[2]62    }
63};
64    </script>
65  </body>
66</html>
67
68<!--
69vim:syntax=html
70-->
Note: See TracBrowser for help on using the repository browser.