# HG changeset patch # User cavaliet # Date 1346325185 -7200 # Node ID 292b15799db26dcc3ae2ec7830024f2f41be0483 # Parent e450dff4134fa9a0b1da74d98cc52bceadbf0a47 quick search in media title in the front. Languages updated. diff -r e450dff4134f -r 292b15799db2 src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html --- a/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Tue Aug 28 18:45:42 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Thu Aug 30 13:13:05 2012 +0200 @@ -45,16 +45,21 @@

{% trans 'All categories' %}
+ 
{% trans 'Filter the medias' %}
{% trans 'All categories of medias' %} : {% for t in tag_cloud %} {{t.name}}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endif %} @@ -63,7 +68,7 @@{% if results.has_previous %} - {% trans "previous" %} + {% trans "previous" %} {% endif %} {% if results.paginator.num_pages > 1 %} @@ -72,7 +77,7 @@ {% if i|add:'1' == results.number %} {{i|add:'1'}} {% else %} - {{i|add:'1'}} + {{i|add:'1'}} {% endif %} {% if i|add:'1' < results.paginator.num_pages and 1 < results.paginator.num_pages %} {% endif %} @@ -81,10 +86,10 @@ {% endif %} {% if results.has_next %} - {% trans "next" %} + {% trans "next" %} {% endif %} {% if results.paginator.num_pages > 1 %} - . ({% trans 'All' %}) + . ({% trans 'All' %}) {% endif %}

{% trans 'All categories' %}
+ {% trans 'All medias' %} 
{% trans 'Filter the medias' %}
{% trans 'All categories of medias' %} : {% for t in tag_cloud %} {{t.name}}{% if not forloop.last %}, {% endif %}{% endfor %}
{% endif %} diff -r e450dff4134f -r 292b15799db2 src/ldt/ldt/ldt_utils/views/front.py --- a/src/ldt/ldt/ldt_utils/views/front.py Tue Aug 28 18:45:42 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/views/front.py Thu Aug 30 13:13:05 2012 +0200 @@ -57,13 +57,20 @@ def all_contents(request): # Get the page number parameter if possible page = request.GET.get("page") or 1 - # Get the tag parameter if possible - tag_label = request.GET.get("tag") - # Get all the public contents group - if tag_label is None : - content_list = Content.objects.all() + # Get the medias title filter if possible + media_title = request.GET.get("title") + tag_label = None + if media_title is None : + # Get the tag parameter if possible + tag_label = request.GET.get("tag") + # Get all the public contents group + if tag_label is None : + content_list = Content.objects.all() + else : + content_list = TaggedItem.objects.get_by_model(Content.objects.all(), '"'+tag_label+'"') else : - content_list = TaggedItem.objects.get_by_model(Content.objects.all(), '"'+tag_label+'"') + content_list = Content.objects.filter(title__icontains=media_title) + nb = settings.LDT_FRONT_MEDIA_PER_PAGE if page=="x": @@ -83,7 +90,7 @@ is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1); return render_to_response("front/front_all_contents.html", - {'results':results, 'tag_label':tag_label, 'front_tags':front_tags, 'tag_cloud':tag_cloud, + {'results':results, 'tag_label':tag_label, 'media_title':media_title, 'front_tags':front_tags, 'tag_cloud':tag_cloud, 'is_gecko': is_gecko}, context_instance=RequestContext(request)) diff -r e450dff4134f -r 292b15799db2 src/ldt/ldt/locale/en/LC_MESSAGES/django.mo Binary file src/ldt/ldt/locale/en/LC_MESSAGES/django.mo has changed diff -r e450dff4134f -r 292b15799db2 src/ldt/ldt/locale/en/LC_MESSAGES/django.po --- a/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Tue Aug 28 18:45:42 2012 +0200 +++ b/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Thu Aug 30 13:13:05 2012 +0200 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-07-18 12:42+0000\n" +"POT-Creation-Date: 2012-08-30 11:07+0000\n" "PO-Revision-Date: 2012-04-29 22:26+0200\n" "Last-Translator: Yves-Marie Haussonne