Skip to content

Commit

Permalink
Merge pull request #224 from whiteoctober/doc-tweaks
Browse files Browse the repository at this point in the history
Various tweaks to the README
  • Loading branch information
Sam Partington authored Feb 14, 2017
2 parents f846c5e + 6fce52c commit 3af44a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 24 deletions.
File renamed without changes.
39 changes: 15 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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();
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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).

0 comments on commit 3af44a4

Please sign in to comment.