forked from BabDev/Pagerfanta
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from whiteoctober/doc-tweaks
Various tweaks to the README
- Loading branch information
Showing
2 changed files
with
15 additions
and
24 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
[![Build Status](https://travis-ci.org/whiteoctober/Pagerfanta.png?branch=master)](https://travis-ci.org/whiteoctober/Pagerfanta) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/whiteoctober/Pagerfanta/badges/quality-score.png?s=1ee480491644c07812b5206cf07d33a5035d0118)](https://scrutinizer-ci.com/g/whiteoctober/Pagerfanta/) [![Code Coverage](https://scrutinizer-ci.com/g/whiteoctober/Pagerfanta/badges/coverage.png?s=284be0616a9ba0439ee1123bcaf5fb3f6bfb0e50)](https://scrutinizer-ci.com/g/whiteoctober/Pagerfanta/) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/9e710230-b088-4904-baef-5f5e2d62e681/mini.png)](https://insight.sensiolabs.com/projects/9e710230-b088-4904-baef-5f5e2d62e681) [![Latest Stable Version](https://poser.pugx.org/pagerfanta/pagerfanta/v/stable.png)](https://packagist.org/packages/pagerfanta/pagerfanta) [![Total Downloads](https://poser.pugx.org/pagerfanta/pagerfanta/downloads.png)](https://packagist.org/packages/pagerfanta/pagerfanta) | ||
|
||
Pagination for PHP 5.3 | ||
Pagination for PHP >= 5.3 | ||
|
||
## Usage | ||
|
||
|
@@ -26,7 +26,7 @@ $currentPageResults = $pagerfanta->getCurrentPageResults(); | |
|
||
$pagerfanta->getNbPages(); | ||
|
||
$pagerfanta->haveToPaginate(); // whether the number of results if higher than the max per page | ||
$pagerfanta->haveToPaginate(); // whether the number of results is higher than the max per page | ||
|
||
$pagerfanta->hasPreviousPage(); | ||
$pagerfanta->getPreviousPage(); | ||
|
@@ -336,8 +336,8 @@ $adapter = new FixedAdapter($nbResults, $results); | |
## Views | ||
|
||
Views are to render pagerfantas, this way you can reuse your | ||
pagerfantas' html in several projects, share them and use another | ||
ones from another developers. | ||
pagerfantas' HTML in several projects, share them and use another | ||
ones from another developer's. | ||
|
||
The views implement the `Pagerfanta\View\ViewInterface` interface, | ||
which has two methods: | ||
|
@@ -374,11 +374,10 @@ $routeGenerator = function($page) { | |
return '/path?page='.$page; | ||
} | ||
``` | ||
|
||
Pagerfanta comes with four views, the default one, one for | ||
Pagerfanta comes with five views: The default one, two for | ||
[Twitter Bootstrap](https://github.com/twitter/bootstrap), one for | ||
[Semantic UI](https://github.com/Semantic-Org/Semantic-UI) and | ||
an special optionable view. | ||
a special optionable view. | ||
|
||
### DefaultView | ||
|
||
|
@@ -407,8 +406,6 @@ Options (default): | |
* page_template (<a href="%href%">%text%</a>) | ||
* span_template (<span class="%class%">%text%</span>) | ||
|
||
![Pagerfanta DefaultView](http://img813.imageshack.us/img813/601/pagerfanta.png) | ||
|
||
CSS: | ||
|
||
```css | ||
|
@@ -468,11 +465,13 @@ COLORS: | |
} | ||
``` | ||
|
||
### TwitterBootstrapView | ||
### TwitterBootstrapView and TwitterBootstrap3View | ||
|
||
This view generates a pagination for | ||
These views generate paginators designed for use with | ||
[Twitter Bootstrap](https://github.com/twitter/bootstrap). | ||
|
||
`TwitterBootstrapView` is for Bootstrap 2; `TwitterBootstrap3View` is for Bootstrap 3. | ||
|
||
```php | ||
<?php | ||
|
||
|
@@ -555,20 +554,12 @@ $pagerfantaHtml = $myView2->render($pagerfanta, $routeGenerator); | |
$pagerfantaHtml = $myView2->render($pagerfanta, $routeGenerator, array('next_message' => 'Siguiente!!')); | ||
``` | ||
|
||
## Todo | ||
|
||
## Author | ||
|
||
Pablo Díez - <[email protected]> | ||
|
||
## License | ||
|
||
Pagerfanta is licensed under the MIT License. See the LICENSE file for full details. | ||
## Acknowledgements | ||
|
||
## Sponsors | ||
Pagerfanta is inspired by [Zend Paginator](https://github.com/zendframework/zf2). | ||
|
||
[WhiteOctober](http://www.whiteoctober.co.uk/) | ||
Thanks also to Pablo Díez ([email protected]) for most of the work on the first versions of Pagerfanta. | ||
|
||
## Acknowledgements | ||
## Licence | ||
|
||
Pagerfanta is inspired by [Zend Paginator](https://github.com/zendframework/zf2). | ||
Pagerfanta is licensed under the [MIT License](LICENCE). |