Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt	(revision 306)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt	(revision 309)
@@ -96,5 +96,5 @@
     <strong tal:content="info/long_title|info/title_or_id">ID</strong></a></td>
   <td align="right">
-    <a href="dummy" tal:attributes="href string:${item/absolute_url}/faculty_edit_form">[edit]</a></td>
+    <a href="dummy" tal:attributes="href string:${item/absolute_url}/academics_edit_form">[edit]</a></td>
   <td align="right" tal:condition="size_in_tabs">
     <span tal:condition="info/size|nothing" tal:content="info/size"> </span></td>
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt	(revision 306)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt	(revision 309)
@@ -10,7 +10,7 @@
 
 <metal:header metal:fill-slot="header">
-  <h1 tal:content="here/title_or_id">
+  <h3 tal:content="here/LongTitle|here/title_or_id">
     Page Title
-  </h1>
+  </h3>
   <div tal:condition="nothing" id="bylineFolder"
     class="ddefault">
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_edit.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_edit.py	(revision 309)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_edit.py	(revision 309)
@@ -0,0 +1,57 @@
+## Script (Python) "cpsdocument_edit"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cluster=None, cpsdocument_edit_and_view_button=None, action=None
+##title=
+##
+# $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
+
+# Until ajax posts directly to its own script...
+if 'ajax_edit' in REQUEST.form:
+    return context.academics_edit_ajax(REQUEST, cluster=cluster)
+
+# 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', 'cpsdocument_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_changedddd'
+    args = {}
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+
+args['portal_status_message'] = psm
+url = context.absolute_url() + action + '?' + urlencode(args)
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_ajax.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_ajax.py	(revision 309)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_ajax.py	(revision 309)
@@ -0,0 +1,46 @@
+## Script (Python) "cpsdocument_edit_ajax"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cluster=None
+##title=
+##
+# $Id: cpsdocument_edit_ajax.py 45956 2006-05-26 15:14:03Z tziade $
+"""
+Called when a document form is posted for AJAX validation.
+
+Returns the validation result and the rendered page in an XML-RPC response.
+"""
+from Products.CPSDocument.utils import cleanAjaxParams
+
+# cleaning incoming params
+cleanAjaxParams(REQUEST)
+
+doc = context.getContent()
+res = doc.renderEditDetailed(request=REQUEST, proxy=context, cluster=cluster)
+layout, is_valid = str(res[0]), res[1]
+
+# AJAX tries to change the doc and just needs to know if there were errors
+# for feedback without a new form rendering.
+# XXX TODO: avoid here an extra HTML rendering
+# by calling renderEditDetailed() with the right parameters
+
+# At this time we do XML-RPC answers.
+# We'll see later how to automate it to avoid a manual serialization here.
+if is_valid and 'cpsdocument_edit_and_view_button' in REQUEST:
+    action = 'view'
+else:
+    action = ''
+
+REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
+REQUEST.RESPONSE.setHeader('Cache-Control', 'no-cache')
+response = '<?xml version="1.0" encoding="utf-8" ?>'
+response += '<ajax-response>'
+response += '<result>%s</result>' % str(bool(is_valid))
+response += '<layout><![CDATA[%s]]></layout>' % layout
+response += '<action>%s</action>' % action
+response += '</ajax-response>'
+
+return response
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_buttons.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_buttons.pt	(revision 309)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_buttons.pt	(revision 309)
@@ -0,0 +1,40 @@
+<metal:block define-macro="buttons">
+  <input type="submit" name="cpsdocument_edit_button"
+         class="standalone" value="button_change"
+         id="cpsdocument_edit_button"
+         i18n:attributes="value"
+         tal:condition="not:creation" />
+  <input type="submit" name="cpsdocument_edit_and_view_button"
+         class="standalone" value="button_change_and_view"
+         id="cpsdocument_edit_and_view_button"
+         i18n:attributes="value"
+         tal:condition="not:creation" />
+  <input type="submit" name="cpsdocument_create_button"
+         class="standalone" value="button_create"
+         i18n:attributes="value"
+         id="cpsdocument_create_button"
+         tal:condition="creation" />
+  <tal:block define="
+      use_ajax use_ajax|python:True;
+      content_changed python:cpsmcat('psm_content_changed');
+      content_error python:cpsmcat('psm_content_error');
+      working python:cpsmcat('psm_ajax_working')"
+             condition="python:edition and use_ajax">
+    <script type="text/javascript"
+            tal:content="string:
+    // unobtrusive form controller, that leaves the form accessible
+    var editor = new CPSDocumentEditor(
+                        'editForm',
+                        $$('editForm').action,
+                        'editForm',
+                        new Array('cpsdocument_edit_button'),
+                        new Array('cpsdocument_edit_and_view_button'),
+                        'page_title',
+                        {content_changed: '${content_changed}',
+                         working: '${working}',
+                         content_error: '${content_error}'},
+                         null,
+                         new Array('addwidget_button'));">
+    </script>
+  </tal:block>
+</metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_form.pt	(revision 309)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_edit_form.pt	(revision 309)
@@ -0,0 +1,130 @@
+<tal:block define="
+    rendered_main python:here.cpsdocument_edit_render(request=request);
+    form_action string:academics_edit;
+    creation python:False;
+    edition python:True;
+    metadata metadata|nothing;
+    ">
+<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">
+      <tal:block condition="python: edition and not metadata"
+        i18n:translate="">Edit <span id="page_title" i18n:name="title"
+        tal:content="here/title_or_id">Page Title</span></tal:block>
+      <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>
+  </metal:block>
+
+  <metal:block fill-slot="main">
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <div class="group">
+        <div class="documentFields">
+          <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">
+            CONTENT
+          </div>
+        </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/academics_edit_buttons/macros/buttons"/>
+      </div>
+    </form>
+    <div id="ajax_psm" style="display:none">
+      ajax feedback
+    </div>
+  </metal:block>
+
+</metal:block>
+</metal:block>
+</tal:block>
Index: WAeUP_SRP/trunk/skins/waeup_academics/faculty_edit.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/faculty_edit.py	(revision 306)
+++ 	(revision )
@@ -1,59 +1,0 @@
-## Script (Python) "cpsdocument_edit"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=REQUEST, cluster=None, cpsdocument_edit_and_view_button=None, action=None
-##title=
-##
-# $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
-
-# Until ajax posts directly to its own script...
-if 'ajax_edit' in REQUEST.form:
-    return context.cpsdocument_edit_ajax(REQUEST, cluster=cluster)
-
-# 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', 'cpsdocument_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_changedddd'
-    args = {}
-else:
-    psm = 'psm_content_error'
-    args = getFormUidUrlArg(REQUEST)
-
-args['portal_status_message'] = psm
-#url = context.absolute_url() + action + '?' + urlencode(args)
-url = context.portal_url() + "/srp/campus/academics/"
-REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/trunk/skins/waeup_academics/faculty_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/faculty_edit_form.pt	(revision 306)
+++ 	(revision )
@@ -1,130 +1,0 @@
-<tal:block define="
-    rendered_main python:here.cpsdocument_edit_render(request=request);
-    form_action string:faculty_edit;
-    creation python:False;
-    edition python:True;
-    metadata metadata|nothing;
-    ">
-<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">
-      <tal:block condition="python: edition and not metadata"
-        i18n:translate="">Edit <span id="page_title" i18n:name="title"
-        tal:content="here/title_or_id">Page Title</span></tal:block>
-      <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>
-  </metal:block>
-
-  <metal:block fill-slot="main">
-    <form action="ACTION" method="post" id="editForm"
-          enctype="multipart/form-data" class="workflow"
-          tal:attributes="action form_action">
-      <div class="group">
-        <div class="documentFields">
-          <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">
-            CONTENT
-          </div>
-        </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"/>
-      </div>
-    </form>
-    <div id="ajax_psm" style="display:none">
-      ajax feedback
-    </div>
-  </metal:block>
-
-</metal:block>
-</metal:block>
-</tal:block>
Index: WAeUP_SRP/trunk/skins/waeup_default/getCreatableItems.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/getCreatableItems.py	(revision 306)
+++ WAeUP_SRP/trunk/skins/waeup_default/getCreatableItems.py	(revision 309)
@@ -11,7 +11,8 @@
 utool = context.portal_url
 base_url = utool.getBaseUrl()
+#return context.getPortalTypeName()
 
-##if context.getPortalTypeName() == 'Portal':
-##    return items
+if context.getPortalTypeName() == 'Portal':
+    return items
 
 content_types = context.getSortedContentTypes(allowed=1)
