~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/doc/batch-navigation.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-15 10:35:32 UTC
  • mfrom: (14517.1.3 new-bzr)
  • Revision ID: launchpad@pqm.canonical.com-20111215103532-q2m4uyk0r8ugiayx
[r=sinzui, poolie][bug=509016] Always load foreign plugins,
 but restrict probers to avoid accidentally opening foreign branches.
 (re-land)

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
The batch navigator tells us whether multiple pages will be used.
54
54
 
55
 
    >>> from lp.services.identity.model.emailaddress import EmailAddress
 
55
    >>> from canonical.launchpad.database.emailaddress import EmailAddress
56
56
    >>> select_results = EmailAddress.select(orderBy='id')
57
57
    >>> batch_nav = BatchNavigator(select_results, build_request(), size=50)
58
58
    >>> batch_nav.has_multiple_pages
110
110
    u''
111
111
 
112
112
When there is a current batch, but there are no previous or next
113
 
batches, both the upper and lower navigation links view will render.
 
113
batches, only the upper navigation links view will render.
114
114
 
115
115
    >>> navigator = BatchNavigator(reindeer, request=request)
116
116
    >>> upper_view = getMultiAdapter(
125
125
 
126
126
    >>> lower_view = getMultiAdapter(
127
127
    ...     (navigator, request), name='+navigation-links-lower')
128
 
    >>> print lower_view.render()
129
 
    <table...
130
 
    ...<strong>1</strong>...&rarr;...<strong>9</strong>...of 9 results...
131
 
    ...<span class="first inactive">...First...
132
 
    ...<span class="previous inactive">...Previous...
133
 
    ...<span class="next inactive">...Next...
134
 
    ...<span class="last inactive">...Last...
 
128
    >>> lower_view.render()
 
129
    u''