Update front tag list management with settings/config.
--- a/.settings/org.eclipse.core.resources.prefs Tue Jan 24 16:03:14 2012 +0100
+++ b/.settings/org.eclipse.core.resources.prefs Wed Jan 25 12:31:55 2012 +0100
@@ -1,19 +1,21 @@
-#Tue Jan 10 14:25:22 CET 2012
-eclipse.preferences.version=1
-encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8
-encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8
-encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8
-encoding//src/ldt/ldt/user/migrations/0002_auto__del_irigroup.py=utf-8
-encoding//src/ldt/ldt/user/migrations/0004_fill_language.py=utf-8
-encoding//src/ldt/ldt/user/migrations/0005_add_permission_owner_group.py=utf-8
-encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8
+#Wed Jan 25 12:23:22 CET 2012
+eclipse.preferences.version=1
+encoding//src/ldt/ldt/core/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/core/migrations/0002_auto__del_owner.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0002_auto__add_field_media_mimetype_field__chg_field_media_external_src_url.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0003_auto__chg_field_project_owner.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0004_auto__add_field_project_description.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0005_add_permissions.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0007_auto__add_field_content_image__del_field_media_image.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0009_auto__chg_field_content_image__chg_field_project_image.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0010_auto__add_annotationstat.py=utf-8
+encoding//src/ldt/ldt/ldt_utils/migrations/0011_gen_stat_annotation.py=utf-8
+encoding//src/ldt/ldt/text/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/user/migrations/0001_initial.py=utf-8
+encoding//src/ldt/ldt/user/migrations/0002_auto__del_irigroup.py=utf-8
+encoding//src/ldt/ldt/user/migrations/0004_fill_language.py=utf-8
+encoding//src/ldt/ldt/user/migrations/0005_add_permission_owner_group.py=utf-8
+encoding//virtualenv/web/env/guardianenv/Lib/site-packages/guardian/migrations/0001_initial.py=utf-8
+encoding//web/ldtplatform/config.py=utf-8
+encoding//web/ldtplatform/settings.py=utf-8
--- a/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Tue Jan 24 16:03:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_all_contents.html Wed Jan 25 12:31:55 2012 +0100
@@ -63,7 +63,7 @@
{% block body %}
{{block.super}}
<!-- Last annotated contents -->
-{% if tag_cloud|length > 0 %}<p class="tag_link">{% trans 'Filter the medias' %} : {% for t in tag_cloud|slice:":5" %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}?tag={{t.name}}">{{t.name}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
+{% if front_tags|length > 0 %}<p class="tag_link">{% trans 'Filter the medias' %} : {% for t in front_tags %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}?tag={{t}}">{{t}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
<ul class="floatlist full_width" id="derniers_medias">
<li class="li_h2">
{% if tag_label %}<h2><a href="{% url ldt.ldt_utils.views.front.all_contents %}">{% trans 'All medias' %}</a>{% if tag_label %}<span class="pink"> > {{tag_label}}</span>{% endif %}</h2>
--- a/src/ldt/ldt/ldt_utils/templates/front/front_home.html Tue Jan 24 16:03:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/templates/front/front_home.html Wed Jan 25 12:31:55 2012 +0100
@@ -14,7 +14,7 @@
{% block body %}
{{block.super}}
<!-- Last annotated contents -->
-{% if tag_cloud|length > 0 %}<p class="tag_link">{% trans 'Filter the medias' %} : {% for t in tag_cloud %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}?tag={{t.name}}">{{t.name}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
+{% if front_tags|length > 0 %}<p class="tag_link">{% trans 'Filter the medias' %} : {% for t in front_tags %}<a href="{% url ldt.ldt_utils.views.front.all_contents %}?tag={{t}}">{{t}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>{% endif %}
<ul class="floatlist full_width" id="derniers_medias">
<li class="li_h2">
<ul class="title_ul">
--- a/src/ldt/ldt/ldt_utils/views/front.py Tue Jan 24 16:03:14 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/views/front.py Wed Jan 25 12:31:55 2012 +0100
@@ -21,12 +21,13 @@
# Get the active groups
active_groups = Group.objects.exclude(name=settings.PUBLIC_GROUP_NAME)[:5]
# Get the main tag list
- tag_cloud = get_content_tags(5)
+ front_tags = settings.FRONT_TAG_LIST
+
is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
return render_to_response("front/front_home.html",
- {'last_contents': last_contents, 'most_contents':most_contents, 'active_groups':active_groups, 'tag_cloud':tag_cloud,
+ {'last_contents': last_contents, 'most_contents':most_contents, 'active_groups':active_groups, 'front_tags':front_tags,
'is_gecko': is_gecko},
context_instance=RequestContext(request))
@@ -59,12 +60,14 @@
else :
content_list = TaggedItem.objects.get_by_model(add_change_attr(request.user, Content.safe_objects.all()), '"'+tag_label+'"')
# Get the main tag list
+ front_tags = settings.FRONT_TAG_LIST
+ # Get the all tags list
tag_cloud = get_content_tags()
is_gecko = ((request.META['HTTP_USER_AGENT'].lower().find("firefox")) > -1);
return render_to_response("front/front_all_contents.html",
- {'content_list':content_list, 'tag_label':tag_label, 'tag_cloud':tag_cloud,
+ {'content_list':content_list, 'tag_label':tag_label, 'front_tags':front_tags, 'tag_cloud':tag_cloud,
'is_gecko': is_gecko},
context_instance=RequestContext(request))
--- a/web/ldtplatform/config.py.tmpl Tue Jan 24 16:03:14 2012 +0100
+++ b/web/ldtplatform/config.py.tmpl Wed Jan 25 12:31:55 2012 +0100
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
import os, logging
SITE_ID = 1
@@ -98,4 +99,6 @@
DEFAULT_PROJECT_ICON = "thumbnails/projects/project_default_icon.png"
DEFAULT_USER_ICON = "thumbnails/users/user_default_icon.png"
DEFAULT_GROUP_ICON = "thumbnails/groups/group_default_icon.png"
-PROFILE_IMG_MAX_SIZE = 1000000
\ No newline at end of file
+PROFILE_IMG_MAX_SIZE = 1000000
+
+FRONT_TAG_LIST = [u"Enmi 2011", u"film", u"conférence"]
--- a/web/ldtplatform/settings.py Tue Jan 24 16:03:14 2012 +0100
+++ b/web/ldtplatform/settings.py Wed Jan 25 12:31:55 2012 +0100
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
#@PydevCodeAnalysisIgnore
import os.path
import ldtplatform
@@ -215,6 +216,8 @@
DIVISIONS_FOR_STAT_ANNOTATION = 64
+FRONT_TAG_LIST = [u"Enmi 2011",u"film"]
+
from config import *
if not "LOGIN_URL" in locals():