Changeset 22 in bookmarks for trunk/BookmarkApp.pm
- Timestamp:
- 05/22/13 16:08:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BookmarkApp.pm
r21 r22 136 136 $base_url .= '/' if $base_url =~ m{/bookmarks$}; 137 137 138 my @links = ( 139 { 140 text => 'Link', 141 type => 'text/html', 142 rel => 'self', 143 query => { 144 tag => \@tags, 145 }, 146 }, 147 { 148 text => 'JSON', 149 type => 'application/json', 150 rel => 'alternate', 151 query => { 152 tag => \@tags, 153 format => 'json', 154 }, 155 }, 156 { 157 text => 'XBEL', 158 type => 'application/xml', 159 rel => 'alternate', 160 query => { 161 tag => \@tags, 162 format => 'xbel', 163 }, 164 }, 165 { 166 text => 'Atom', 167 type => 'application/atom+xml', 168 rel => 'alternate', 169 path => 'feed', 170 query => { 171 tag => \@tags, 172 }, 173 }, 174 ); 175 for my $link (@links) { 176 $link->{href} = URI->new_abs($link->{path} || '', $base_uri); 177 $link->{href}->query_form($link->{query}); 178 } 179 138 180 return $self->tt_process( 139 181 'list.tt', … … 142 184 selected_tag => $tag, 143 185 search_tags => \@tags, 144 tag_query => join('&', map { "tag=$_" } @tags),186 links => \@links, 145 187 all_tags => \@all_tags, 146 188 cotags => \@cotags,
Note: See TracChangeset
for help on using the changeset viewer.