You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2022/09/23 14:42:39 UTC

[allura] 01/02: [#8464] add noindex, follow header for list tools

This is an automated email from the ASF dual-hosted git repository.

dill0wn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 6b1caae18b5c25134242d6fad6d20869d95c1078
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Wed Sep 14 13:45:41 2022 -0600

    [#8464] add noindex, follow header for list tools
---
 Allura/allura/controllers/project.py   | 4 +++-
 Allura/allura/templates/tool_list.html | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index d8606f6cf..e78d29e03 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -322,12 +322,14 @@ class ToolListController:
         total_entries = len(entries)
         limit, page = h.paging_sanitizer(limit, page, total_entries)
         start = page * limit
+        tool_label = g.entry_points['tool'][tool_name].tool_label if entries else None
         return dict(
             page=page,
             limit=limit,
             total_entries=total_entries,
             entries=entries[start:start + limit],
-            type=g.entry_points['tool'][tool_name].tool_label if entries else None,
+            type=tool_label,
+            tool_name=tool_label,
             )
 
 
diff --git a/Allura/allura/templates/tool_list.html b/Allura/allura/templates/tool_list.html
index e3f2f4486..499c532af 100644
--- a/Allura/allura/templates/tool_list.html
+++ b/Allura/allura/templates/tool_list.html
@@ -18,6 +18,9 @@
 -#}
 {% set hide_left_bar = True %}
 {% extends g.theme.master %}
+{% block head %}
+    <meta name="robots" content="noindex, follow">
+{% endblock %}
 
 {% block title %}{{c.project.name}} / {{type}} tools{% endblock %}