Index: WAeUP_SRP/trunk/skins/waeup_academics/faculty_index_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/faculty_index_view.pt	(revision 596)
+++ WAeUP_SRP/trunk/skins/waeup_academics/faculty_index_view.pt	(revision 597)
@@ -39,5 +39,5 @@
 
             <td> 
-            <a tal:condition="row/isManager"
+            <a tal:condition="row/is_edit_allowed"
                 href="edit" tal:attributes="href string:${row/url}/external_edit_form"
                 target="edit"
Index: WAeUP_SRP/trunk/skins/waeup_academics/getDepartmentsInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/getDepartmentsInfo.py	(revision 596)
+++ WAeUP_SRP/trunk/skins/waeup_academics/getDepartmentsInfo.py	(revision 597)
@@ -39,5 +39,5 @@
     row['title'] = rd.LongTitle()
     row['url'] = ro.absolute_url()
-    row['isManager'] = mtool.checkPermission('Modify portal content', ro)
+    row['is_edit_allowed'] = mtool.checkPermission('Modify portal content', ro)
     items.append(row)
 info['items'] = items
Index: WAeUP_SRP/trunk/skins/waeup_default/external_edit.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/external_edit.py	(revision 597)
+++ WAeUP_SRP/trunk/skins/waeup_default/external_edit.py	(revision 597)
@@ -0,0 +1,47 @@
+##parameters=REQUEST, cluster=None, cpsdocument_edit_and_view_button=None, action=None
+# $Id: cpsdocument_edit.py 33302 2006-02-22 15:57:11Z tziade $
+"""
+Called when a document form is posted.
+
+Validates data, then:
+
+ - if there's no error, updates the object and redirects to it,
+
+ - if there's an error, puts data in session and redirects to edit form.
+
+A form uid is propagated during the redirect to uniquely identify the
+form in the session.
+"""
+
+from urllib import urlencode
+from Products.CPSDocument.utils import getFormUidUrlArg
+
+# Check flexible controls
+context.editLayouts(REQUEST=REQUEST)
+
+# Validate the document and write it if it's valid
+# (We don't call getEditableContent here, validate does it when needed.)
+doc = context.getContent()
+is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,
+                            use_session=True)
+
+if action is None:
+    ti = doc.getTypeInfo()
+    action = ti.queryMethodID('edit', 'external_edit_form')
+    action = '/' + action
+
+if is_valid:
+    comments = REQUEST.get('comments')
+    context.cpsdocument_notify_modification(comments=comments)
+    if cpsdocument_edit_and_view_button is not None:
+        action = ''
+    psm = 'psm_content_changed'
+    args = {}
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+
+args['portal_status_message'] = psm
+url = context.absolute_url() + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
+
Index: WAeUP_SRP/trunk/skins/waeup_default/external_edit_buttons.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/external_edit_buttons.pt	(revision 597)
+++ WAeUP_SRP/trunk/skins/waeup_default/external_edit_buttons.pt	(revision 597)
@@ -0,0 +1,13 @@
+<metal:block define-macro="buttons">
+  <input type="submit" name="external_edit_button"
+         class="standalone" value="button_change"
+         id="external_edit_button"
+         i18n:attributes="value" />
+  <input type="submit" name="external_close_button"
+         class="standalone" value="Close"
+         onclick="window.opener.location.reload();window.close()"
+         id="external_close_button"
+         i18n:attributes="value" />
+</metal:block>
+
+
Index: WAeUP_SRP/trunk/skins/waeup_default/external_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/external_edit_form.pt	(revision 596)
+++ WAeUP_SRP/trunk/skins/waeup_default/external_edit_form.pt	(revision 597)
@@ -1,6 +1,5 @@
 <tal:block define="
     rendered_main python:here.cpsdocument_edit_render(request=request);
-    form_action string:cpsdocument_edit;
-    creation python:False;
+    form_action string:external_edit;
     edition python:True;
     metadata metadata|nothing;
@@ -8,66 +7,8 @@
 <metal:block define-macro="edit_form">
 <metal:block use-macro="here/content_lib_master/macros/master">
-  <metal:block fill-slot="style_slot">
-    <link rel="Stylesheet" type="text/css" href=""
-      tal:attributes="href string:${base_url}document.css" />
 
-    <metal:block define-macro="widgets_javascript">
-    <!-- XXX this has to move to CPSSchemas -->
-    <style type="text/css"
-      tal:content="string:@import url(${base_url}calendar-win2k-1.css);"></style>
-    <script type="text/javascript" src="calendar.js"
-      tal:attributes="src string:${base_url}calendar.js"></script>
-    <script type="text/javascript" src="lang/calendar-en.js"
-      tal:define="local cpsmcat/getSelectedLanguage"
-      tal:attributes="src string:${base_url}lang/calendar-${local}.js"></script>
-    <script type="text/javascript" src="calendar-setup.js"
-      tal:attributes="src string:${base_url}calendar-setup.js"></script>
-    <script type="text/javascript" src="prototype.js"
-      tal:attributes="src string:${base_url}prototype.js"></script>
-    <script type="text/javascript" src="effects.js"
-      tal:attributes="src string:${base_url}effects.js"></script>
-    <script type="text/javascript" src="controls.js"
-      tal:attributes="src string:${base_url}controls.js"></script>
-    <script type="text/javascript" src="cpsdocument.js"
-      tal:attributes="src string:${base_url}cpsdocument.js"></script>
-    <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.FCKeditor')">
-      <script type="text/javascript">
-        var popup_editor_form = 'popup_fckeditor_form';
-        var width = 640;
-        var height = 520;
-      </script>
-    </tal:block>
-    <tal:block condition="python:modules['Products.CPSUtil.integration'].isProductPresent('Products.Epoz')">
-      <script type="text/javascript">
-        var popup_editor_form = 'popup_rte_form';
-        var width = 640;
-        var height = 480;
-      </script>
-    </tal:block>
-    <script type="text/javascript">
-     function popup_rte(input_id, label_edit) {
-       var args, value;
-       value = document.getElementById(input_id).value;
-       args = '?input_id='+input_id+'&amp;label_edit='+escape(label_edit);
-       str_window_features = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,dependent=1,width=' + width + ',height=' + height;
-       popup = window.open(popup_editor_form + args, input_id, str_window_features);
-       if (!popup.opener) {
-         popup.opener = window;
-       }
-       return false;
-     }
-   </script>
-   </metal:block>
-  </metal:block>
 
   <metal:block fill-slot="header">
-    <h1 tal:condition="creation" i18n:translate="">
-      Create a document of type
-      <tal:block i18n:name="type_name" i18n:translate=""
-            tal:define="type_name request/type_name;
-                        type_info python:here.portal_types[type_name]"
-            tal:content="type_info/Title">Type Title</tal:block>
-    </h1>
-    <h1 tal:condition="not:creation">
+    <h3>
       <tal:block condition="python: edition and not metadata"
         i18n:translate="">Edit <span id="page_title" i18n:name="title"
@@ -75,5 +16,5 @@
       <tal:block tal:condition="metadata"
         i18n:translate="">Metadata of <span i18n:name="title" tal:content="here/title_or_id">Page Title</span></tal:block>
-    </h1>
+    </h3>
   </metal:block>
 
@@ -86,7 +27,5 @@
           <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
                      replace="structure python:getFormUidHtml(request)"/>
-          <input type="hidden" name="type_name" value="VALUE"
-                 tal:condition="creation"
-                 tal:attributes="value request/type_name" />
+          
           <input type="hidden" id="button_placeholder" name="button_placeholder" value="" />
           <div id="rendered_main" tal:content="structure rendered_main">
@@ -95,43 +34,8 @@
         </div>
 
-        <tal:block condition="not:creation">
-          <div class="tooltipArea" style="visibility: hidden;"
-               id="transition_comments_help"
-               onclick="showElement(false, 'transition_comments_help')"
-               i18n:translate="help_transition_comments_modification">
-            In this field you can give the reason for the modification
-            on this document. Your comments may be used to notify other users.
-          </div>
-          <dl>
-            <dt><label for="comments"
-                       i18n:translate="transition_comments_modification"
-                       >Reason of the modification</label>
-              <button type="button" class="tooltipControl"
-                      onclick="toggleElementVisibility('transition_comments_help')"> ? </button>
-            </dt>
-            <dd>
-              <textarea name="comments" id="comments" cols="60" rows="3"
-                        tal:content="nothing">
-              </textarea>
-            </dd>
-          </dl>
-        </tal:block>
-
-        <metal:block use-macro="here/cpsdocument_edit_buttons/macros/buttons"/>
-        
-        
-        
-        
-        <br /> <br /> <a href="" onClick="self.close();">Close Window</a>
-        
-        
-        
-        
-        
+        <metal:block use-macro="here/external_edit_buttons/macros/buttons"/>
+               
       </div>
     </form>
-    <div id="ajax_psm" style="display:none">
-      ajax feedback
-    </div>
   </metal:block>
 
