allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [24/40] git commit: [#2835] support old title_s in results, so reindexing is not required
Date Mon, 01 Apr 2013 14:27:43 GMT
[#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/cj/5963
Commit: aced859b5141eaab9560998b1b2d6c581011df58
Parents: f211493
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Tue Mar 26 20:57:21 2013 +0000
Committer: Dave Brondsema <dbrondsema@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 }}


Mime
View raw message