You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2014/07/01 23:07:44 UTC
git commit: [#6019] Show current user first in ProjectUserCombo box
Repository: allura
Updated Branches:
refs/heads/master 8f51a1889 -> 22c610888
[#6019] Show current user first in ProjectUserCombo box
Signed-off-by: Tim Van Steenburgh <tv...@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 <tv...@gmail.com>
Authored: Sat Jun 28 20:19:10 2014 -0400
Committer: Dave Brondsema <db...@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