Kilte/pagination — pull request #1 by miniche (2014-06-13 16:13:42+00:00)
Title: Improved pages array to include relative positions

This pull requests is a proposal to add relative positions in the page array.
It makes graphical components easier to build, like in Twig views.

The relative positions are:
* **first**: Unique, the first page
* **less**: Unique, was previously "..."
* **previous**: One or more, all previous pages in the neighbours
* **current**: Unique, the current page
* **next**: One or more, all next pages in the neighbours
* **more**: Unique, was previously "..."
* **last**: Unique, the latest page

The new generated array is:
```php
array(
1 => 'first',
5 => 'less',
6 => 'previous',
7 => 'previous',
8 => 'previous',
9 => 'previous',
10 => 'current',
11 => 'next',
12 => 'next',
13 => 'next',
14 => 'next',
15 => 'more',
20 => 'last'
)
```

Thus, we can build graphical components in Twig very easily, like this one:
```

{% for number, position in pages %}
{% if position == 'first' %}

«

{% elseif position == 'previous' or position == 'next' %}

{{ number }}

{% elseif position == 'current' %}

{{ number }}

{% elseif position == 'last' %}

»

{% endif %}
{% endfor %}

```

The ```README``` and tests have been updated.

Any comment or suggestion are welcome, alright :wink: