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 2013/03/26 22:02:56 UTC
[22/22] git commit: [#2835] support old title_s in results,
so reindexing is not required
[#2835] support old title_s in results, so reindexing is not required
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/aced859b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/aced859b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/aced859b
Branch: refs/heads/master
Commit: aced859b5141eaab9560998b1b2d6c581011df58
Parents: f211493
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Mar 26 20:57:21 2013 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Tue Mar 26 21:02:17 2013 +0000
----------------------------------------------------------------------
Allura/allura/templates/search_index.html | 4 +++-
.../allura/templates/widgets/search_results.html | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aced859b/Allura/allura/templates/search_index.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/search_index.html b/Allura/allura/templates/search_index.html
index 6fd2107..8452ce8 100644
--- a/Allura/allura/templates/search_index.html
+++ b/Allura/allura/templates/search_index.html
@@ -27,7 +27,9 @@
<ol>
{% for doc in results %}
<li>
- <a href="{{doc['url_s']}}">{{h.get_first(doc, 'title')}}</a>
+ <a href="{{doc['url_s']}}">
+ {{- h.get_first(doc, 'title') or h.get_first(doc, 'title_s') -}} {#- title_s is legacy -#}
+ </a>
{% if doc.get('snippet') %}
<p>{{doc['snippet']|safe}}</p>
{% endif %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/aced859b/Allura/allura/templates/widgets/search_results.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/search_results.html b/Allura/allura/templates/widgets/search_results.html
index d1067cc..b586dec 100644
--- a/Allura/allura/templates/widgets/search_results.html
+++ b/Allura/allura/templates/widgets/search_results.html
@@ -41,7 +41,9 @@
<div class="grid-19">
{# TODO: mark matches in title and snippet #}
<p>
- <a href="{{doc['url_paginated'] or doc['url_s']}}">{{ h.get_first(doc, 'title') }}</a>
+ <a href="{{doc['url_paginated'] or doc['url_s']}}">
+ {{- h.get_first(doc, 'title') or h.get_first(doc, 'title_s') -}} {#- title_s is legacy -#}
+ </a>
{% if doc['type_s'] %}<span class="gray"><sup>{{ '(%s)' % doc['type_s'] }}</sup></span>{% endif %}
<br>
{{ doc.snippet }}