Last change
on this file since 61 was
45,
checked in by peter, 11 years ago
|
- created a separate edit runmode to edit existing bookmarks; handled POST /{id}
- the old edit runmode has been renamed to create, and only handles POST /
- added an update method to the Bookmark class
- the URI field on the bookmark editing form is no longer ever readonly; the URI can be changed after the bookmark has been created
- changes to the URI or the bookmark's tags cause the bookmark's mtime to be updated
|
File size:
1.8 KB
|
Line | |
---|
1 | <html> |
---|
2 | <head> |
---|
3 | <title>Bookmark: [% title or uri %]</title> |
---|
4 | <style type="text/css"> |
---|
5 | body, th, td { |
---|
6 | font-size: .875em; |
---|
7 | } |
---|
8 | li { |
---|
9 | margin-bottom: .5em; |
---|
10 | } |
---|
11 | th { |
---|
12 | text-align: right; |
---|
13 | font-weight: normal; |
---|
14 | } |
---|
15 | </style> |
---|
16 | </head> |
---|
17 | <body> |
---|
18 | <div> |
---|
19 | [% UNLESS exists %] |
---|
20 | <strong>New bookmark:</strong> |
---|
21 | [% END %] |
---|
22 | <a href="[% uri | html %]" target="_blank">[% title or uri %]</a> |
---|
23 | [% IF exists %] |
---|
24 | <p class="timestamps">[% created %]</p> |
---|
25 | [% IF tags.size %] |
---|
26 | <p class="tags">Tagged as: |
---|
27 | [% FOREACH tag IN tags %] |
---|
28 | <a href=".?tag=[% tag %]" class="tag" target="_blank" onclick="if (opener && !opener.closed) { opener.location = this.href; return false; }">[% tag %]</a> |
---|
29 | [% END %] |
---|
30 | </p> |
---|
31 | [% END %] |
---|
32 | [% END %] |
---|
33 | <form method="post" action=""> |
---|
34 | <table> |
---|
35 | <tr> |
---|
36 | <th>URI:</th> |
---|
37 | <td> |
---|
38 | <input type="text" name="uri" value="[% uri | html %]" size="80"/> |
---|
39 | </td> |
---|
40 | </tr> |
---|
41 | <tr> |
---|
42 | <th>Title:</th> |
---|
43 | <td> |
---|
44 | <input type="text" name="title" value="[% title | html %]" size="80"/> |
---|
45 | </td> |
---|
46 | </tr> |
---|
47 | <tr> |
---|
48 | <th>Tags:</th> |
---|
49 | <td> |
---|
50 | <input type="text" name="tags" value="[% tags.join(' ') | html %]" size="80"/> |
---|
51 | </td> |
---|
52 | </tr> |
---|
53 | <tr> |
---|
54 | <th></th> |
---|
55 | <td> |
---|
56 | <input type="submit" value="Save"/> |
---|
57 | </td> |
---|
58 | </tr> |
---|
59 | </table> |
---|
60 | </form> |
---|
61 | </div> |
---|
62 | <script> |
---|
63 | window.onload = function() { |
---|
64 | if (document.location.hash == '#updated') { |
---|
65 | if (opener) { |
---|
66 | opener.location.reload(); |
---|
67 | } |
---|
68 | } |
---|
69 | }; |
---|
70 | </script> |
---|
71 | </body> |
---|
72 | </html> |
---|
73 | |
---|
74 | <!-- |
---|
75 | vim:syntax=html |
---|
76 | --> |
---|
Note: See
TracBrowser
for help on using the repository browser.