Return-Path: X-Original-To: apmail-allura-commits-archive@www.apache.org Delivered-To: apmail-allura-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 152B317431 for ; Tue, 6 Oct 2015 07:28:59 +0000 (UTC) Received: (qmail 21829 invoked by uid 500); 6 Oct 2015 07:28:53 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 21807 invoked by uid 500); 6 Oct 2015 07:28:53 -0000 Mailing-List: contact commits-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list commits@allura.apache.org Received: (qmail 21782 invoked by uid 99); 6 Oct 2015 07:28:52 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2015 07:28:52 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C67B8E00A7; Tue, 6 Oct 2015 07:28:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: heiths@apache.org To: commits@allura.apache.org Date: Tue, 06 Oct 2015 07:28:53 -0000 Message-Id: <585e1a8dce984e2495f8fc10f44bd87c@git.apache.org> In-Reply-To: <7813ec7eba8a486297f029158ffe3979@git.apache.org> References: <7813ec7eba8a486297f029158ffe3979@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/13] allura git commit: [#7919] Refactor _nav endpoint to use json_nav on the project model [#7919] Refactor _nav endpoint to use json_nav on the project model Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/edcb1159 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/edcb1159 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/edcb1159 Branch: refs/heads/hs/7919 Commit: edcb115946038f8e8de3e8fb281aed66da7a1e00 Parents: 15983cb Author: Heith Seewald Authored: Tue Oct 6 03:01:25 2015 -0400 Committer: Heith Seewald Committed: Tue Oct 6 03:01:25 2015 -0400 ---------------------------------------------------------------------- Allura/allura/controllers/project.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/edcb1159/Allura/allura/controllers/project.py ---------------------------------------------------------------------- diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py index 20d9f63..869d326 100644 --- a/Allura/allura/controllers/project.py +++ b/Allura/allura/controllers/project.py @@ -380,16 +380,8 @@ class ProjectController(FeedController): self._list = ToolListController() @expose('json:') - def _nav(self, **kw): - menu = [] - for s in c.project.grouped_navbar_entries(): - entry = dict(name=s.label, url=s.url, - icon=s.ui_icon, tool_name=s.tool_name) - if s.children: - entry['children'] = [dict(name=child.label, url=child.url, icon=child.ui_icon, tool_name=child.tool_name) - for child in s.children] - menu.append(entry) - return dict(menu=menu) + def _nav(self): + return c.project.json_nav() @expose() def _lookup(self, name, *remainder):