allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#6019] Show current user first in ProjectUserCombo box
Date Tue, 01 Jul 2014 21:07:44 GMT
Repository: allura
Updated Branches:
  refs/heads/master 8f51a1889 -> 22c610888


[#6019] Show current user first in ProjectUserCombo box

Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>


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

Branch: refs/heads/master
Commit: 22c61088857710bba33bcdd4c362a4fa4fb58373
Parents: 8f51a18
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Sat Jun 28 20:19:10 2014 -0400
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Jul 1 21:07:25 2014 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/project.py | 7 ++++++-
 ForgeWiki/forgewiki/wiki_main.py     | 1 -
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/22c61088/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index 6c29cad..2267dcf 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -466,11 +466,16 @@ class ProjectController(FeedController):
 
     @expose('json:')
     def users(self):
+        users = c.project.users()
+        if c.user and c.user in users:
+            users.remove(c.user)
+            users.insert(0, c.user)
+
         return {
             'options': [{
                 'value': u.username,
                 'label': '%s (%s)' % (u.display_name, u.username)
-            } for u in c.project.users()]
+            } for u in users]
         }
 
 

http://git-wip-us.apache.org/repos/asf/allura/blob/22c61088/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 9193ecc..d1e02c2 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -525,7 +525,6 @@ class PageController(BaseController, FeedController):
         else:
             page = self.fake_page()
         c.markdown_editor = W.markdown_editor
-        c.user_select = ffw.ProjectUserSelect()
         c.attachment_add = W.attachment_add
         c.attachment_list = W.attachment_list
         c.label_edit = W.label_edit


Mime
View raw message