You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/03/22 23:54:38 UTC

[11/21] git commit: [#4299] ticket:281 Make widget work for neighborhood-level trackers

[#4299] ticket:281 Make widget work for neighborhood-level trackers


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4ae56190
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4ae56190
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4ae56190

Branch: refs/heads/master
Commit: 4ae561901f3a60feb002e6f3e4b1844f133e7425
Parents: 6c4eaa6
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Mar 5 09:45:06 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Mar 22 21:55:16 2013 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/project.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4ae56190/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index 4dca148..ebeba77 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -217,6 +217,17 @@ class NeighborhoodController(object):
             raise exc.HTTPNotFound
         return icon.serve()
 
+    @expose('json:')
+    def users(self):
+        p = self.neighborhood.neighborhood_project
+        return {
+            'options': [{
+                'value': u.username,
+                'label': '%s (%s)' % (u.display_name, u.username)
+            } for u in p.users()]
+        }
+
+
 class NeighborhoodProjectBrowseController(ProjectBrowseController):
     def __init__(self, neighborhood=None, category_name=None, parent_category=None):
         self.neighborhood = neighborhood