Legend:
- Unmodified
- Added
- Removed
-
trunk/bookmark.tt
r2 r3 22 22 <a href="[% uri %]" target="_blank">[% title or uri %]</a> 23 23 [% IF exists %] 24 <p >[% created %]</p>24 <p class="timestamps">[% created %]</p> 25 25 [% IF tags.size %] 26 <p >Tagged as:26 <p class="tags">Tagged as: 27 27 [% FOREACH tag IN tags %] 28 <a href=" ?tag=[% tag %]">[% tag %]</a>28 <a href=".?tag=[% tag %]" class="tag" target="_blank" onclick="if (opener && !opener.closed) { opener.location = this.href; return false; }">[% tag %]</a> 29 29 [% END %] 30 30 </p> … … 64 64 window.onload = function() { 65 65 if (document.location.hash == '#updated') { 66 opener.location.reload(); 66 if (opener) { 67 opener.location.reload(); 68 } 67 69 } 68 70 }; -
trunk/index.cgi
r2 r3 98 98 } 99 99 } else { 100 #print $q->header('text/html'); 101 #print "TODO: list bookmarks"; 102 #return; 103 # list all the resources 104 my $format = $q->param('format'); 100 # list all the bookmarks 101 my $format = $q->param('format') || 'html'; 105 102 my $tag = $q->param('tag'); 106 103 my @resources = $bookmarks->get_resources({ tag => $tag }); … … 123 120 -charset => 'UTF-8', 124 121 ); 122 123 # set the base URL, adding a trailing slash if needed 124 my $base_url = $q->url; 125 $base_url .= '/' if $base_url =~ m{/bookmarks$}; 126 125 127 $template->process( 126 128 'list.tt', 127 129 { 130 base_url => $base_url, 128 131 selected_tag => $tag, 129 132 tags => \@all_tags, -
trunk/list.tt
r2 r3 2 2 <head> 3 3 <title>Bookmarks</title> 4 <base href="[% base_url %]"/> 4 5 <style type="text/css"> 5 6 a:hover { … … 64 65 <li> 65 66 <span class="edit"> 66 (<a href=" bookmarks/[% resource.id %]" onclick="window.open(this.href, 'edit_bookmark', 'width=800,height=250').focus(); return false;">Edit</a>)67 (<a href="[% resource.id %]" onclick="window.open(this.href, 'edit_bookmark', 'width=800,height=250').focus(); return false;">Edit</a>) 67 68 </span> 68 69 <a href="[% resource.uri %]" title="[% resource.title | html %] ([% resource.tags.join(', ') %])">[% resource.title or resource.uri %]</a>
Note: See TracChangeset
for help on using the changeset viewer.