okfn/ckan — pull request #460 by amercader (2013-02-22 18:39:36+00:00)
Title: Support for named routes + dataset types on _make_menu_item

Background: when bulding a nav link for a named url for a dataset type, the returned URL is that of the main dataset type not the custom,eg

When calling this:
```
h.build_nav_icon('harvest_source_edit', _('Edit'), id=source.name, icon='edit')
```
you get this:

http://localhost:5000/dataset/edit/dsadasdasdas

instead of this:

http://localhost:5000/harvest_source/edit/dsadasdasdas

Eventually, `build_nav_icon` goes to `_make_menu_item` which according to the apidocs:

```
:param menu_item: the name of the defined menu item defined in
config/routing as the named route of the same name
```

So it would make sense that it called `nav_named_link` instead of `nav_link` (see PR)

(aside: it seems to me that the whole bunch of helper functions for creating links are a bit confusing and could be much simplified, but that may be another issue)