Author: jmorliaguet
Date: Mon Dec  5 01:10:20 2005
New Revision: 1959

Modified:
   cpsskins/branches/jmo-perspectives/browser/editing/views.py
Log:

- fixes



Modified: cpsskins/branches/jmo-perspectives/browser/editing/views.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/browser/editing/views.py (original)
+++ cpsskins/branches/jmo-perspectives/browser/editing/views.py Mon Dec  5 
01:10:20 2005
@@ -97,7 +97,7 @@
         form = request.form
         format_name = form.get('format')
         main_url = form.get('main_url')
-        action = form.get('action', 'edit.html')
+        action = form.get('action')
         base = form.get('base')
 
         negociation = getMultiAdapter((context, request),
@@ -119,6 +119,7 @@
 
         # Formats
         formats_info = []
+        can_create_setting = True
         for f in formattable.getFormats(resolve=False):
             is_setting = ISetting.providedBy(f)
             if is_setting:
@@ -128,7 +129,8 @@
             if selected:
                 if is_setting:
                     base = 'display'
-                    action = 'manage-settings.html'
+                    action = action or 'manage-settings.html'
+                    can_create_setting = False
                 else:
                     main = f
 
@@ -140,7 +142,7 @@
 
         # Actions
         actions_info = []
-        if format_name :
+        if format_name and can_create_setting:
             actions_info.append({
                 'title': u'Create setting',
                 'url': '@@%s?action=%s&format=%s' % \
@@ -159,6 +161,8 @@
         # Main area
         if base == 'display':
             main = display
+
+        action = action or 'edit.html'
         main_url = main_url or self.getAbsoluteURL(main) + '/@@' + action
 
         return {
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to