diff --git a/pfwb_thesaurus/templates/thesaurus/plone_popup.html b/pfwb_thesaurus/templates/thesaurus/plone_popup.html index 84b4a5b..5676a61 100644 --- a/pfwb_thesaurus/templates/thesaurus/plone_popup.html +++ b/pfwb_thesaurus/templates/thesaurus/plone_popup.html @@ -4,10 +4,11 @@ diff --git a/pfwb_thesaurus/templates/thesaurus/term_list.html b/pfwb_thesaurus/templates/thesaurus/term_list.html index b9077db..004a300 100644 --- a/pfwb_thesaurus/templates/thesaurus/term_list.html +++ b/pfwb_thesaurus/templates/thesaurus/term_list.html @@ -1,6 +1,12 @@ {% extends "base.html" %} {% block content %} + +

Points d'entrée

diff --git a/pfwb_thesaurus/views.py b/pfwb_thesaurus/views.py index 318e248..d6c3592 100644 --- a/pfwb_thesaurus/views.py +++ b/pfwb_thesaurus/views.py @@ -17,6 +17,7 @@ import json from django.conf import settings +from django.core.urlresolvers import reverse from django.http import HttpResponse from django.views.generic import DetailView, ListView @@ -54,8 +55,8 @@ def term_search_json(request): sqs.load_all() result = [] - for item in sqs: - result.append({'title': item.term, 'id': item.id}) + for item in sqs[:15]: + result.append({'title': item.term, 'url': reverse('term', kwargs={'pk': item.pk}), 'id': item.pk}) response = HttpResponse(content_type='application/json') json.dump({'data': result}, response, indent=2)