Commits

Stefan Zimmermann  committed 9cae251 Merge

merge

  • Participants
  • Parent commits 17c4263, 1099854

Comments (0)

Files changed (15)

 253b2464507e9cb426f866c1f2561e859233ea69 v0.2.0
 4ebbf2cf39b5cd8cd7f470726ac72f8516895804 v0.4.0
 3e822763bab3c567e003c957786397e0fb781929 v0.3.0
+628450a80e701ee4ea749d2a2e28b6023f52b64a v0.4.1
 django-admin-tools changelog
 ============================
 
+Version 0.4.1, 15 November 2011:
+--------------------------------
+
+* Static files and django 1.3 support
+* Fixed modules instanciation issues (fixes #65)
+* Nested groups support & better html id generation (fixes issue #70)
+* Fixed various js and css problems
+* Added translation for Finnish + updates on other languages
+* More robust dashboard layout
+* Added force_show_title property to Group module
+
+
 Version 0.4.0, 13 December 2010:
 --------------------------------
 

File admin_tools/__init__.py

  * a customizable menu bar,
  * tools to make admin theming easier.
 """
-VERSION = '0.4.0'
+VERSION = '0.4.1'

File admin_tools/dashboard/management/commands/customdashboard.py

             raise CommandError('file "%s" already exists' % dst)
         context['file'] = os.path.basename(dst).split('.')[0]
         open(dst, 'w').write(render_to_string(tpl, context))
-        print('"%s" written.' % os.path.join(dst))
+        self.stdout.write('"%s" written.' % os.path.join(dst))
 

File admin_tools/dashboard/modules.py

     accordion, or just stacked (default).
     As well as the :class:`~admin_tools.dashboard.modules.DashboardModule`
     properties, the :class:`~admin_tools.dashboard.modules.Group`
-    has one extra property:
+    has two extra properties:
 
     ``display``
         A string determining how the group should be rendered, this can be one
         of the following values: 'tabs' (default), 'accordion' or 'stacked'.
 
+    ``force_show_title``
+        Default behaviour for Group module is to force children to always show
+        the title if Group has ``display`` = ``stacked``. If this flag is set
+        to ``False``, children title is shown according to their``show_title``
+        property. Note that in this case is children responsibility to have
+        meaningful content if no title is shown.
+
     Here's an example of modules group::
 
         from admin_tools.dashboard import modules, Dashboard
     .. image:: images/dashboard_module_group.png
     """
 
+    force_show_title = True
     template = 'admin_tools/dashboard/modules/group.html'
     display = 'tabs'
 
             module.collapsible = False
             module.draggable = False
             module.deletable = False
-            module.show_title = (self.display == 'stacked')
+            if self.force_show_title:
+                module.show_title = (self.display == 'stacked')
             module.init_with_context(context)
         self._initialized = True
 

File admin_tools/dashboard/static/admin_tools/js/dashboard.js

 var init_dashboard = function(id, columns, preferences, url) {
-    $('#'+id).dashboard({
+    jQuery('#'+id).dashboard({
         'columns': columns,
         'load_preferences_function': function(options) {
             return preferences;
             jQuery.post(url, { data: JSON.stringify(preferences) });
         }
     });
-    $(".group-tabs").tabs();
-    $(".group-accordion").accordion({header: '.group-accordion-header'});
+    jQuery(".group-tabs").tabs();
+    jQuery(".group-accordion").accordion({header: '.group-accordion-header'});
 };

File admin_tools/locale/fi/LC_MESSAGES/django.po

 #
 msgid ""
 msgstr ""
-"Project-Id-Version: django-admin-tools 0.4.0\n"
+"Project-Id-Version: django-admin-tools 0.4.1\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2011-01-27 08:34+0100\n"
 "PO-Revision-Date: 2011-01-27 06:11+0200\n"

File admin_tools/locale/nl/LC_MESSAGES/django.mo

Binary file modified.

File admin_tools/locale/zh_TW/LC_MESSAGES/django.mo

Binary file modified.

File admin_tools/locale/zh_TW/LC_MESSAGES/django.po

 
 #: dashboard/dashboards.py:81 menu/menus.py:100
 msgid "Dashboard"
-msgstr ""
+msgstr "控制台"
 
 #: dashboard/dashboards.py:217
 msgid "Quick links"
-msgstr ""
+msgstr "捷徑"
 
 #: dashboard/dashboards.py:223
 msgid "Return to site"
-msgstr ""
+msgstr "首頁"
 
 #: dashboard/dashboards.py:224 theming/templates/admin/base.html:43
 msgid "Change password"
 
 #: dashboard/dashboards.py:232 dashboard/modules.py:385 menu/menus.py:103
 msgid "Applications"
-msgstr ""
+msgstr "應用程序"
 
 #: dashboard/dashboards.py:238 menu/menus.py:107
 msgid "Administration"
-msgstr ""
+msgstr "管理"
 
 #: dashboard/dashboards.py:243 dashboard/dashboards.py:297
 #: dashboard/modules.py:538
 
 #: dashboard/dashboards.py:247
 msgid "Latest Django News"
-msgstr ""
+msgstr "最新 Django 新聞"
 
 #: dashboard/dashboards.py:254
 msgid "Support"
-msgstr ""
+msgstr "支援"
 
 #: dashboard/dashboards.py:257
 msgid "Django documentation"

File admin_tools/media/admin_tools/css/menu.css

     background: transparent url(../images/admin-tools.png) repeat-x 0 -245px;
 }
 
-#header ul#navigation-menu li.disabled:hover,
-#header ul#navigation-menu li.disabled .over {
+#header ul#navigation-menu li.disabled a:hover,
+#header ul#navigation-menu li.disabled a.over {
     background: none;
 }

File admin_tools/menu/management/commands/custommenu.py

             'project': project_name,
             'file': os.path.basename(dst).split('.')[0]
         }))
-        print('"%s" written.' % os.path.join(dst))
+        self.stdout.write('"%s" written.' % os.path.join(dst))
 

File admin_tools/menu/static/admin_tools/css/menu.css

     background: transparent url(../images/admin-tools.png) repeat-x 0 -245px;
 }
 
-#header ul#navigation-menu li.disabled:hover,
-#header ul#navigation-menu li.disabled .over {
+#header ul#navigation-menu li.disabled a:hover,
+#header ul#navigation-menu li.disabled a.over {
     background: none;
 }

File admin_tools/menu/templates/admin_tools/menu/item.html

 {% spaceless %}
 {% if not item.is_empty %}
 <li class="menu-item{% ifequal index 1 %} first{% endifequal %}{% if not item.enabled %} disabled{% endif %}{% if selected %} selected{% endif %}{% if item.css_classes %} {{ item.css_classes|join:' ' }}{% endif %}">
-<a href="{% if item.url and item.enabled %}{{ item.url }}{% else %}#{% endif %}"{% if item.description %} title="{{ item.description }}"{% endif %}{% if item.accesskey %} accesskey="{{ item.accesskey }}"{% endif %}>{% if item.children %}<span class="icon"></span>{% endif %}{{ item.title }}</a>
-    {% if item.children %}
+<a href="{% if item.url and item.enabled %}{{ item.url }}{% else %}#{% endif %}"{% if item.description %} title="{{ item.description }}"{% endif %}{% if item.accesskey %} accesskey="{{ item.accesskey }}"{% endif %}>{% if item.children and item.enabled %}<span class="icon"></span>{% endif %}{{ item.title }}</a>
+    {% if item.children and item.enabled %}
     <ul>
         {% for child_item in item.children %}
         {% admin_tools_render_menu_item child_item %}

File docs/index.rst

     This documentation covers the latest version of django-admin-tools (tip).
     For older versions please follow the links below:
 
+    * `Version 0.4.0 <http://readthedocs.org/docs/django-admin-tools/v0.4.1/>`_
     * `Version 0.4.0 <http://readthedocs.org/docs/django-admin-tools/v0.4.0/>`_
     * `Version 0.3.0 <http://readthedocs.org/docs/django-admin-tools/v0.3.0/>`_
     * `Version 0.2.0 <http://readthedocs.org/docs/django-admin-tools/v0.2.0/>`_