# HG changeset patch # User veltr # Date 1346332075 -7200 # Node ID 0b5642a8d6dd50a511672370176540b68a068739 # Parent b059300340aa3d68bcce136236870ee0ca2dfd10# Parent 71f05e757973d8ec1e92022bfb789440bb642644 Merge with 71f05e757973d8ec1e92022bfb789440bb642644 diff -r b059300340aa -r 0b5642a8d6dd src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html --- a/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Thu Aug 30 15:06:57 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Thu Aug 30 15:07:55 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 b059300340aa -r 0b5642a8d6dd src/ldt/ldt/ldt_utils/views/front.py --- a/src/ldt/ldt/ldt_utils/views/front.py Thu Aug 30 15:06:57 2012 +0200 +++ b/src/ldt/ldt/ldt_utils/views/front.py Thu Aug 30 15:07:55 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 b059300340aa -r 0b5642a8d6dd src/ldt/ldt/locale/en/LC_MESSAGES/django.mo Binary file src/ldt/ldt/locale/en/LC_MESSAGES/django.mo has changed diff -r b059300340aa -r 0b5642a8d6dd src/ldt/ldt/locale/en/LC_MESSAGES/django.po --- a/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Thu Aug 30 15:06:57 2012 +0200 +++ b/src/ldt/ldt/locale/en/LC_MESSAGES/django.po Thu Aug 30 15:07:55 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