- <li class="divider" role="presentation"></li>
- [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
- <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves" tabindex="-1" role="menuitem"><strong>Your lists</strong></a></li>
- [% IF ( loggedinusername ) %]
- [% IF ( barshelves ) %]
- [% FOREACH barshelvesloo IN barshelvesloop %]
- <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% barshelvesloo.shelfnumber %]&sortfield=[% barshelvesloo.sortfield %]" tabindex="-1" role="menuitem">[% barshelvesloo.shelfname |html %]</a></li>
- [% END %]
- <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves" tabindex="-1" role="menuitem" class="listmenulink">View all</a></li>
- [% ELSE %]
- <li role="presentation"><a href="#" tabindex="-1" class="menu-inactive" role="menuitem">No private lists</a></li>
- <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves" tabindex="-1" role="menuitem" class="listmenulink">New list</a></li>
+ [% IF some_public_shelves > 10 %]
+ <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=2" tabindex="-1" role="menuitem" class="listmenulink">View All</a></li>
+ [% END %]
+ [% ELSE %]
+ <li role="presentation"><a href="#" tabindex="-1" class="menu-inactive" role="menuitem">No public lists</a></li>
+ [% END %]
+ <li class="divider" role="presentation"></li>
+ [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
+ <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=1" tabindex="-1" role="menuitem"><strong>Your lists</strong></a></li>
+ [% IF loggedinusername %]
+ [% IF some_private_shelves.count %]
+ [% SET number_of_private_shelves = 0 %]
+ [% FOREACH s IN some_private_shelves %]
+ <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% s.shelfnumber %]&sortfield=[% s.sortfield %]" tabindex="-1" role="menuitem">[% s.shelfname |html %]</a></li>
+ [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
+ [% IF number_of_private_shelves >= 10 %][% LAST %][% END %]
+ [% END %]
+ [% IF some_private_shelves > 10 %]
+ <li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&category=1" tabindex="-1" role="menuitem" class="listmenulink">View All</a></li>