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 22B7F10C41 for ; Tue, 25 Mar 2014 14:28:23 +0000 (UTC) Received: (qmail 17454 invoked by uid 500); 25 Mar 2014 14:28:11 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 17374 invoked by uid 500); 25 Mar 2014 14:28:08 -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 14489 invoked by uid 99); 25 Mar 2014 14:27:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Mar 2014 14:27:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8C7B1919062; Tue, 25 Mar 2014 14:27:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brondsem@apache.org To: commits@allura.apache.org Date: Tue, 25 Mar 2014 14:27:33 -0000 Message-Id: In-Reply-To: <7777c153948d4520927e6122008a22bd@git.apache.org> References: <7777c153948d4520927e6122008a22bd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [35/50] git commit: [#7051] Add new sitemap options [#7051] Add new sitemap options So we can get a sitemap for only a specific tool type. Signed-off-by: Tim Van Steenburgh Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/75393c37 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/75393c37 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/75393c37 Branch: refs/heads/db/5995 Commit: 75393c37cd5f41b431699f2df2e83485b3475f5b Parents: e08764b Author: Tim Van Steenburgh Authored: Wed Mar 12 22:28:33 2014 +0000 Committer: Tim Van Steenburgh Committed: Tue Mar 18 16:31:07 2014 +0000 ---------------------------------------------------------------------- Allura/allura/controllers/project.py | 6 +-- .../ext/admin/templates/project_tools.html | 7 ++- Allura/allura/model/project.py | 53 +++++++++++++------- 3 files changed, 45 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/75393c37/Allura/allura/controllers/project.py ---------------------------------------------------------------------- diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py index aedae62..c22eb14 100644 --- a/Allura/allura/controllers/project.py +++ b/Allura/allura/controllers/project.py @@ -316,10 +316,10 @@ class ToolListController(object): @expose('jinja:allura:templates/tool_list.html') def _default(self, tool_name, page=0, limit=200, **kw): - tool_name = tool_name.lower() - entries = [e for e in c.project.sitemap(per_tool_limit=None) - if e.tool_name and e.tool_name.lower() == tool_name] c.page_list = W.page_list + tool_name = tool_name.lower() + entries = c.project.sitemap(included_tools=[tool_name], + tools_only=True, per_tool_limit=None) total_entries = len(entries) limit, page = h.paging_sanitizer(limit, page, total_entries) start = page * limit http://git-wip-us.apache.org/repos/asf/allura/blob/75393c37/Allura/allura/ext/admin/templates/project_tools.html ---------------------------------------------------------------------- diff --git a/Allura/allura/ext/admin/templates/project_tools.html b/Allura/allura/ext/admin/templates/project_tools.html index af777b0..60b4d89 100644 --- a/Allura/allura/ext/admin/templates/project_tools.html +++ b/Allura/allura/ext/admin/templates/project_tools.html @@ -77,6 +77,9 @@ {{c.install_modal.display(content='

Install Tool

')}} +
+ {{c.page_list.display(page=page, limit=limit, count=total_mounts)}} +

Installed tools

Sortable - define top menu order by moving tools with your mouse. @@ -142,7 +145,9 @@ {% endfor %} -{{c.page_list.display(page=page, limit=limit, count=total_mounts)}} +

+ {{c.page_list.display(page=page, limit=limit, count=total_mounts)}} +