Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'develop' of git://github.com/divio/django-cms into develop

  • Loading branch information...
commit ccd790c15d2106d6ca56cdd1b9f63e24bf83ce3c 2 parents ff78478 + 8cd05ad
@kezabelle authored
Showing with 228 additions and 112 deletions.
  1. +1 −0  AUTHORS
  2. +6 −1 cms/api.py
  3. BIN  cms/locale/bn/LC_MESSAGES/django.mo
  4. +24 −10 cms/locale/bn/LC_MESSAGES/django.po
  5. BIN  cms/locale/bn/LC_MESSAGES/djangojs.mo
  6. +7 −5 cms/locale/bn/LC_MESSAGES/djangojs.po
  7. BIN  cms/locale/cy/LC_MESSAGES/django.mo
  8. +24 −11 cms/locale/cy/LC_MESSAGES/django.po
  9. BIN  cms/locale/cy/LC_MESSAGES/djangojs.mo
  10. +7 −6 cms/locale/cy/LC_MESSAGES/djangojs.po
  11. BIN  cms/locale/es_AR/LC_MESSAGES/djangojs.mo
  12. +7 −5 cms/locale/es_AR/LC_MESSAGES/djangojs.po
  13. BIN  cms/locale/et/LC_MESSAGES/djangojs.mo
  14. +7 −5 cms/locale/et/LC_MESSAGES/djangojs.po
  15. BIN  cms/locale/eu/LC_MESSAGES/django.mo
  16. +24 −10 cms/locale/eu/LC_MESSAGES/django.po
  17. BIN  cms/locale/eu/LC_MESSAGES/djangojs.mo
  18. +7 −5 cms/locale/eu/LC_MESSAGES/djangojs.po
  19. BIN  cms/locale/he/LC_MESSAGES/django.mo
  20. +24 −10 cms/locale/he/LC_MESSAGES/django.po
  21. BIN  cms/locale/he/LC_MESSAGES/djangojs.mo
  22. +7 −5 cms/locale/he/LC_MESSAGES/djangojs.po
  23. BIN  cms/locale/hu/LC_MESSAGES/django.mo
  24. +23 −9 cms/locale/hu/LC_MESSAGES/django.po
  25. BIN  cms/locale/hu/LC_MESSAGES/djangojs.mo
  26. +6 −4 cms/locale/hu/LC_MESSAGES/djangojs.po
  27. +2 −4 cms/plugins/text/settings.py
  28. +2 −2 cms/static/cms/js/plugins/cms.toolbar.js
  29. +16 −8 cms/templatetags/cms_admin.py
  30. +6 −1 cms/templatetags/cms_tags.py
  31. +4 −3 cms/utils/admin.py
  32. +3 −1 cms/utils/plugins.py
  33. +9 −3 docs/extending_cms/app_integration.rst
  34. +1 −1  docs/extending_cms/extending_examples.rst
  35. +11 −3 tests/project/settings.py
View
1  AUTHORS
@@ -82,6 +82,7 @@ Contributors (in alphabetical order):
* Jorge Vargas (elpargo)
* kar1m
* Keryn Knight
+* Kim Blomqvist
* kochin
* Krzysztof Bandurski
* kunitoki
View
7 cms/api.py
@@ -11,6 +11,7 @@
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
+from django.db.models import Max
from django.template.defaultfilters import slugify
from menus.menu_pool import menu_pool
@@ -266,10 +267,14 @@ def add_plugin(placeholder, plugin_type, language, position='last-child',
# validate and normalize plugin type
plugin_model, plugin_type = _verify_plugin_type(plugin_type)
+
+ max_pos = CMSPlugin.objects.filter(language=language,
+ placeholder=placeholder).aggregate(Max('position'))['position__max'] or 0
+
plugin_base = CMSPlugin(
plugin_type=plugin_type,
placeholder=placeholder,
- position=1,
+ position=max_pos + 1,
language=language
)
plugin_base.insert_at(target, position=position, save=False)
View
BIN  cms/locale/bn/LC_MESSAGES/django.mo
Binary file not shown
View
34 cms/locale/bn/LC_MESSAGES/django.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:48-0500\n"
-"PO-Revision-Date: 2011-08-14 14:43+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:47-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: Benjamin Wohlwend <piquadrat@gmail.com>\n"
"Language-Team: divio.ch <developers@divio.ch>\n"
-"Language: bn\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: bn\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Poedit-Country: SWITZERLAND\n"
"X-Poedit-Language: English\n"
@@ -125,7 +125,8 @@ msgid "Page Title"
msgstr ""
#: admin/forms.py:138
-msgid "Overwrites what is displayed at the top of your browser or in bookmarks"
+msgid ""
+"Overwrites what is displayed at the top of your browser or in bookmarks"
msgstr ""
#: admin/forms.py:139
@@ -1247,8 +1248,8 @@ msgstr ""
#: plugins/video/models.py:10
msgid ""
-"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=-"
-"iJ7bs4mTUY"
+"vimeo or youtube video url. Example: "
+"http://www.youtube.com/watch?v=-iJ7bs4mTUY"
msgstr ""
#: plugins/video/models.py:11
@@ -1794,8 +1795,7 @@ msgstr ""
#: templatetags/cms_tags.py:79
#, python-format
msgid ""
-"A template tag couldn't find the page with lookup arguments `"
-"%(page_lookup)s\n"
+"A template tag couldn't find the page with lookup arguments `%(page_lookup)s\n"
"`. The URL of the request was: http://%(host)s%(path)s"
msgstr ""
@@ -1819,3 +1819,17 @@ msgstr ""
#, python-format
msgid "CMS - Page %s requires approvement."
msgstr ""
+
+#~ msgid "move"
+#~ msgstr "move request"
+
+#~ msgid "sidebar column"
+#~ msgstr "background color"
+
+#~ msgid "fgcolor"
+#~ msgstr "foreground color"
+
+#~ msgid "Wanted language has not been translated yet."
+#~ msgstr "Requested language has not been translated yet."
+
+
View
BIN  cms/locale/bn/LC_MESSAGES/djangojs.mo
Binary file not shown
View
12 cms/locale/bn/LC_MESSAGES/djangojs.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:45-0500\n"
-"PO-Revision-Date: 2011-08-14 14:43+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:44-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: bn\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: bn\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: static/cms/js/change_form.js:31
@@ -35,3 +35,5 @@ msgstr ""
#: static/cms/js/plugin_editor.js:132
msgid "Are you sure you want to delete this plugin?"
msgstr ""
+
+
View
BIN  cms/locale/cy/LC_MESSAGES/django.mo
Binary file not shown
View
35 cms/locale/cy/LC_MESSAGES/django.po
@@ -1,21 +1,20 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
"POT-Creation-Date: 2011-08-14 09:47-0500\n"
-"PO-Revision-Date: 2011-08-14 14:43+0000\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: Benjamin Wohlwend <piquadrat@gmail.com>\n"
"Language-Team: divio.ch <developers@divio.ch>\n"
-"Language: cy\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != "
-"11) ? 2 : 3\n"
+"Language: cy\n"
+"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3\n"
"X-Poedit-Country: SWITZERLAND\n"
"X-Poedit-Language: English\n"
"X-Poedit-SourceCharset: utf-8\n"
@@ -126,7 +125,8 @@ msgid "Page Title"
msgstr ""
#: admin/forms.py:138
-msgid "Overwrites what is displayed at the top of your browser or in bookmarks"
+msgid ""
+"Overwrites what is displayed at the top of your browser or in bookmarks"
msgstr ""
#: admin/forms.py:139
@@ -1248,8 +1248,8 @@ msgstr ""
#: plugins/video/models.py:10
msgid ""
-"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=-"
-"iJ7bs4mTUY"
+"vimeo or youtube video url. Example: "
+"http://www.youtube.com/watch?v=-iJ7bs4mTUY"
msgstr ""
#: plugins/video/models.py:11
@@ -1797,8 +1797,7 @@ msgstr ""
#: templatetags/cms_tags.py:79
#, python-format
msgid ""
-"A template tag couldn't find the page with lookup arguments `"
-"%(page_lookup)s\n"
+"A template tag couldn't find the page with lookup arguments `%(page_lookup)s\n"
"`. The URL of the request was: http://%(host)s%(path)s"
msgstr ""
@@ -1822,3 +1821,17 @@ msgstr ""
#, python-format
msgid "CMS - Page %s requires approvement."
msgstr ""
+
+#~ msgid "move"
+#~ msgstr "move request"
+
+#~ msgid "sidebar column"
+#~ msgstr "background color"
+
+#~ msgid "fgcolor"
+#~ msgstr "foreground color"
+
+#~ msgid "Wanted language has not been translated yet."
+#~ msgstr "Requested language has not been translated yet."
+
+
View
BIN  cms/locale/cy/LC_MESSAGES/djangojs.mo
Binary file not shown
View
13 cms/locale/cy/LC_MESSAGES/djangojs.po
@@ -1,21 +1,20 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
"POT-Creation-Date: 2011-08-14 09:44-0500\n"
-"PO-Revision-Date: 2011-08-14 14:42+0000\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: cy\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != "
-"11) ? 2 : 3\n"
+"Language: cy\n"
+"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3\n"
#: static/cms/js/change_form.js:31
msgid ""
@@ -36,3 +35,5 @@ msgstr ""
#: static/cms/js/plugin_editor.js:132
msgid "Are you sure you want to delete this plugin?"
msgstr ""
+
+
View
BIN  cms/locale/es_AR/LC_MESSAGES/djangojs.mo
Binary file not shown
View
12 cms/locale/es_AR/LC_MESSAGES/djangojs.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:45-0500\n"
-"PO-Revision-Date: 2011-08-14 14:43+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:44-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: es_AR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: es_AR\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: static/cms/js/change_form.js:31
@@ -35,3 +35,5 @@ msgstr ""
#: static/cms/js/plugin_editor.js:132
msgid "Are you sure you want to delete this plugin?"
msgstr ""
+
+
View
BIN  cms/locale/et/LC_MESSAGES/djangojs.mo
Binary file not shown
View
12 cms/locale/et/LC_MESSAGES/djangojs.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:45-0500\n"
-"PO-Revision-Date: 2011-08-14 14:42+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:44-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: et\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: et\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: static/cms/js/change_form.js:31
@@ -35,3 +35,5 @@ msgstr ""
#: static/cms/js/plugin_editor.js:132
msgid "Are you sure you want to delete this plugin?"
msgstr ""
+
+
View
BIN  cms/locale/eu/LC_MESSAGES/django.mo
Binary file not shown
View
34 cms/locale/eu/LC_MESSAGES/django.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:48-0500\n"
-"PO-Revision-Date: 2011-08-14 14:43+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:47-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: Benjamin Wohlwend <piquadrat@gmail.com>\n"
"Language-Team: divio.ch <developers@divio.ch>\n"
-"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: eu\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Poedit-Country: SWITZERLAND\n"
"X-Poedit-Language: English\n"
@@ -125,7 +125,8 @@ msgid "Page Title"
msgstr ""
#: admin/forms.py:138
-msgid "Overwrites what is displayed at the top of your browser or in bookmarks"
+msgid ""
+"Overwrites what is displayed at the top of your browser or in bookmarks"
msgstr ""
#: admin/forms.py:139
@@ -1247,8 +1248,8 @@ msgstr ""
#: plugins/video/models.py:10
msgid ""
-"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=-"
-"iJ7bs4mTUY"
+"vimeo or youtube video url. Example: "
+"http://www.youtube.com/watch?v=-iJ7bs4mTUY"
msgstr ""
#: plugins/video/models.py:11
@@ -1794,8 +1795,7 @@ msgstr ""
#: templatetags/cms_tags.py:79
#, python-format
msgid ""
-"A template tag couldn't find the page with lookup arguments `"
-"%(page_lookup)s\n"
+"A template tag couldn't find the page with lookup arguments `%(page_lookup)s\n"
"`. The URL of the request was: http://%(host)s%(path)s"
msgstr ""
@@ -1819,3 +1819,17 @@ msgstr ""
#, python-format
msgid "CMS - Page %s requires approvement."
msgstr ""
+
+#~ msgid "move"
+#~ msgstr "move request"
+
+#~ msgid "sidebar column"
+#~ msgstr "background color"
+
+#~ msgid "fgcolor"
+#~ msgstr "foreground color"
+
+#~ msgid "Wanted language has not been translated yet."
+#~ msgstr "Requested language has not been translated yet."
+
+
View
BIN  cms/locale/eu/LC_MESSAGES/djangojs.mo
Binary file not shown
View
12 cms/locale/eu/LC_MESSAGES/djangojs.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:45-0500\n"
-"PO-Revision-Date: 2011-08-14 14:42+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:44-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: eu\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: static/cms/js/change_form.js:31
@@ -35,3 +35,5 @@ msgstr ""
#: static/cms/js/plugin_editor.js:132
msgid "Are you sure you want to delete this plugin?"
msgstr ""
+
+
View
BIN  cms/locale/he/LC_MESSAGES/django.mo
Binary file not shown
View
34 cms/locale/he/LC_MESSAGES/django.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:48-0500\n"
-"PO-Revision-Date: 2011-08-14 14:43+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:47-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: Benjamin Wohlwend <piquadrat@gmail.com>\n"
"Language-Team: divio.ch <developers@divio.ch>\n"
-"Language: he\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: he\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Poedit-Country: SWITZERLAND\n"
"X-Poedit-Language: English\n"
@@ -125,7 +125,8 @@ msgid "Page Title"
msgstr ""
#: admin/forms.py:138
-msgid "Overwrites what is displayed at the top of your browser or in bookmarks"
+msgid ""
+"Overwrites what is displayed at the top of your browser or in bookmarks"
msgstr ""
#: admin/forms.py:139
@@ -1247,8 +1248,8 @@ msgstr ""
#: plugins/video/models.py:10
msgid ""
-"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=-"
-"iJ7bs4mTUY"
+"vimeo or youtube video url. Example: "
+"http://www.youtube.com/watch?v=-iJ7bs4mTUY"
msgstr ""
#: plugins/video/models.py:11
@@ -1794,8 +1795,7 @@ msgstr ""
#: templatetags/cms_tags.py:79
#, python-format
msgid ""
-"A template tag couldn't find the page with lookup arguments `"
-"%(page_lookup)s\n"
+"A template tag couldn't find the page with lookup arguments `%(page_lookup)s\n"
"`. The URL of the request was: http://%(host)s%(path)s"
msgstr ""
@@ -1819,3 +1819,17 @@ msgstr ""
#, python-format
msgid "CMS - Page %s requires approvement."
msgstr ""
+
+#~ msgid "move"
+#~ msgstr "move request"
+
+#~ msgid "sidebar column"
+#~ msgstr "background color"
+
+#~ msgid "fgcolor"
+#~ msgstr "foreground color"
+
+#~ msgid "Wanted language has not been translated yet."
+#~ msgstr "Requested language has not been translated yet."
+
+
View
BIN  cms/locale/he/LC_MESSAGES/djangojs.mo
Binary file not shown
View
12 cms/locale/he/LC_MESSAGES/djangojs.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-08-14 09:45-0500\n"
-"PO-Revision-Date: 2011-08-14 14:42+0000\n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
+"POT-Creation-Date: 2011-08-14 09:44-0500\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: he\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: he\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: static/cms/js/change_form.js:31
@@ -35,3 +35,5 @@ msgstr ""
#: static/cms/js/plugin_editor.js:132
msgid "Are you sure you want to delete this plugin?"
msgstr ""
+
+
View
BIN  cms/locale/hu/LC_MESSAGES/django.mo
Binary file not shown
View
32 cms/locale/hu/LC_MESSAGES/django.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
"POT-Creation-Date: 2011-08-14 09:47-0500\n"
-"PO-Revision-Date: 2011-08-14 14:43+0000\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: Benjamin Wohlwend <piquadrat@gmail.com>\n"
"Language-Team: divio.ch <developers@divio.ch>\n"
-"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Poedit-Country: SWITZERLAND\n"
"X-Poedit-Language: English\n"
@@ -125,7 +125,8 @@ msgid "Page Title"
msgstr ""
#: admin/forms.py:138
-msgid "Overwrites what is displayed at the top of your browser or in bookmarks"
+msgid ""
+"Overwrites what is displayed at the top of your browser or in bookmarks"
msgstr ""
#: admin/forms.py:139
@@ -1247,8 +1248,8 @@ msgstr ""
#: plugins/video/models.py:10
msgid ""
-"vimeo or youtube video url. Example: http://www.youtube.com/watch?v=-"
-"iJ7bs4mTUY"
+"vimeo or youtube video url. Example: "
+"http://www.youtube.com/watch?v=-iJ7bs4mTUY"
msgstr ""
#: plugins/video/models.py:11
@@ -1794,8 +1795,7 @@ msgstr ""
#: templatetags/cms_tags.py:79
#, python-format
msgid ""
-"A template tag couldn't find the page with lookup arguments `"
-"%(page_lookup)s\n"
+"A template tag couldn't find the page with lookup arguments `%(page_lookup)s\n"
"`. The URL of the request was: http://%(host)s%(path)s"
msgstr ""
@@ -1819,3 +1819,17 @@ msgstr ""
#, python-format
msgid "CMS - Page %s requires approvement."
msgstr ""
+
+#~ msgid "move"
+#~ msgstr "move request"
+
+#~ msgid "sidebar column"
+#~ msgstr "background color"
+
+#~ msgid "fgcolor"
+#~ msgstr "foreground color"
+
+#~ msgid "Wanted language has not been translated yet."
+#~ msgstr "Requested language has not been translated yet."
+
+
View
BIN  cms/locale/hu/LC_MESSAGES/djangojs.mo
Binary file not shown
View
10 cms/locale/hu/LC_MESSAGES/djangojs.po
@@ -1,19 +1,19 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-#
+#
msgid ""
msgstr ""
"Project-Id-Version: django-cms\n"
-"Report-Msgid-Bugs-To: \n"
+"Report-Msgid-Bugs-To: https://github.com/divio/django-cms/issues\n"
"POT-Creation-Date: 2011-08-14 09:44-0500\n"
-"PO-Revision-Date: 2011-08-14 14:42+0000\n"
+"PO-Revision-Date: 2011-08-25 19:27+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
-"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Language: hu\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: static/cms/js/change_form.js:31
@@ -35,3 +35,5 @@ msgstr ""
#: static/cms/js/plugin_editor.js:132
msgid "Are you sure you want to delete this plugin?"
msgstr ""
+
+
View
6 cms/plugins/text/settings.py
@@ -1,4 +1,5 @@
from django.conf import settings
+from cms.utils import cms_static_url
# Uses TinyMCE as editor (no inline plugins). Requires django-tinymce app.
# If false, then WYMEditor is used.
@@ -60,7 +61,4 @@
#Advantageously replaces WYM_CLASSES and WYM_STYLES
##Prepare url for wymeditor.css
-CMS_MEDIA_PATH = getattr(settings, 'CMS_MEDIA_PATH', 'cms/')
-WYM_STYLESHEET_PATH = getattr(settings, 'WYM_STYLESHEET_PATH', ''.join((settings.STATIC_URL, 'cms')) )
-WYM_STYLESHEET = getattr(settings, "WYM_STYLESHEET", '"%scss/wymeditor.css"' % WYM_STYLESHEET_PATH )
-
+WYM_STYLESHEET = getattr(settings, "WYM_STYLESHEET", '"%s"' % cms_static_url('css/wymeditor.css'))
View
4 cms/static/cms/js/plugins/cms.toolbar.js
@@ -293,13 +293,13 @@ jQuery(document).ready(function ($) {
// lets loop through the items
$(obj.items).each(function (index, value) {
// add icon if available
- var icon = value.icon ? 'cms_toolbar_icon cms_toolbar_icon-enabled ' : '';
+ var icon_styles = value.icon ? ' class="cms_toolbar_icon cms_toolbar_icon-enabled" style="background-image:url('+value.icon+');"' : '';
// replace attributes
tmp += list.replace('[list_title]', value.title)
.replace('[list_url]', value.url)
.replace('[list_method]', value.method)
.replace('[list_class]', value.cls)
- .replace('<span>', '<span class="'+icon+'" style="background-image:url('+value.icon+');">');
+ .replace('<span>', '<span'+icon_styles+'>');
});
// add items
template.find('.cms_toolbar-item_list').html($(tmp));
View
24 cms/templatetags/cms_admin.py
@@ -80,13 +80,21 @@ def boolean_icon(value):
@register.filter
def is_restricted(page, request):
- all_perms = get_any_page_view_permissions(request, page)
- icon = boolean_icon(all_perms.exists())
- return mark_safe(
- ugettext('<span title="Restrictions: %(title)s">%(icon)s</span>') % {
- 'title': u', '.join((perm.get_grant_on_display() for perm in all_perms)) or None,
- 'icon': icon,
- })
+ if settings.CMS_PERMISSION:
+ all_perms = list(get_any_page_view_permissions(request, page))
+ icon = boolean_icon(bool(all_perms))
+ return mark_safe(
+ ugettext('<span title="Restrictions: %(title)s">%(icon)s</span>') % {
+ 'title': u', '.join((perm.get_grant_on_display() for perm in all_perms)) or None,
+ 'icon': icon,
+ })
+ else:
+ icon = boolean_icon(None)
+ return mark_safe(
+ ugettext('<span title="Restrictions: %(title)s">%(icon)s</span>') % {
+ 'title': None,
+ 'icon': icon,
+ })
@register.filter
def moderator_choices(page, user):
@@ -170,4 +178,4 @@ def get_context(self, context):
def in_filtered(seq1, seq2):
return [x for x in seq1 if x in seq2]
-in_filtered = register.filter('in_filtered', in_filtered)
+in_filtered = register.filter('in_filtered', in_filtered)
View
7 cms/templatetags/cms_tags.py
@@ -338,7 +338,12 @@ def _show_placeholder_for_page(context, placeholder_name, page_lookup, lang=None
page = _get_page_by_untyped_arg(page_lookup, request, site_id)
if not page:
return {'content': ''}
- placeholder = page.placeholders.get(slot=placeholder_name)
+ try:
+ placeholder = page.placeholders.get(slot=placeholder_name)
+ except Placeholder.DoesNotExist:
+ if settings.DEBUG:
+ raise
+ return {'content': ''}
baseqs = get_cmsplugin_queryset(request)
plugins = baseqs.filter(
placeholder=placeholder,
View
7 cms/utils/admin.py
@@ -41,9 +41,10 @@ def get_admin_menu_item_context(request, page, filtered=False):
moderator_state = moderator.page_moderator_state(request, page)
has_add_on_same_level_permission = False
opts = Page._meta
- if (request.user.has_perm(opts.app_label + '.' + opts.get_add_permission()) and
- GlobalPagePermission.objects.with_user(request.user).filter(can_add=True, sites__in=[page.site_id])):
- has_add_on_same_level_permission = True
+ if settings.CMS_PERMISSION:
+ if (request.user.has_perm(opts.app_label + '.' + opts.get_add_permission()) and
+ GlobalPagePermission.objects.with_user(request.user).filter(can_add=True, sites__in=[page.site_id])):
+ has_add_on_same_level_permission = True
if not has_add_on_same_level_permission and page.parent_id:
has_add_on_same_level_permission = permissions.has_generic_permission(page.parent_id, request.user, "add", page.site)
View
4 cms/utils/plugins.py
@@ -30,7 +30,9 @@ def _extend_blocks(extend_node, blocks):
else:
# set this node as the super node (for {{ block.super }})
block = blocks[node.name]
- while hasattr(block.super, 'nodelist'):
+ seen_supers = []
+ while hasattr(block.super, 'nodelist') and block.super not in seen_supers:
+ seen_supers.append(block.super)
block = block.super
block.super = node
# search for further ExtendsNodes
View
12 docs/extending_cms/app_integration.rst
@@ -282,7 +282,13 @@ We would now create a menu out of these categories::
def get_nodes(self, request):
nodes = []
for category in Category.objects.all().order_by("tree_id", "lft"):
- nodes.append(NavigationNode(category.name, category.pk, category.parent_id))
+ node = NavigationNode(
+ category.name,
+ category.get_absolute_url(),
+ category.pk,
+ category.parent_id
+ )
+ nodes.append(node)
return nodes
menu_pool.register_menu(CategoryMenu)
@@ -305,8 +311,8 @@ Navigation Modifiers
Navigation Modifiers give your application access to navigation menus.
-A modifier can add nodes to a menu, change the properties of existing
-nodes, and even rearrange entire menus.
+A modifier can change the properties of existing nodes or rearrange entire
+menus.
An example use-case
View
2  docs/extending_cms/extending_examples.rst
@@ -252,7 +252,7 @@ So open your ``cms_apps.py`` and write::
class PollsApp(CMSApp):
name = _("Poll App")
urls = ["polls.urls"]
- menu = [PollsMenu] # attach a CMSAttachMenu to this apphook.
+ menus = [PollsMenu] # attach a CMSAttachMenu to this apphook.
apphook_pool.register(PollsApp)
View
14 tests/project/settings.py
@@ -43,10 +43,18 @@
SECRET_KEY = '*xq7m@)*f2awoj!spa0(jibsrz9%c0d=e(g)v*!17y(vx0ue_3'
+#TEMPLATE_LOADERS = (
+# 'django.template.loaders.filesystem.Loader',
+# 'django.template.loaders.app_directories.Loader',
+# 'django.template.loaders.eggs.Loader',
+#)
+
TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.Loader',
- 'django.template.loaders.app_directories.Loader',
- 'django.template.loaders.eggs.Loader',
+ ('django.template.loaders.cached.Loader', (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ 'django.template.loaders.eggs.Loader',
+ )),
)
TEMPLATE_CONTEXT_PROCESSORS = [
Please sign in to comment.
Something went wrong with that request. Please try again.