silverstripe-framework/templates/Includes/CollectionController_Results.ss
Ingo Schommer 711de868c9 BUGFIX Enabled Link() methods for RecordController and CollectionController, and adjusted url handling to ModelAdmin counterparts to avoid linkage handling problems
BUGFIX Requiring a parentController for RecordController
ENHANCEMENT Custom getViewer() methods to use Page main templates if CollectionController is nested in a ContentController

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63681 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-06 19:29:04 +00:00

36 lines
880 B
Scheme

<% if Results %>
<h3><% _t('RESULTS','Results') %></h3>
<ul class="records">
<% control Results %>
<li>
<% if Top.canDetailView %>
<a href="{$Top.Link}/$ID/view">$Title</a>
<% else %>
$Title
<% end_if %>
</li>
<% end_control %>
</ul>
<% else %>
<p class="message"><% _t('NORESULTSFOUND','No records found') %></p>
<% end_if %>
<% if Results.MoreThanOnePage %>
<div id="PageNumbers">
<% if Results.NotFirstPage %>
<a class="prev" href="$Results.PrevLink"><% _t('PREV','Prev') %></a>
<% end_if %>
<span>
<% control Results.Pages %>
<% if CurrentBool %>
$PageNum
<% else %>
<a href="$Link">$PageNum</a>
<% end_if %>
<% end_control %>
</span>
<% if Results.NotLastPage %>
<a class="next" href="$Results.NextLink"><% _t('NEXT','Next') %></a>
<% end_if %>
</div>
<% end_if %>