Skip to content

Commit

Permalink
[#2939] Template helper function organizations_available added
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Sep 28, 2012
1 parent 08b39a7 commit 8b4891d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ckan/lib/helpers.py
Expand Up @@ -1218,6 +1218,13 @@ def groups_available():
data_dict = {'available_only': True}
return logic.get_action('group_list_authz')(context, data_dict)

def organizations_available():
''' return a list of available groups '''
import ckan.logic as logic
context = {'model': model, 'session': model.Session,
'user': c.user}
return logic.get_action('organization_list_for_user')(context, {})

def dashboard_activity_stream(user_id):
'''Return the dashboard activity stream of the given user.
Expand Down Expand Up @@ -1378,6 +1385,7 @@ def format_resource_items(items):
'remove_url_param',
'add_url_param',
'groups_available',
'organizations_available',
'dashboard_activity_stream',
'escape_js',
'get_pkg_dict_extra',
Expand Down

0 comments on commit 8b4891d

Please sign in to comment.