Implement content footer for new dashboard

Solves #1438

Some things worth mentioning related to changes:
- Pagination was implemented with a separate model and view, to encapsulate the logic related to the pagination details. It only holds the minimum necessary code related to pagination, and thus a context where the pagination is used need to setup the moving parts (e.g. update the pagination model when the related visualization collection changes).
- Router's UrlsModel is merged with its inline model, since it suffered of [feature envy](https://en.wikipedia.org/wiki/Code_smell). Now the code related to URL state is encapsulated in one place, where the URL construction is a kind of serialization of its internal state. Noticeable API changes:

old | new
---- | -----
`router.urls.byContentType()` | `router.model.contentUrl()`
`router.urls.byCurrentState()` | `router.model.url()`
`router.urls.byCurrentstateToTag('baz')` | `router.model.url(search: ':baz')`
`router.urls.byCurrentStateToSearch('foobar')` | `router.model.url(search: 'foobar')`
 | `router.model.toUrl(page: '123')`
There are some new methods too, see the new `new_dashboard/router/model` for all changes.
- The code related to showing _"Show X locked datasets"_ was taken from old code, IMHO, most of it do not belong in the view. It suffers from similar copy-paste issues as the `main_view`, as I [hilighted in an earlier pull-request](https://github.com/CartoDB/cartodb/blob/1438-content-footer/lib/assets/javascripts/cartodb/new_dashboard/main_view.js#L50-L61). But I think we need to discuss and solve this separately (in particular wait for Odyssey.js's model changes to be merged to master I guess).
We should show the number of datasets or maps and not the page position. So
in this case always makes sense to have the info.

6 of 6 tables shown instead Page 1 of 1.

[image: Imágenes integradas 1]

2014-12-23 20:54 GMT+01:00 Nicklas Gummesson <notifications@github.com>:

> In lib/assets/javascripts/cartodb/new_common/pagination/template.jst.ejs
> <https://github.com/CartoDB/cartodb/pull/1584#discussion-diff-22231619>:
>
> > @@ -0,0 +1,12 @@
> > +<span class="DefaultDescription Pagination-label">
> > +  Page <%= m.get('current_page') %> of <%= m.pagesCount() %>
>
> yes we did, but I actually think what you say makes sense. But either way,
> having one or another is as easy as to revert e6c0eef
> <https://github.com/CartoDB/cartodb/commit/e6c0eef4ecfe25831c0badedfe7bd508ed29c6da>.
> @carlostallon <https://github.com/carlostallon> let us know your opinion
> plz [image: :kissing_closed_eyes:]
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/CartoDB/cartodb/pull/1584/files#r22231619>.
>



-- 
Carlos Tallón
Designer