|
Last change
on this file since 3 was
3,
checked in by peter, 14 years ago
|
- Added a base URL to the list, guarenteed to end in "bookmarks/"
- Default the ?format parameer to the list to "html" to avoid the unitialized value warnings
- Added more classes to the individual bookmark page elements
- Added an onclick handler to the tag links in a bookmark edit form that will attempt to open the link in the opener window; failing that, they will use a new window
- Check for an opener before attempting to reload it on page load
|
|
File size:
2.1 KB
|
| Rev | Line | |
|---|
| [2] | 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <title>Bookmarks</title> |
|---|
| [3] | 4 | <base href="[% base_url %]"/> |
|---|
| [2] | 5 | <style type="text/css"> |
|---|
| 6 | a:hover { |
|---|
| 7 | text-decoration: none; |
|---|
| 8 | } |
|---|
| 9 | .edit { |
|---|
| 10 | font-size: .85em; |
|---|
| 11 | } |
|---|
| 12 | body, th, td { |
|---|
| 13 | margin: 0; |
|---|
| 14 | font-size: .85em; |
|---|
| 15 | font-family: sans-serif; |
|---|
| 16 | } |
|---|
| 17 | ul { |
|---|
| 18 | height: 60%; |
|---|
| 19 | overflow-y: scroll; |
|---|
| 20 | margin: 0; |
|---|
| 21 | padding: 0; |
|---|
| 22 | border-top: 6px solid #eee; |
|---|
| 23 | border-bottom: 6px solid #eee; |
|---|
| 24 | } |
|---|
| 25 | li { |
|---|
| 26 | padding: .25em; |
|---|
| 27 | color: #999; |
|---|
| 28 | white-space: nowrap; |
|---|
| 29 | list-style-type: none; |
|---|
| 30 | } |
|---|
| 31 | th { |
|---|
| 32 | text-align: right; |
|---|
| 33 | font-weight: normal; |
|---|
| 34 | } |
|---|
| 35 | form { |
|---|
| 36 | margin: .5em; |
|---|
| 37 | } |
|---|
| 38 | p { |
|---|
| 39 | margin: .5em; |
|---|
| 40 | } |
|---|
| 41 | </style> |
|---|
| 42 | </head> |
|---|
| 43 | <body> |
|---|
| 44 | <form method="get" action=""> |
|---|
| 45 | <select name="tag" onchange="document.forms[0].submit()"> |
|---|
| 46 | <option value="">All bookmarks</option> |
|---|
| 47 | [% FOREACH tag IN tags %] |
|---|
| 48 | <option value="[% tag.tag %]" [% IF tag.selected %]selected="selected"[% END %]>[% tag.tag %] ([% tag.count %])</option> |
|---|
| 49 | [% END %] |
|---|
| 50 | </select> |
|---|
| 51 | <input type="submit" value="Go"/> |
|---|
| 52 | </form> |
|---|
| 53 | [% IF selected_tag %] |
|---|
| 54 | <p> |
|---|
| 55 | <a href="?tag=[% selected_tag %]">[% selected_tag %] links</a> |
|---|
| 56 | </p> |
|---|
| 57 | [% END %] |
|---|
| 58 | <select> |
|---|
| 59 | [% FOREACH tag IN cotags %] |
|---|
| 60 | <option>[% tag.tag %] ([% tag.count %])</option> |
|---|
| 61 | [% END %] |
|---|
| 62 | </select> |
|---|
| 63 | <ul style=""> |
|---|
| 64 | [% FOREACH resource IN resources %] |
|---|
| 65 | <li> |
|---|
| 66 | <span class="edit"> |
|---|
| [3] | 67 | (<a href="[% resource.id %]" onclick="window.open(this.href, 'edit_bookmark', 'width=800,height=250').focus(); return false;">Edit</a>) |
|---|
| [2] | 68 | </span> |
|---|
| 69 | <a href="[% resource.uri %]" title="[% resource.title | html %] ([% resource.tags.join(', ') %])">[% resource.title or resource.uri %]</a> |
|---|
| 70 | </li> |
|---|
| 71 | [% END %] |
|---|
| 72 | </ul> |
|---|
| 73 | <p> |
|---|
| 74 | <a href="?uri=" onclick="window.open(this.href, 'edit_bookmark', 'width=800,height=250'); return false;">New Bookmark</a> |
|---|
| 75 | </p> |
|---|
| 76 | <form method="get" action=""> |
|---|
| 77 | [% IF selected_tag %] |
|---|
| 78 | <input type="hidden" name="tag" value="[% selected_tag %]"/> |
|---|
| 79 | [% END %] |
|---|
| 80 | <div> |
|---|
| 81 | <input type="submit" value="Reload"/> |
|---|
| 82 | </div> |
|---|
| 83 | </form> |
|---|
| 84 | </body> |
|---|
| 85 | </html> |
|---|
| 86 | |
|---|
| 87 | <!-- |
|---|
| 88 | vim:syntax=html |
|---|
| 89 | --> |
|---|
Note: See
TracBrowser
for help on using the repository browser.