# HG changeset patch # User verrierj # Date 1319018229 -7200 # Node ID 49c9890dce4a88a9daad7f813b7edcaab0746b71 # Parent a38c4759ce8afbe7882656a9171b35d8da902faf Fixed bug when displaying annotations from iri files in search results + thread in indexation diff -r a38c4759ce8a -r 49c9890dce4a src/ldt/ldt/indexation/__init__.py --- a/src/ldt/ldt/indexation/__init__.py Thu Oct 13 10:43:00 2011 +0200 +++ b/src/ldt/ldt/indexation/__init__.py Wed Oct 19 11:57:09 2011 +0200 @@ -43,14 +43,12 @@ return hits.scoreDocs def highlight_documents(doc_list, query, field): + searcher = get_searcher() analyzer = lucene.FrenchAnalyzer(lucene.Version.LUCENE_CURRENT) - searcher = get_searcher() formatter = lucene.SimpleHTMLFormatter('', '') query = get_query_parser(field).parse(query) highlighter = lucene.Highlighter(formatter, lucene.QueryScorer (query)) - import logging - for project in doc_list: for segment in project['list']: lucene_doc = searcher.doc(segment['lucene_id']) @@ -65,9 +63,7 @@ if segment['title'] == u'': segment['title'] = lucene_doc.getField('title').stringValue() - segment['tags'] = tags[tags.find(';')+1:] - - + segment['tags'] = tags[tags.find(';')+1:] return doc_list diff -r a38c4759ce8a -r 49c9890dce4a src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Thu Oct 13 10:43:00 2011 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/partial/publishedprojectslist.html Wed Oct 19 11:57:09 2011 +0200 @@ -8,6 +8,11 @@ {% for project in projects %} {% url ldt.ldt_utils.views.project_json_id project.ldt_id as json_url_id %} + {% if is_gecko %} +
{% trans 'open ldt' %}
+ {% else %} +
{% trans 'open ldt' %}
+ {% endif %}
{% trans 'copy the project' %}
{% trans 'link json by id' %}
diff -r a38c4759ce8a -r 49c9890dce4a src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html --- a/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html Thu Oct 13 10:43:00 2011 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/ldt/ldt_utils/search_results.html Wed Oct 19 11:57:09 2011 +0200 @@ -73,7 +73,7 @@ {% endifnotequal %}