Changeset 106 in bookmarks for trunk/lib/Bookmarks
- Timestamp:
- 10/19/15 21:16:31 (9 years ago)
- Location:
- trunk/lib/Bookmarks
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Bookmarks/Controller.pm
r100 r106 83 83 my $limit = $self->request->param('limit'); 84 84 my $offset = $self->request->param('offset'); 85 my $page = $self->request->param('page'); 85 86 86 87 my $list = Bookmarks::List->new({ … … 91 92 limit => $limit, 92 93 offset => $offset, 94 page => $page, 93 95 }), 94 96 }); -
trunk/lib/Bookmarks/List.pm
r95 r106 197 197 cotags => \@cotags, 198 198 resources => $self->results, 199 pages => $self->search->pages, 199 200 }, 200 201 \my $output, -
trunk/lib/Bookmarks/Search.pm
r88 r106 10 10 has limit => (is => 'ro'); 11 11 has offset => (is => 'ro'); 12 has page => (is => 'ro'); 12 13 13 14 has results => (is => 'rw', default => sub { [] }); 15 has pages => ( 16 is => 'rw', 17 isa => 'Data::Pageset', 18 ); 14 19 15 20 # module return -
trunk/lib/Bookmarks/list.tt
r95 r106 84 84 font-size: .875em; 85 85 } 86 .pagination { 87 margin: .5em; 88 } 86 89 </style> 87 90 </head> … … 96 99 <input type="submit" value="Go"/> 97 100 </form> 101 <div class="pagination"> 102 [% IF pages %] 103 <a href="?page=[% pages.first_page %]">«</a> 104 [% IF pages.previous_set %] 105 <a href="?page=[% pages.previous_set %]">‹</a> 106 [% END %] 107 [% FOREACH page IN pages.pages_in_set %] 108 [% IF page == pages.current_page %] 109 <strong>[% page %]</strong> 110 [% ELSE %] 111 <a href="?page=[% page %]">[% page %]</a> 112 [% END %] 113 [% END %] 114 [% IF pages.next_set %] 115 <a href="?page=[% pages.next_set %]">›</a> 116 [% END %] 117 <a href="?page=[% pages.last_page %]">»</a> 118 [% END %] 119 </div> 98 120 <ul class="main"> 99 121 [% FOREACH resource IN resources %]
Note: See TracChangeset
for help on using the changeset viewer.