Skip to content

Commit

Permalink
Merge branch 'hotfix/pjlistclone' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
glibersat committed Oct 31, 2011
2 parents 4cd3bdb + 22c9a32 commit 98c1fa3
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 33 deletions.
42 changes: 22 additions & 20 deletions apps/i4p_base/locale/fr/LC_MESSAGES/django.po
Expand Up @@ -9,8 +9,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-10-27 17:07+0200\n"
"PO-Revision-Date: 2011-10-27 17:22\n"
"Last-Translator: Simon Sarazin <simonsarazin@imaginationforpeople.org>\n"
"PO-Revision-Date: 2011-10-27 17:49\n"
"Last-Translator: Guillaume Libersat <glibersat@sigill.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -1582,87 +1582,89 @@ msgstr "Modifier la demande"

#: templates/pages/contrib.html:32
msgid "A community dedicated to"
msgstr ""
msgstr "Une communauté dédiée à"

#: templates/pages/contrib.html:33
msgid "citizen imagination"
msgstr ""
msgstr "l'imagination citoyenne"

#: templates/pages/contrib.html:44 templates/pages/footer.html:25
msgid "Translator"
msgstr ""
msgstr "Traducteur"

#: templates/pages/contrib.html:46 templates/pages/footer.html:26
msgid "Developer"
msgstr ""
msgstr "Développeur"

#: templates/pages/contrib.html:48 templates/pages/footer.html:27
msgid "Designer"
msgstr ""
msgstr "Graphiste"

#: templates/pages/contrib.html:50 templates/pages/footer.html:28
msgid "Writer"
msgstr ""
msgstr "Rédacteur"

#: templates/pages/contrib.html:52 templates/pages/footer.html:29
msgid "Seeder"
msgstr ""
msgstr "Essaimeur"

#: templates/pages/contrib.html:54 templates/pages/footer.html:30
msgid "Q&A"
msgstr ""
msgstr "Rapporteur"

#: templates/pages/contrib.html:69
msgid "Get the code"
msgstr ""
msgstr "Voir le code"

#: templates/pages/contrib.html:90
msgid "Report a bug"
msgstr ""
msgstr "Rapporter un bug"

#: templates/pages/contrib.html:96
msgid "Une communauté dédiée à l'imagination citoyenne"
msgstr ""

#: templates/pages/contrib.html:104
msgid "Latest activities"
msgstr ""
msgstr "Dernière activité"

#: templates/pages/contrib.html:117
msgid "Join the community"
msgstr "Rejoignez la communauté"

#: templates/pages/contrib.html:120
msgid "Join us on IRC:"
msgstr ""
msgstr "Rejoignez-nous sur IRC :"

#: templates/pages/contrib.html:124
msgid "or subscribe to the mailing list:"
msgstr ""
msgstr "ou abonnez-vous à la liste de diffusion :"

#: templates/pages/contrib.html:126
msgid "Archives"
msgstr ""
msgstr "Archives"

#: templates/pages/contrib.html:130
msgid "Latest commits"
msgstr ""
msgstr "Dernières modifications"

#: templates/pages/contrib.html:143
msgid "Blog / News"
msgstr ""
msgstr "Blog / Actualités"

#: templates/pages/flatpage.html:30
msgid "There is no content yet. Switch to edit mode and add a widget."
msgstr ""
"Il n'y a pas encore de contenu. Passez en mode édition et ajoutez un "
"élément."

#: templates/pages/footer.html:12
msgid "Network"
msgstr ""
msgstr "Nébuleuse"

#: templates/pages/footer.html:24
msgid "Get Involved"
msgstr ""
msgstr "Contribuez"

#~ msgid "My last projects"
#~ msgstr "Mes derniers projets"
Expand Down
4 changes: 2 additions & 2 deletions apps/project_sheet/locale/fr/LC_MESSAGES/django.po
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-10-27 17:32+0200\n"
"PO-Revision-Date: 2011-10-27 17:34\n"
"PO-Revision-Date: 2011-10-27 17:49\n"
"Last-Translator: Simon Sarazin <simonsarazin@imaginationforpeople.org>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -349,7 +349,7 @@ msgstr "Diffusez le projet :"
#: templates/project_sheet/grey_column.html:102
#: templates/project_sheet/sidebar_related.html:6
msgid "related"
msgstr "catégories"
msgstr "thématiques"

#: templates/project_sheet/grey_column.html:109
msgid "objectives:"
Expand Down
12 changes: 5 additions & 7 deletions apps/project_sheet/views.py
Expand Up @@ -58,14 +58,14 @@ def project_sheet_list(request):

filter_forms_dict, extra_context = build_filters_and_context(data)

ordered_project_sheets = None
ordered_project_sheets = I4pProjectTranslation.objects.none()
filters = FilterSet(filter_forms_dict.values())

if filters.is_valid():
#First pass to filter project
# First pass to filter project
filtered_projects = filters.apply_to(queryset=I4pProject.objects.all(),
model_class=I4pProject)
#Second pass to select language
# Second pass to select language
project_sheet_ids = []
for project in filtered_projects:
project_sheet = get_project_translation_from_parent(project,
Expand All @@ -75,11 +75,11 @@ def project_sheet_list(request):
project_sheet_ids.append(project_sheet.id)
i18n_project_sheets = I4pProjectTranslation.objects.filter(id__in=project_sheet_ids)

#Third pass to filter sheet
# Third pass to filter sheet
filtered_project_sheets = filters.apply_to(queryset=i18n_project_sheets,
model_class=I4pProjectTranslation)

#Fourth pass to order sheet
# Fourth pass to order sheet
if data.get("order") == "creation":
ordered_project_sheets = filtered_project_sheets.order_by('-project__created')
extra_context["order"] = "creation"
Expand All @@ -98,8 +98,6 @@ def project_sheet_list(request):

extra_context["selected_tags"] = [int(t.id) for t in filter_forms_dict["themes_filter"].cleaned_data["themes"]]

else:
pass

extra_context.update(filter_forms_dict)
extra_context["filters_tab_selected"] = True
Expand Down
25 changes: 23 additions & 2 deletions apps/workgroup/cms_plugins.py
@@ -1,13 +1,34 @@
#-- encoding: utf-8 --
#
# This file is part of I4P.
#
# I4P is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# I4P is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero Public License for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with I4P. If not, see <http://www.gnu.org/licenses/>.
#
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User

from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.models.pluginmodel import CMSPlugin
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User

from .models import WorkGroupCMS, WorkGroup
from .utils import get_ml_members

class WorkGroupPlugin(CMSPluginBase):
"""
Workgroup (Un)subscribe button for the CMS
"""
model = WorkGroupCMS
name = _("WorkGroup (un)subscribe button")
render_template = "workgroup/cms_subscribe_button.html"
Expand Down
72 changes: 72 additions & 0 deletions apps/workgroup/migrations/0003_auto__add_workgroupcms.py
@@ -0,0 +1,72 @@
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

def forwards(self, orm):

# Adding model 'WorkGroupCMS'
db.create_table('cmsplugin_workgroupcms', (
('cmsplugin_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cms.CMSPlugin'], unique=True, primary_key=True)),
('workgroup', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['workgroup.WorkGroup'])),
))
db.send_create_signal('workgroup', ['WorkGroupCMS'])


def backwards(self, orm):

# Deleting model 'WorkGroupCMS'
db.delete_table('cmsplugin_workgroupcms')


models = {
'cms.cmsplugin': {
'Meta': {'object_name': 'CMSPlugin'},
'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
},
'cms.placeholder': {
'Meta': {'object_name': 'Placeholder'},
'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
},
'django_mailman.list': {
'Meta': {'object_name': 'List'},
'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
'encoding': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'main_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'workgroup.workgroup': {
'Meta': {'object_name': 'WorkGroup'},
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'language': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
'mailing_list': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['django_mailman.List']", 'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'slug': ('autoslug.fields.AutoSlugField', [], {'unique_with': '()', 'max_length': '50', 'populate_from': 'None', 'db_index': 'True'}),
'visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
},
'workgroup.workgroupcms': {
'Meta': {'object_name': 'WorkGroupCMS', 'db_table': "'cmsplugin_workgroupcms'", '_ormbases': ['cms.CMSPlugin']},
'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
'workgroup': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['workgroup.WorkGroup']"})
}
}

complete_apps = ['workgroup']
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -47,7 +47,7 @@ django-userena==1.0.2
-e git+https://github.com/jorgebastida/django-dajaxice.git@e99fae3bb78714c79e08cdb96dcdc85105b45038#egg=django-dajaxice
-e git+https://github.com/jorgebastida/django-dajax.git@727b6e6ae85acc173ef8464c491acb8f1b9ff1f7#egg=django-dajax

-e git+https://github.com/SpreadBand/django-backcap.git@3a920190a3515c979fef869bc3c616ab36ff4b42#egg=django-backcap
-e git+https://github.com/SpreadBand/django-backcap.git@79c6494d4d05587f4699947987b12d4a9322efdc#egg=django-backcap

-e git+https://github.com/etianen/django-reversion.git@a373e8acae497da7b6e69cf53b6c1ae02e798776#egg=django-reversion

Expand Down
2 changes: 1 addition & 1 deletion settings.py
Expand Up @@ -112,8 +112,8 @@

AUTHENTICATION_BACKENDS = (
'userena.backends.UserenaAuthenticationBackend',
'django.contrib.auth.backends.ModelBackend',
'guardian.backends.ObjectPermissionBackend',
'django.contrib.auth.backends.ModelBackend',
)

TEMPLATE_CONTEXT_PROCESSORS = (
Expand Down

0 comments on commit 98c1fa3

Please sign in to comment.