diff --git a/ckan/lib/helpers.py b/ckan/lib/helpers.py index f8768cd760d..ab233f9b79f 100644 --- a/ckan/lib/helpers.py +++ b/ckan/lib/helpers.py @@ -345,3 +345,10 @@ def resource_link(resource_dict, package_id): resource_id=resource_dict['id']) return link_to(text, url) +def tag_link(tag): + url = url_for(controller='tag', action='read', id=tag['name']) + return link_to(tag['name'], url) + +def group_link(group): + url = url_for(controller='group', action='read', id=group['name']) + return link_to(group['name'], url) diff --git a/ckan/templates/_util.html b/ckan/templates/_util.html index 2d517727200..1c6e7d7bf4e 100644 --- a/ckan/templates/_util.html +++ b/ckan/templates/_util.html @@ -451,4 +451,23 @@ +