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

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

commit 8694800c3c8ccfda6b1eb060683a110b3cb84232
Author: Dave Brondsema <[email protected]>
AuthorDate: Thu May 20 11:51:24 2021 -0400

    [#8388] tidy up per-tool details on ticket search_help; mark as 
nofollow/noindex so not duplicate content for search engines
---
 .../forgetracker/templates/tracker/bin.html         |  2 ++
 .../forgetracker/templates/tracker/search.html      |  1 +
 .../forgetracker/templates/tracker/search_help.html | 21 ++++++++-------------
 ForgeTracker/forgetracker/tracker_main.py           |  4 +++-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/ForgeTracker/forgetracker/templates/tracker/bin.html 
b/ForgeTracker/forgetracker/templates/tracker/bin.html
index d919ee6..b3838d1 100644
--- a/ForgeTracker/forgetracker/templates/tracker/bin.html
+++ b/ForgeTracker/forgetracker/templates/tracker/bin.html
@@ -55,6 +55,7 @@
                       show_title=True,
                       target='_blank',
                       href=tg.url(app.url + 'search_help/'),
+                      rel='nofollow',
                       extra_css='btn search_help_modal') }}
                 {% if bin.error %}<br/><span 
style="color:red">{{bin.error}}</span>{% endif %}
             </td>
@@ -80,6 +81,7 @@
                   show_title=True,
                   target='_blank',
                   href=tg.url(app.url + 'search_help/'),
+                  rel='nofollow',
                   extra_css='btn search_help_modal') }}
             {% if new_bin and new_bin.error %}<br/><span class="err" 
style="color:red">{{new_bin.error}}</span>{% endif %}
           </td>
diff --git a/ForgeTracker/forgetracker/templates/tracker/search.html 
b/ForgeTracker/forgetracker/templates/tracker/search.html
index 823773b..8e34d31 100644
--- a/ForgeTracker/forgetracker/templates/tracker/search.html
+++ b/ForgeTracker/forgetracker/templates/tracker/search.html
@@ -82,6 +82,7 @@
     show_title=True,
     target='_blank',
     href=tg.url(c.app.url + 'search_help/'),
+    rel='nofollow',
     extra_css='btn search_help_modal') }}
 
 </div>
diff --git a/ForgeTracker/forgetracker/templates/tracker/search_help.html 
b/ForgeTracker/forgetracker/templates/tracker/search_help.html
index 9b0c6a6..571de1f 100644
--- a/ForgeTracker/forgetracker/templates/tracker/search_help.html
+++ b/ForgeTracker/forgetracker/templates/tracker/search_help.html
@@ -22,8 +22,7 @@
 {% do g.register_app_css('css/tracker.css') %}
 
 {% block head %}
-  <link rel="alternate" type="application/rss+xml" title="RSS" 
href="feed.rss"/>
-  <link rel="alternate" type="application/atom+xml" title="Atom" 
href="feed.atom"/>
+  <meta name="robots" content="noindex">
 {% endblock %}
 
 {% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / 
Search help{% endblock %}
@@ -49,13 +48,11 @@
     <li>Votes up/down of the ticket - votes_up/votes_down (if enabled in tool 
options)</li>
     <li>Votes total of the ticket - votes_total</li>
     <li>Imported legacy id - import_id</li>
-    {% if c.app.globals.custom_fields %}
+    {% if custom_fields %}
     <li>Custom fields:
         <ul>
-        {% for field in c.app.globals.custom_fields or [] %}
-            {% if field.name != '_milestone' %}
-                <li>{{field.name}}</li>
-            {% endif %}
+        {% for field in custom_fields %}
+            <li>{{field.name}}</li>
         {% endfor %}
         </ul>
     </li>
@@ -92,18 +89,16 @@
     <li>Title of the ticket - snippet_s</li>
     <li>Private ticket - private_b</li>
     <li>Discussion disabled ticket - discussion_disabled_b</li>
-    {% if c.app.globals.custom_fields %}
+    {% if custom_fields %}
     <li>Custom fields:
         <ul>
-        {% for field in c.app.globals.custom_fields or [] %}
-            {% if field.name != '_milestone' %}
-                <li>{{field.name}}</li>
-            {% endif %}
+        {% for field in custom_fields %}
+            <li>{{field.name}}</li>
         {% endfor %}
         </ul>
     </li>
     {% endif %}
     </ul>
     <p>You can use these properties by appending them to the url (only one 
sort allowed at a time) like this:</p>
-    <div 
class="codehilite"><pre>/p/yourproject/tickets/search/?q=_milestone:1.0&amp;sort=snippet_s+asc</pre></div></div>
+    <div class="codehilite"><pre>{{ h.absurl(c.app.url) 
}}search/?q=_milestone:1.0&amp;sort=snippet_s+asc</pre></div></div>
 {% endblock %}
diff --git a/ForgeTracker/forgetracker/tracker_main.py 
b/ForgeTracker/forgetracker/tracker_main.py
index 71073fa..689c47f 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -889,7 +889,9 @@ class RootController(BaseController, FeedController):
     @expose('jinja:forgetracker:templates/tracker/search_help.html')
     def search_help(self, **kw):
         'Static page with search help'
-        return dict()
+        return dict(
+            custom_fields=[fld for fld in (c.app.globals.custom_fields or []) 
if fld.name != '_milestone'],
+        )
 
     @with_trailing_slash
     @expose('jinja:forgetracker:templates/tracker/new_ticket.html')

Reply via email to