Index: WAeUP_SRP/base/skins/cps_custom/changeDisplayParams.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/changeDisplayParams.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/changeDisplayParams.py	(revision 2217)
@@ -0,0 +1,52 @@
+## Script (Python) "changeDisplayParams"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: changeDisplayParams.py 486 2006-09-06 10:09:39Z joachim $
+"""
+Change the order/style of the item display within a folder.
+"""
+from Products.CMFCore.utils import getToolByName
+
+context_url = REQUEST.get('context_url', context.getContextUrl())
+
+ti = getToolByName(context, 'portal_types').getTypeInfo(context.portal_type)
+
+# Retrieve display preference from session
+display_params = REQUEST.SESSION.get('cps_display_params', {})
+
+form = REQUEST.form
+
+if form is not None:
+    # Order and direction
+    display_order = form.get('display_order')
+    # "None" means use folder ordering
+    if display_order == 'None' or not display_order:
+        sort_by = None
+        direction = None
+    else:
+        sort_by, direction = display_order.split('_')
+
+    display_params['sort_by'] = sort_by
+    display_params['direction'] = direction
+
+    # Style
+    format = form.get('display_style')
+    if format:
+        # XXX:
+        # "None" means default here whereas None means "don't change"
+        if format == 'None':
+            format = None
+        display_params['format'] = format
+
+    # Update session
+    REQUEST.SESSION['cps_display_params'] = display_params
+
+meth_id = ti.queryMethodID('view', 'folder_contents')
+redirection_url = context_url + '/' + meth_id
+REQUEST.RESPONSE.redirect(redirection_url)
Index: WAeUP_SRP/base/skins/cps_custom/content_status_modify.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/content_status_modify.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/content_status_modify.py	(revision 2217)
@@ -0,0 +1,86 @@
+## Script (Python) "content_status_modify"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=workflow_action, REQUEST=None, **kw
+##title=
+##
+# $Id: content_status_modify.py 486 2006-09-06 10:09:39Z joachim $
+"""
+FIXME: add docstring.
+"""
+
+wftool = context.portal_workflow
+
+if REQUEST is not None:
+    kw.update(REQUEST.form)
+
+comments = kw.get('comments', '')
+
+folder = context.aq_parent
+id = context.getId()
+url = None
+
+psm = 'psm_status_changed'
+
+if workflow_action in ('retract','approve'):
+    # accept, reject, ...
+    if comments:
+        del kw['comments']
+    kw['comment'] = comments
+    res = wftool.doActionFor(context, workflow_action, dest_container=context, **kw)
+    if same_type(res, ()):
+        if res[0] == 'ObjectMoved':
+            rpath = res[1]
+            url = context.portal_url()
+            if not url.endswith('/'):
+                url += '/'
+            url += rpath
+elif workflow_action != 'copy_submit':
+    # accept, reject, ...
+    if comments:
+        del kw['comments']
+    kw['comment'] = comments
+    res = wftool.doActionFor(context, workflow_action, **kw)
+    if same_type(res, ()):
+        if res[0] == 'ObjectMoved':
+            rpath = res[1]
+            url = context.portal_url()
+            if not url.endswith('/'):
+                url += '/'
+            url += rpath
+else:
+    # No section has been specified
+    # XXX We should get a list in here
+    if REQUEST and len(REQUEST.form) < 3:
+        psm = 'psm_you_must_select_sections_for_publishing'
+
+    # publishing: copy and initalize proxy into one or more sections
+    allowed_transitions = wftool.getAllowedPublishingTransitions(context)
+    for transition in allowed_transitions:
+        rpaths = kw.get(transition)
+        if rpaths:
+            if same_type(rpaths, ''):
+                rpaths = (rpaths,)
+            for rpath in rpaths:
+                wftool.doActionFor(context, workflow_action,
+                                   dest_container=rpath,
+                                   initial_transition=transition,
+                                   comment=comments)
+
+if REQUEST is not None:
+    # If the object has been deleted, we can't redirect to it.
+    if url is None:
+        if id in folder.objectIds():
+            url = context.absolute_url()
+        else:
+            url = folder.absolute_url()
+
+    if psm == 'psm_you_must_select_sections_for_publishing':
+        redirect_url = '%s/content_submit_form?%s' % (
+            url, 'portal_status_message=%s'%psm)
+    else:
+        redirect_url = '%s/?%s' % (url, 'portal_status_message=%s'%psm)
+    REQUEST.RESPONSE.redirect(redirect_url)
Index: WAeUP_SRP/base/skins/cps_custom/cpsdocument_create.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/cpsdocument_create.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/cpsdocument_create.py	(revision 2217)
@@ -0,0 +1,52 @@
+## Script (Python) "cpsdocument_create"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST, cluster=None, type_name=None
+##title=
+##
+# $Id: cpsdocument_create.py 486 2006-09-06 10:09:39Z joachim $
+"""
+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 creation form.
+
+A form uid is propagated during the redirect to uniquely identify the
+form in the session.
+"""
+from urllib import urlencode
+from Products.CMFCore.utils import getToolByName
+from Products.CPSDocument.utils import getFormUidUrlArg
+
+ti = getToolByName(context, 'portal_types').getTypeInfo(type_name)
+
+is_valid, ds = ti.validateObject(None, layout_mode='create',
+                                 request=REQUEST, context=context,
+                                 cluster=cluster, use_session=True)
+
+if is_valid:
+    meth_id = ti.queryMethodID('create_do', 'cpsdocument_create_do')
+    ob = getattr(context, meth_id)(type_name, ds.getDataModel())
+    url = ob.absolute_url()
+    meth_id = ti.queryMethodID('created', None)
+    if meth_id is not None:
+        getattr(context, meth_id)(object=ob)
+    action = ob.getTypeInfo().immediate_view
+    psm = 'psm_content_created'
+    args = {}
+else:
+    url = context.absolute_url()
+    action = 'cpsdocument_create_form'
+    psm = 'psm_content_error'
+    args = {'type_name': type_name}
+    args.update(getFormUidUrlArg(REQUEST))
+
+args['portal_status_message'] = psm
+url = url + '/' + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/base/skins/cps_custom/cpsdocument_edit.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/cpsdocument_edit.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/cpsdocument_edit.py	(revision 2217)
@@ -0,0 +1,59 @@
+## 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 1164 2006-12-31 10:32:05Z henrik $
+"""
+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)
+args = {}
+
+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_changed'
+
+else:
+    psm = 'psm_content_error'
+    args = getFormUidUrlArg(REQUEST)
+if psm:
+    args['portal_status_message'] = psm
+url = context.absolute_url() + action + '?' + urlencode(args)
+REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/base/skins/cps_custom/cpsdocument_edit_form.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/cpsdocument_edit_form.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/cpsdocument_edit_form.pt	(revision 2217)
@@ -0,0 +1,130 @@
+<tal:block define="
+    rendered_main python:here.cpsdocument_edit_render(request=request);
+    form_action string:cpsdocument_edit;
+    creation python:False;
+    edition python:True;
+    metadata metadata|nothing;
+    ">
+<metal:block define-macro="edit_form">
+<metal:block use-macro="here/main_template/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">
+    <h3 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>
+    </h3>
+    <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/base/skins/cps_custom/cpsskins_lib.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/cpsskins_lib.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/cpsskins_lib.pt	(revision 2217)
@@ -0,0 +1,25 @@
+<metal:block define-macro="portalboxgroup">
+  <tal:block condition="render_box"
+  define="padding content/padding|string:0">
+
+    <div tal:define="rendered python: content.render_cache(options=options,shield=shield, context_obj=here, enable_esi=enable_esi, boxedit=boxedit, template=template);
+                     margin here/margin|string:0"
+         tal:condition="python: rendered != ''"
+         tal:attributes="style string:text-align:${content/align};; padding:$margin"
+         tal:content="structure rendered" />
+  </tal:block>
+
+  <div class="boxGroupBoundingBox" tal:condition="not:render_box">
+    <div class="boxGroupBoxSlotTitle" i18n:domain="cpsskins">
+      <tal:block define="title string:_Slot name_" i18n:translate=""
+       content="python: mcat and mcat(title) or title" />:
+      <tal:block content="content/box_group" />
+    </div>
+    <div tal:attributes="style string:padding:${content/padding}">
+      <img tal:attributes="src python: base_url + content.getIcon(1)"
+       width="16" height="16" />
+      <tal:block content="content/title" />
+    </div>
+  </div>
+
+</metal:block>
Index: WAeUP_SRP/base/skins/cps_custom/custom.css.dtml
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/custom.css.dtml	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/custom.css.dtml	(revision 2217)
@@ -0,0 +1,93 @@
+<dtml-with stylesheet_properties>
+
+table.registration td {
+  white-space: nowrap;
+  background-color: transparent;
+  color: gray;
+}
+
+table.registration td.active{
+  white-space: nowrap;
+  color: #00C600;
+  font-weight: bold;
+}
+
+table.registration td a {
+  white-space: nowrap;
+  color: gray;
+}
+
+table.registration td a:visited {
+  white-space: nowrap;
+  color: gray;
+}
+
+table.registration td a:hover {
+  text-decoration: none;
+  white-space: nowrap;
+}
+
+table.registration td.active a {
+  white-space: nowrap;  
+  color: #00C600;
+}
+
+table.registration td.active a:visited {
+  white-space: nowrap;  
+  color: #00C600;
+}
+
+table.registration td.active a:hover {
+  text-decoration: underline;
+  white-space: nowrap;  
+}
+
+table.registration td.stopped{
+  white-space: nowrap;
+  color: red;
+  font-weight: bold;
+}
+
+table.registration td.stopped a {
+  white-space: nowrap;  
+  color: red;
+}
+
+table.registration td.stopped a:visited {
+  white-space: nowrap;  
+  color: red;
+}
+
+table.registration td.stopped a:hover {
+  text-decoration: underline;
+  white-space: nowrap;  
+}
+
+table.registration td.unsuccessful{
+  white-space: nowrap;
+  color: gray;
+  text-decoration:line-through; 
+  font-weight: bold;
+}
+
+table.registration td.unsuccessful a {
+  white-space: nowrap;  
+  color: gray;
+  text-decoration:line-through; 
+}
+
+table.registration td.unsuccessful a:visited {
+  white-space: nowrap;  
+  color: gray;
+  text-decoration:line-through; 
+}
+
+table.registration td.unsuccessful a:hover {
+  color: gray;
+  text-decoration: underline; 
+  white-space: nowrap;  
+}
+
+
+</dtml-with>
+            
Index: WAeUP_SRP/base/skins/cps_custom/folder_delete.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/folder_delete.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/folder_delete.py	(revision 2217)
@@ -0,0 +1,47 @@
+## Script (Python) "folder_delete"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=ids=[], REQUEST=None
+##title=
+##
+# $Id: folder_delete.py 2013 2007-07-12 16:12:23Z henrik $
+"""
+FIXME: add docstring.
+"""
+
+import logging
+logger = logging.getLogger('Skins.folder_delete')
+member_id = str(context.portal_membership.getAuthenticatedMember())
+
+from Products.CMFCore.utils import getToolByName
+here = context
+
+#if context.portal_type == "University":
+#    here = context.academics
+
+ti = getToolByName(here, 'portal_types').getTypeInfo(here.portal_type)
+meth_id = ti.queryMethodID('view', 'folder_contents')
+ret_url = here.absolute_url() + '/' + meth_id
+
+
+
+if ids:
+    for id in ids:
+        # XXX has to be called from here since the workflow doesn't handle the
+        # deletion yet
+        if context.portal_type == "CoursesFolder":
+            context.courses_catalog.deleteRecord(id)
+        ob = getattr(here, id)
+        from Products.CPSCore.EventServiceTool import getPublicEventService
+        evtool = getPublicEventService(here)
+        evtool.notifyEvent('workflow_delete', ob, {})
+    here.manage_delObjects(ids)
+    message = 'portal_status_message=psm_item(s)_deleted'
+else:
+    message = 'portal_status_message=psm_select_at_least_one_document'
+
+if REQUEST is not None:
+    return REQUEST.RESPONSE.redirect(ret_url + '?' + message)
Index: WAeUP_SRP/base/skins/cps_custom/functions.js.dtml
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/functions.js.dtml	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/functions.js.dtml	(revision 2217)
@@ -0,0 +1,330 @@
+<dtml-comment>
+CPS JavaScript functions
+$Id: functions.js.dtml 32288 2006-01-26 17:36:06Z tziade $
+</dtml-comment>
+
+<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/javascript' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
+</dtml-let>
+
+var msie5 = (navigator.userAgent.indexOf('MSIE 5') != -1);
+
+//************************************************************
+// Folder content
+var isSelected = false;
+
+function toggleSelect(toggleSelectButton, selectAllText, deselectAllText) {
+  formElements = toggleSelectButton.form.elements;
+
+  if (isSelected) {
+    for (i = 0; i < formElements.length; i++) {
+      formElements[i].checked = false;
+    }
+    isSelected = false;
+    toggleSelectButton.value = selectAllText;
+  } else {
+    for (i = 0; i < formElements.length; i++) {
+      formElements[i].checked = true;
+    }
+    isSelected = true;
+    toggleSelectButton.value = deselectAllText;
+  }
+}
+
+//************************************************************
+/**
+ * Toggles an element's visibility.
+ * Function to show tooltips.
+ * If your element is a span, you must use inline display instead of block
+ * XXX recognize div and span then automaticly choose the best display rule
+ */
+function toggleElementVisibility(id) {
+  element = document.getElementById(id);
+  if (element) {
+    //window.alert(element.tagName)
+    if (element.style.visibility == 'hidden') {
+      element.style.visibility = 'visible';
+      if (element.tagName == 'DIV') {
+        element.style.display = 'block';
+      } else if (element.tagName == 'SPAN') {
+        element.style.display = 'inline';
+      } else {
+        element.style.display = 'block';
+      }
+    } else {
+      element.style.visibility = 'hidden';
+      element.style.display = 'none';
+    }
+  }
+}
+
+function showElement(show, id) {
+  element = document.getElementById(id);
+  if (element) {
+    //window.alert(element.tagName)
+    if (show) {
+      element.style.visibility = 'visible';
+      if (element.tagName in ['DIV', 'P']) {
+        element.style.display = 'block';
+      } else {
+        element.style.display = 'inline';
+      }
+    } else {
+      element.style.visibility = 'hidden';
+      element.style.display = 'none';
+    }
+  }
+}
+
+//************************************************************
+function trim(s) {
+  if (s) {
+    return s.replace(/^\s*|\s*$/g, "");
+  }
+  return "";
+}
+
+//************************************************************
+function checkEmptySearch(formElem) {
+  var query = trim(formElem.SearchableText.value);
+  if (query != '') {
+    formElem.SearchableText.value = query;
+    return true;
+  }
+  formElem.SearchableText.value = query;
+  formElem.SearchableText.focus();
+  return false;
+}
+
+//************************************************************
+/**
+ * Sets focus on <input> elements that have a class attribute
+ * containing the class 'focus'.
+ * Examples:
+ * <input type="text" id="username" name="__ac_name" class="focus"/>
+ * <input type="text" id="searchableText" class="standalone giant focus"/>
+ *
+ * This function does not work on crappy MSIE5.0 and MSIE5.5.
+ */
+function setFocus() {
+  if (msie5) {
+    return false;
+  }
+  var elements = document.getElementsByTagName('input');
+  for (var i = 0; i < elements.length; i++) {
+    var nodeClass = elements[i].getAttributeNode('class');
+    //alert("nodeClass = " + nodeClass);
+    if (nodeClass) {
+      var classes = nodeClass.value.split(' ');
+      for (var j = 0; j < classes.length; j++) {
+        if (classes[j] == 'focus') {
+          elements[i].focus();
+          return true;
+        }
+      }
+    }
+  }
+}
+
+/**
+ * Validates that the input fields designated by the given ids are not empty.
+ * It returns true if all the input fields are not empty, it returns false
+ * otherwise.
+ * Example:
+ * <form onsubmit="return validateRequiredFields(['field1', 'field2'],
+ * ['Title', 'Comments'], 'are empty while they are required fields.')">
+ */
+function validateRequiredFields(fieldIds, fieldLabels, informationText) {
+  for (i = 0; i < fieldIds.length; i++) {
+    element = document.getElementById(fieldIds[i]);
+    if (element && !element.value) {
+      window.alert("'" + fieldLabels[i] + "' " + informationText);
+      return false;
+    }
+  }
+  return true;
+}
+
+//************************************************************
+function getSelectedRadio(buttonGroup) {
+  if (buttonGroup[0]) {
+    for (var i=0; i<buttonGroup.length; i++) {
+      if (buttonGroup[i].checked) {
+        return i
+      }
+    }
+  } else {
+    if (buttonGroup.checked) { return 0; }
+  }
+  return -1;
+}
+
+function getSelectedRadioValue(buttonGroup) {
+  var i = getSelectedRadio(buttonGroup);
+  if (i == -1) {
+    return "";
+  } else {
+    if (buttonGroup[i]) {
+    return buttonGroup[i].value;
+    } else {
+    return buttonGroup.value;
+    }
+  }
+}
+
+function getSelectedRadioId(buttonGroup) {
+  var i = getSelectedRadio(buttonGroup);
+  if (i == -1) {
+    return "";
+  } else {
+    if (buttonGroup[i]) {
+      return buttonGroup[i].id;
+    } else {
+      return buttonGroup.id;
+    }
+  }
+}
+
+/**
+ * Return the label content corresponding to a radio selection
+ */
+function getSelectedRadioLabel(buttonGroup) {
+  var id = getSelectedRadioId(buttonGroup);
+  if (id == "") {
+    return "";
+  } else {
+    for (var i=0; i<document.getElementsByTagName("label").length; i++) {
+      var element_label = document.getElementsByTagName("label")[i];
+      if (element_label.htmlFor == id) {
+        return element_label.firstChild.nodeValue;
+      }
+    }
+  }
+}
+
+
+//************************************************************
+/*
+    Used to highlight search terms
+    from Geir Bækholt, adapted for CPS
+
+ */
+function highlightSearchTerm() {
+  var query_elem = document.getElementById('searchGadget')
+  if (! query_elem){
+    return false
+  }
+  var query = query_elem.value
+  // _robert_ ie 5 does not have decodeURI
+  if (typeof decodeURI != 'undefined'){
+    query = unescape(decodeURI(query)) // thanks, Casper
+  }
+  else {
+    return false
+  }
+  if (query){
+    queries = query.replace(/\+/g,' ').split(/\s+/)
+    // make sure we start the right place and not higlight menuitems or breadcrumb
+    searchresultnode = document.getElementById('searchResults')
+    if (searchresultnode) {
+      for (q=0;q<queries.length;q++) {
+        // don't highlight reserved catalog search terms
+        if (queries[q].toLowerCase() != 'not'
+          && queries[q].toLowerCase() != 'and'
+          && queries[q].toLowerCase() != 'or') {
+          climb(searchresultnode,queries[q]);
+        }
+      }
+    }
+  }
+}
+
+function climb(node, word){
+  // traverse childnodes
+  if (! node){
+    return false
+  }
+  if (node.hasChildNodes) {
+    var i;
+    for (i=0;i<node.childNodes.length;i++) {
+      climb(node.childNodes[i],word);
+    }
+    if (node.nodeType == 3) {
+      checkforhighlight(node, word);
+      // check all textnodes. Feels inefficient, but works
+    }
+  }
+}
+
+function checkforhighlight(node,word) {
+  ind = node.nodeValue.toLowerCase().indexOf(word.toLowerCase())
+  if (ind != -1) {
+    if (node.parentNode.className != "highlightedSearchTerm"){
+      par = node.parentNode;
+      contents = node.nodeValue;
+      // make 3 shiny new nodes
+      hiword = document.createElement("span");
+      hiword.className = "highlightedSearchTerm";
+      hiword.appendChild(document.createTextNode(contents.substr(ind,word.length)));
+      par.insertBefore(document.createTextNode(contents.substr(0,ind)),node);
+      par.insertBefore(hiword,node);
+      par.insertBefore(document.createTextNode( contents.substr(ind+word.length)),node);
+      par.removeChild(node);
+    }
+  }
+}
+
+/************************************************************
+/**
+ * searchLanguage widget functions
+ * used to auto select languages checkbox/radio
+ * cf CPSSchemas/skins/cps_schemas/widget_searchlanguage_render.pt
+ */
+function searchLanguageCheckSelected(languages, no_language, language) {
+  var count=0;
+  for (var i=0; i<languages.length; i++) {
+    if (languages[i].checked) {
+      count++;
+    }
+  }
+  no_language.checked = (count <= 0);
+  language.checked = (count > 0);
+}
+
+function searchLanguageClearSelected(languages) {
+  for (i=0; i<languages.length; i++) {
+    languages[i].checked = 0;
+  }
+}
+
+function toggleLayers(more_block, more_items) {
+  var objMoreBlock = document.getElementById(more_block).style;
+  var objMoreItems = document.getElementById(more_items).style;
+  if(objMoreBlock.display == "block")
+    objMoreBlock.display = "none";
+  if(objMoreItems.display == "none")
+    objMoreItems.display = "block";
+}
+
+/************************************************************
+/**
+ * waeup specific functions
+ */
+
+/**
+ * submit_once(): Avoid multiple sendings of forms...
+ */
+
+submitted = false;
+function submit_once() {
+    if (submitted) {
+        alert("Your request is being processed.\nPlease be patient.");
+        event.returnValue = 0;    // work-around for IE
+        return 0;
+    }
+    submitted = true;
+    return 1;
+}
Index: WAeUP_SRP/base/skins/cps_custom/getBatchList.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/getBatchList.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/getBatchList.py	(revision 2217)
@@ -0,0 +1,106 @@
+## Script (Python) "getBatchList"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=items=[], columns=1, items_per_page=10, zoom=0, max_items=400
+##title=
+##
+# $Id: getBatchList.py 486 2006-09-06 10:09:39Z joachim $
+"""
+Given the desired number of colums, constructs a list of batches to render
+as much columns as necessary within a single macro.
+As well, return the page results link to display straight for the navigation
+"""
+
+from math import ceil
+from ZTUtils import Batch
+
+#
+# First constructing the batch
+#
+
+len_items = len(items)
+
+# desperately empty, no need to go further
+if not len_items:
+    return [], {}, []
+
+if max_items and max_items < len_items:
+    items = items[:max_items]
+    len_batch = max_items
+else:
+    len_batch = len_items
+
+b_start = int(context.REQUEST.get('b_start', 0))
+
+# extract the n first items in a zoomed list
+zoomed = []
+if not b_start and zoom:
+    zoom = int(zoom)
+    zoomed = Batch(items[:zoom], zoom, 0)
+    # deal with items left
+    items = items[zoom:]
+
+items_per_page = float(items_per_page)
+size = int(ceil(items_per_page / columns))
+
+b1 = Batch(items, size, b_start, orphan=0)
+batches = [b1]
+
+b_next = b1
+for c in range(columns - 1):
+    if b_next.next:
+        b_next = b_next.next
+        batches.append(b_next)
+
+#
+# Now the page results parameters
+#
+
+# Calculate the number of pages
+nb_pages = int(ceil(len_batch / items_per_page))
+
+# no more advanced arithmetics
+items_per_page = int(items_per_page)
+
+# Test if we are on the last page
+limit = b_start + items_per_page
+if  limit > len_batch:
+    limit = len_batch
+
+batch_info = {'nb_pages': nb_pages,
+              'start': b_start + 1,
+              'limit': limit,
+              'length': len_items,
+              'previous': None,
+              'next': None,
+              }
+
+# for the nb of items
+j = 0
+# for the current position in the search
+current = [0, 1]
+# list of b_start values
+pages = []
+
+# Loop over the number of pages and construct the page link
+for i in range(nb_pages):
+    pages.append(j)
+    if b_start == j:
+        current = [i + 1, j]
+    j += items_per_page
+
+# list of b_start to other pages
+batch_info['pages'] = pages
+
+# if we are not at the beginning of the file
+if current[0] > 1:
+    batch_info['previous'] = current[1] - items_per_page
+
+# Adding the next link if we are not at the end of the list
+if current[0] != nb_pages:
+    batch_info['next'] = current[1] + items_per_page
+
+return batches, batch_info, zoomed
Index: WAeUP_SRP/base/skins/cps_custom/getCPSCandidateLocalRoles.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/getCPSCandidateLocalRoles.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/getCPSCandidateLocalRoles.py	(revision 2217)
@@ -0,0 +1,27 @@
+## Script (Python) "getCPSCandidateLocalRoles"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getCPSCandidateLocalRoles.py 1515 2007-03-03 11:45:58Z henrik $
+"""
+XXX content moved into portal_membership
+
+Override this template if you have new portal types or new roles with a
+specific mapping to register.
+"""
+from Products.CMFCore.utils import getToolByName
+mtool = getToolByName(context, 'portal_membership')
+member = mtool.getAuthenticatedMember()
+
+
+allowed_roles = mtool.getCPSCandidateLocalRoles(context)
+
+
+if member.id in ("admin","perry"):
+    return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
+return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
Index: WAeUP_SRP/base/skins/cps_custom/getContentInfo.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/getContentInfo.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/getContentInfo.py	(revision 2217)
@@ -0,0 +1,337 @@
+## Script (Python) "getContentInfo"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=proxy=None, doc=None, level=0, cpsmcat=None
+##title=
+##
+# $Id: getContentInfo.py 486 2006-09-06 10:09:39Z joachim $
+"""
+Return information about a content item (ie a proxy)
+
+level: 0 (default cost 1)
+  id, title, title_or_id, review_state, icon, rev, lang, type
+  time_str, creator, rpath, url
+level: 1 (cost 1.3)
+  level 0 + descr, size + doc + additional information from obj
+level: 2 (cost 4.6)
+  level 1 + states
+level: 3 (cost 7)
+  level 2 + history
+level: 4 (cost ???)
+  level 3 + archived
+"""
+
+from zLOG import LOG, DEBUG
+from Products.CMFCore.utils import getToolByName
+from AccessControl import Unauthorized
+
+# how many characters for the description
+DESCRIPTION_MAX_LENGTH = 150
+
+if cpsmcat is None:
+    cpsmcat = context.translation_service
+
+if proxy is None:
+    proxy = context
+
+wtool = getToolByName(context, 'portal_workflow')
+utool = getToolByName(context, 'portal_url')
+ptool = getToolByName(context, 'portal_proxies')
+mtool = getToolByName(context, 'portal_membership')
+portal = utool.getPortalObject()
+
+rpath = None
+if hasattr(proxy.aq_explicit, 'getRID'):
+    # this is a brain
+    # rpath is build with catalog path that include languageView selection
+
+    # FIXME: something is broken here when using virtual host monsters
+    rpath = utool.getRpathFromPath(proxy.getPath())
+
+    # change view to switch to have a sticky behaviour
+    from Products.CPSCore.utils import KEYWORD_SWITCH_LANGUAGE, \
+         KEYWORD_VIEW_LANGUAGE
+    rpath = rpath.replace(KEYWORD_VIEW_LANGUAGE, KEYWORD_SWITCH_LANGUAGE)
+    proxy = proxy.getObject()
+
+bmt = getattr(portal, 'Benchmarktimer', None)
+if bmt is not None:
+    bmt = bmt('getContentInfo for ' + proxy.getId(), level=-3)
+    bmt.setMarker('start')
+
+def getRpathTitle(rpath):
+    """Get object's title, or None if Unauthorized or nonexisting."""
+    try:
+        ob = portal.restrictedTraverse(rpath, None)
+        if ob is None:
+            return None
+        return ob.Title()
+    except Unauthorized:
+        return None
+
+
+def compute_states(no_history=0):
+    wf_vars = ['review_state', 'time']
+    docid = proxy.getDocid()
+    if docid:
+        proxies_info = ptool.getProxyInfosFromDocid(docid,
+                                                    workflow_vars=wf_vars)
+    else:
+        # Not a proxy
+        ob_info = {
+            'rpath': utool.getRpath(proxy),
+            'language_revs': {'en': 0},
+            'visible': mtool.checkPermission('View', proxy),
+            }
+        for var in wf_vars:
+            ob_info[var] = wtool.getInfoFor(proxy, var, None)
+        proxies_info = [ob_info]
+    states = []
+    for proxy_info in proxies_info:
+        # take in account only accessible proxies
+        if not proxy_info['visible']:
+            continue
+
+        lrpath = proxy_info['rpath'].split('/')
+        folder_rpath = '/'.join(lrpath[:-1])
+        folder_title = getRpathTitle(folder_rpath)
+        if not folder_title:
+            # Unauthorized
+            if len(lrpath) > 1:
+                folder_title = lrpath[-2]
+            else:
+                folder_title = '?'
+
+        proxy_info_proxy = None
+        portal_type = None
+        if proxy_info.has_key('object'):
+            proxy_info_proxy = proxy_info['object']
+            if hasattr(proxy_info_proxy, 'portal_type'):
+                portal_type = proxy_info_proxy.portal_type
+
+        d = {'rpath': folder_rpath,
+             'title': folder_title,
+             'type': portal_type,
+             'review_state': proxy_info['review_state'],
+             'rev': str(proxy_info['language_revs'].values()[0]),
+             'language': proxy_info['language_revs'].keys()[0],
+             'time': proxy_info['time'],
+             'time_str': context.getDateStr(proxy_info['time']),
+             'proxy': proxy_info_proxy,
+             }
+        d['lang'] = d['language']       # for compatibility
+        states.append(d)
+
+    history = []
+    if not no_history:
+        review_history = wtool.getFullHistoryOf(proxy)
+        if not review_history:
+            review_history = wtool.getInfoFor(proxy, 'review_history', ())
+            remove_redundant = 0
+        else:
+            remove_redundant = 1
+        for d in review_history:
+            if not (d.has_key('actor')
+                    and d.has_key('time')
+                    and d.has_key('action')):
+                continue
+            action = d['action']
+            # Internal transitions hidden from the user.
+            if action in ('unlock', 'checkout_draft_in'):
+                continue
+            # Skip redundant history (two transition when publishing).
+            if action == 'copy_submit' and remove_redundant:
+                continue
+            # Transitions involving a destination container.
+            if action in ('submit', 'copy_submit'):
+                d['has_dest'] = 1
+                dest_container = d.get('dest_container') or '?'
+                d['dest_container'] = dest_container
+                dest_title = getRpathTitle(dest_container)
+                if not dest_title:
+                    # Unauthorized
+                    dest_title = dest_container.split('/')[-1]
+                d['dest_title'] = dest_title
+            d['time_str'] = context.getDateStr(d['time'])
+            history.append(d)
+
+    def cmp_rs(a, b):
+        return -cmp(a['review_state'], b['review_state'])
+    states.sort(cmp_rs)
+
+    def cmp_date(a, b):
+        return -cmp(a['time'], b['time'])
+    history.sort(cmp_date)
+
+    return states, history
+
+def compute_archived():
+    archived = proxy.getArchivedInfos()
+    # Keep only frozen revisions.
+    archived = [d for d in archived if d['is_frozen']]
+    archived.reverse()
+    for d in archived:
+        d['time_str'] = context.getDateStr(d['modified'])
+    return archived
+
+# basic information level 0
+info = {}
+if rpath is None:
+    info['rpath'] = utool.getRpath(proxy)
+else:
+    info['rpath'] = rpath
+
+info['url'] = utool.getUrlFromRpath(info['rpath'])
+
+info['title_or_id'] = proxy.id
+info['id'] = proxy.getId()
+try:
+    info['title'] = proxy.Title() #proxy.Title()
+except AttributeError:
+    raise AttributeError, 'invalid object: %s in %s' % (info['title_or_id'],
+                                                             info['rpath'])
+except TypeError:
+    info['title'] = proxy.getContent().id
+
+info['icon'] = proxy.getIcon(relative_to_portal=1)
+info['type'] = proxy.getPortalTypeName()
+
+if proxy.getTypeInfo() is not None:
+    info['type_l10n'] = cpsmcat(proxy.getTypeInfo().Title())
+else:
+##    LOG("getContentInfo() pb getting Type Information",
+##        DEBUG,
+##        'Proxy :',
+##        proxy)
+    info['type_l10n'] = ''
+info['review_state'] = wtool.getInfoFor(proxy, 'review_state', '')
+try:
+    info['rev'] = str(proxy.getRevision())
+    info['lang'] = proxy.getLanguage()
+except AttributeError:
+    # not a proxy
+    # FIXME: default lang should not be hardcoded
+    info['rev'] = '0'
+    info['lang'] = 'en'
+info['time'] = proxy.modified()
+
+# level 1
+if level > 0:
+    if doc is None:
+        doc = proxy.getContent()
+    if doc.portal_type == 'Course':
+        info['credits'] = doc.credits
+        info['semester'] = doc.semester
+        info['passmark'] = doc.passmark
+    elif doc.portal_type == 'CertificateCourse':
+        core = 'core'
+        if not doc.core_or_elective:
+            core = 'elective'
+        info['core_or_elective'] = core
+    elif doc.portal_type == 'Student':
+        try:
+            info['clearance'] = proxy.clearance.getContent()
+        except AttributeError:
+            info['clearance'] = None
+    info['time'] = doc.modified()
+    info['doc'] = doc
+    if hasattr(doc,"LongTitle"):
+        info['long_title'] = doc.LongTitle()
+    description = doc.Description() or ''
+    if len(description) > DESCRIPTION_MAX_LENGTH:
+        description = description[:DESCRIPTION_MAX_LENGTH] + '...'
+    info['description'] = description
+    if hasattr(doc.aq_explicit, 'get_size'):
+        try:
+            size = doc.get_size()
+        except:
+            size = 0
+        if size and size < 1024:
+            info['size'] = '1 K'
+        elif size > 1048576:
+            info['size'] = '%.02f M' % float(size/1048576.0)
+        elif size:
+            info['size'] = str(int(size)/1024)+' K'
+
+    if hasattr(doc.aq_explicit, 'start'):
+        if callable(doc.start):
+            start = doc.start()
+        else:
+            start = doc.start
+        if start:
+            info['start'] = start
+            info['start_str'] = context.getDateStr(start)
+
+    if hasattr(doc.aq_explicit, 'end'):
+        if callable(doc.end):
+            end = doc.end()
+        else:
+            end = doc.end
+        if end:
+            info['end'] = end
+            info['end_str'] = context.getDateStr(end)
+
+    for dc in ('Creator', 'Rights', 'Language',
+               'contributors', 'source', 'relation', 'coverage'):
+        key = dc.lower()
+        if key == 'contributors':
+            key = 'contributor'         # this is the real DC name
+        try:
+            meth = getattr(doc, dc)
+            if callable(meth):
+                value = meth()
+            else:
+                value = meth
+            if value and not same_type(value, ''):
+                value = ', '.join(value)
+            info[key] = value
+        except:
+            info[key] = ''
+
+    if hasattr(doc.aq_explicit, 'hidden_folder'):
+        info['hidden'] = doc.hidden_folder
+    else:
+        info['hidden'] = 0
+
+    if hasattr(doc.aq_explicit, 'getAdditionalContentInfo'):
+        add_info = doc.getAdditionalContentInfo(proxy)
+        info.update(add_info)
+
+    if info['review_state'] == 'published':
+        now = context.ZopeTime()
+        eff = doc.effective()
+        exp = doc.expires()
+        if now < eff:
+            info['review_state'] = 'deferred'
+            info['review_state_date'] = context.getDateStr(eff)
+        elif now > exp:
+            info['review_state'] = 'expired'
+            info['review_state_date'] = context.getDateStr(exp)
+
+# level 2
+if level == 2:
+    info['states'], ignore = compute_states(1)
+
+# level 3
+if level >= 3:
+    info['states'], info['history'] = compute_states()
+
+# level 4
+if level >= 4:
+    info['archived'] = compute_archived()
+
+info['level'] = level
+if info['time']:
+    info['time_str'] = context.getDateStr(info['time'])
+else:
+    info['time_str'] = ''
+
+
+if bmt is not None:
+    bmt.setMarker('stop')
+    bmt.saveProfile(context.REQUEST)
+
+return info
Index: WAeUP_SRP/base/skins/cps_custom/getCreatableItems.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/getCreatableItems.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/getCreatableItems.py	(revision 2217)
@@ -0,0 +1,29 @@
+## Script (Python) "getCreatableItems"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+items = []
+utool = context.portal_url
+base_url = utool.getBaseUrl()
+#return context.getPortalTypeName()
+
+if context.getPortalTypeName() == 'Portal':
+    return items
+
+content_types = context.getSortedContentTypes(allowed=1)
+renderIcon = context.portal_cpsportlets.renderIcon
+
+for ptype in content_types:
+    ptype_id = ptype.getId()
+    items.append({
+        'title': ptype.Title(),
+        'id': ptype_id,
+        'icon_tag': renderIcon(ptype_id, base_url, '')
+    })
+
+return items
Index: WAeUP_SRP/base/skins/cps_custom/getCustomDisplayParams.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/getCustomDisplayParams.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/getCustomDisplayParams.py	(revision 2217)
@@ -0,0 +1,44 @@
+## Script (Python) "getCustomDisplayParams"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id: getCustomDisplayParams.py 1968 2007-06-26 09:47:37Z henrik $
+"""
+FIXME: docstring?
+"""
+if context.isInWorkspace():
+    custom_params = {'format': 'detail_tab',
+                     'sort_by': None,
+                     'direction': 'asc',
+                     'items_per_page': 50,
+                     'nav_action': 'folder_view',
+                     'filter': 0,
+                     'detail_tab_columns': ['title', 'type', 'size', 
+                                'date', 'author','status', 'version'],
+                    }
+
+else:
+    custom_params =  {'format': None,
+                      'sort_by': None,
+                      'direction': 'asc',
+                      'items_per_page': 100,
+                      'nav_action': 'folder_view',
+                      'filter': 0,
+                      'detail_tab_columns': ['long_title',
+                                             'id',
+                                              #'typetext',
+                                              #'size',
+                                              #'date', 
+                                              #'author', 
+                                              'status', 
+                                              #'version'
+                                              ],
+                     }
+
+return custom_params
+
Index: WAeUP_SRP/base/skins/cps_custom/getDateStr.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/getDateStr.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/getDateStr.py	(revision 2217)
@@ -0,0 +1,84 @@
+## Script (Python) "getDateStr"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=dt=None, fmt='medium'
+##title=
+##
+# $Id: getDateStr.py 1868 2007-06-08 10:30:01Z joachim $
+"""
+Return a string date using the current locale.
+"""
+
+# TODO: don't call Localizer directly
+
+from DateTime.DateTime import DateTimeError
+
+if not dt:
+    return ''
+if fmt in ('iso8601_medium',):
+    dfmt = '%Y-%m-%dT%H:%MZ'
+elif fmt in ('medium','iso8601_medium_easy'):
+    dfmt = '%Y-%m-%d %H:%M'
+elif fmt in ('iso8601_short', 'iso8601'):
+    dfmt = '%Y-%m-%d'
+elif fmt == 'iso8601_long':
+    dfmt = '%Y-%m-%dT%H:%M:%SZ'
+elif fmt == 'iso8601_long_easy':
+    dfmt = '%Y-%m-%d %H:%M:%S'
+else:
+    dfmt = fmt
+try:
+    ret = dt.strftime(dfmt)
+    # XXX remove this as soon as strftime is fixed
+    # space hack to fix %p strftime bug when LC_ALL=fr_FR
+    if (dfmt.endswith('%p') and not ret.endswith('M')):
+        h = int(dt.strftime('%H'))
+        if h > 12:
+            ret += ' PM'
+        else:
+            ret += ' AM'
+except (DateTimeError,ValueError):
+    ret = 'Invalid'
+    
+return ret
+
+
+mcat = context.translation_service
+
+if fmt in ('short', 'medium', 'long'):
+    # This string will be used to retrieve format in the right .po file
+    fmt = 'date_' + fmt
+# For iso8601 dates read http://www.w3.org/TR/NOTE-datetime
+elif fmt not in ('iso8601', 'iso8601_short', 'iso8601_medium', 'iso8601_long',
+                 'iso8601_medium_easy', 'iso8601_long_easy'):
+    fmt = 'iso8601_medium_easy'
+
+try:
+    if fmt == 'iso8601_short' or fmt == 'iso8601':
+        dfmt = '%Y-%m-%d'
+    elif fmt == 'iso8601_medium':
+        dfmt = '%Y-%m-%dT%H:%MZ'
+    elif fmt == 'iso8601_medium_easy':
+        dfmt = '%Y-%m-%d %H:%M'
+    elif fmt == 'iso8601_long':
+        dfmt = '%Y-%m-%dT%H:%M:%SZ'
+    elif fmt == 'iso8601_long_easy':
+        dfmt = '%Y-%m-%d %H:%M:%S'
+    else:
+        dfmt = mcat(fmt)
+    ret = dt.strftime(dfmt)
+    # XXX remove this as soon as strftime is fixed
+    # space hack to fix %p strftime bug when LC_ALL=fr_FR
+    if (dfmt.endswith('%p') and not ret.endswith('M')):
+        h = int(dt.strftime('%H'))
+        if h > 12:
+            ret += ' PM'
+        else:
+            ret += ' AM'
+except DateTimeError:
+    ret = 'Invalid'
+
+return ret
Index: WAeUP_SRP/base/skins/cps_custom/logged_in.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/logged_in.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/logged_in.py	(revision 2217)
@@ -0,0 +1,188 @@
+## Script (Python) "logged_in"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+"""Prepare user login
+modified from cps_default/logged_in.py
+
+$Id: logged_in.py 1933 2007-06-19 05:05:29Z henrik $
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import DateTime
+current = DateTime.DateTime()
+import logging
+logger = logging.getLogger('Skins.logged_in')
+
+
+from urllib import unquote
+
+request = context.REQUEST
+response = request.RESPONSE
+utool = context.portal_url
+mtool = context.portal_membership
+wftool = context.portal_workflow
+portal = utool.getPortalObject()
+
+redirect_to_portal = False
+is_anon = mtool.isAnonymousUser()
+member = mtool.getAuthenticatedMember()
+#load_passport = hasattr(context.waeup_tool,'loadStudentFoto')
+
+if not is_anon:
+    if "Student" in member.getRoles():
+        to_waeup_student_home = True
+        students = context.portal_url.getPortalObject().campus.students
+        student = getattr(students,str(member))
+        student_app = getattr(student,'application',None)
+        student_per = getattr(student,'personal',None)
+        if request.has_key('returning') and  student_app is None:
+            email=request.get("email")
+            phone=request.get("phone_nr")
+            context.waeup_tool.makeStudentData(str(member),
+                                                   email=email,
+                                                   phone_nr=phone,
+                                                   )
+            #d = {}
+            #d['id'] = str(member)
+            #d['email'] = email
+            #d['phone'] = phone
+            #context.students_catalog.modifyRecord(**d)
+        elif student_app is None:
+            context.waeup_tool.makeStudentData(str(member))
+        student_app = getattr(student,'application',None)
+        if 'payments' not in student.objectIds():
+            student.invokeFactory('PaymentsFolder','payments')
+            payments = getattr(student,'payments')
+            wftool.doActionFor(payments,'open')
+            d = {}
+            d['Title'] = 'Online Payments'
+            payments.getContent().edit(mapping=d)
+        student_pume = getattr(student,'pume',None)
+        s_review_state = context.getStudentReviewState(student.id)
+        a_review_state = wftool.getInfoFor(student_app,'review_state',None)
+        student_per = getattr(student,'personal',None)
+        p_review_state = wftool.getInfoFor(student_per,'review_state',None)
+        logger.info('%s logged in, review_state %s' % (member,s_review_state))
+        app_doc = student_app.getContent()
+
+        if request.has_key('returning'):
+            email=request.get("email")
+            phone=request.get("phone_nr")
+            # should be always closed, however ...
+            if a_review_state != 'opened':
+                wftool.doActionFor(student_app,'open')
+            # should be always opened after import, however ...
+            if p_review_state != 'opened':
+                wftool.doActionFor(student_per,'open')
+            per_doc = student_per.getContent()
+            app_doc.edit(mapping = {'app_email' : email})
+            per_doc.edit(mapping = {'email' : email, 'phone' : phone})
+            wftool.doActionFor(student_app,'close')
+
+        #from Products.zdb import set_trace;set_trace()
+        if s_review_state == 'returning' and 'passport' not in app_doc.objectIds():
+            folder = 'pictures_returning'
+            res = context.students_catalog(id = str(member))
+            filename = res[0].matric_no.upper()
+            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
+            logger.info('%s (%s), %s' % (member,s_review_state,msg))
+        if s_review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested')  and 'passport' not in app_doc.objectIds():
+            folder = 'pictures_admitted_latest'
+            filename = app_doc.jamb_reg_no.replace('/','_')
+            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
+            logger.info('%s (%s), %s' % (member,s_review_state,msg))
+        if s_review_state in ("student_created","admitted") and\
+                             a_review_state == 'created' :
+            wftool.doActionFor(student_app,'open')
+            if student_pume is not None:
+              wftool.doActionFor(student_pume,'close')
+            da = {}
+            pin = request.get('pin')
+            if not pin:
+                jamb_reg_no = app_doc.jamb_reg_no
+                for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
+                    res = context.portal_pins(student=reg_no)
+                    if len(res) > 0:
+                        break
+                if len(res) > 0:
+                    p = res[0].pin
+                    if len(p) > 10:
+                        pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
+                    else:
+                        pin = p
+            da['app_ac_pin'] = pin
+            da['app_ac_date'] = current
+            app_doc.edit(mapping = da)
+        elif s_review_state in ("admitted") and a_review_state == 'opened' and\
+                                            not app_doc.app_ac_pin:
+            jamb_reg_no = app_doc.jamb_reg_no
+            for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
+                res = context.portal_pins(student=reg_no)
+                if len(res) > 0:
+                    break
+            if len(res) > 0:
+                p = res[0].pin
+                if len(p) > 10:
+                    pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
+                else:
+                    pin = p
+                da = {}
+                da['app_ac_pin'] = pin
+                app_doc.edit(mapping = da)
+        elif s_review_state in ("cleared_and_validated",) and\
+                             p_review_state == 'created' :
+            wftool.doActionFor(student_per,'open')
+        res = context.students_catalog(id = str(member))
+        matric_no = res[0].matric_no
+        verdict = res[0].verdict
+        if s_review_state in ('returning','school_fee_paid') and not verdict:
+            results = context.results_import(matric_no = matric_no)
+            if results:
+                study_course = getattr(student,'study_course')
+                sc_review_state = wftool.getInfoFor(study_course,'review_state',None)
+                dsc = {}
+                dsc['current_verdict'] = context.getVerdict(results[0].Verdict)[0]
+                if sc_review_state != 'opened':
+                    wftool.doActionFor(study_course,'open')
+                study_course_doc =study_course.getContent()
+                study_course_doc.edit(mapping = dsc)
+                wftool.doActionFor(study_course,'close_for_edit')
+        has_results = context.results_import(matric_no = matric_no)
+        if s_review_state == "application_pin_entered":
+            redirect_url = "%s/application_edit_form" % student.absolute_url()
+        elif s_review_state in ('admitted', 'objection_raised',):
+            redirect_url = "%s/admission_form" % student.absolute_url()
+        elif s_review_state == "clearance_pin_entered":
+            redirect_url = "%s/clearance_edit_form" % student.absolute_url()
+        elif s_review_state == "cleared_and_validated":
+            redirect_url = "%s/personal_edit_form" % student.absolute_url()
+        elif s_review_state == "returning" and has_results:
+            redirect_url = "%s/session_results_view" % student.absolute_url()
+        elif s_review_state in ('school_fee_paid','courses_registered'):
+            redirect_url = "%s/study_course/study_course_view" % student.absolute_url()
+        else:
+            redirect_url = "%s/student_index" % student.absolute_url()
+    else:
+        logger.info('%s logged in' % (member))
+        redirect_url = portal.absolute_url()
+#Anonymous
+else:
+    response.expireCookie('__ac', path='/')
+    return context.user_logged_in_failed()
+
+# Setup skins
+if (getattr(utool, 'updateSkinCookie', False) and
+    utool.updateSkinCookie()):
+    context.setupCurrentSkin()
+
+response.redirect(redirect_url)
+
Index: WAeUP_SRP/base/skins/cps_custom/logout.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/logout.py	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/logout.py	(revision 2217)
@@ -0,0 +1,24 @@
+## Script (Python) "logout"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=Logout handler
+##
+# notify the event service that the user has logged out
+import logging
+logger = logging.getLogger('Skins.logout')
+user = context.portal_membership.getAuthenticatedMember()
+if user:
+    from Products.CPSCore.EventServiceTool import getPublicEventService
+    evtool = getPublicEventService(context)
+    evtool.notifyEvent('user_logout', user, {})
+    logger.info('%s logged out' % (user))
+
+REQUEST = context.REQUEST
+if REQUEST.has_key('portal_skin'):
+    context.portal_skins.clearSkinCookie()
+REQUEST.RESPONSE.expireCookie('__ac', path='/')
+return REQUEST.RESPONSE.redirect(REQUEST.URL1+'/logged_out')
Index: WAeUP_SRP/base/skins/cps_custom/msie.css.dtml
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/msie.css.dtml	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/msie.css.dtml	(revision 2217)
@@ -0,0 +1,28 @@
+/*
+Internet Explorer CSS customization.
+This file is used and read *only* by MSIE through the use of a MSIE conditional
+comment. This is the place to put instructions to correct the rendering problems
+specific to MSIE.
+
+$Id: msie.css.dtml 805 2006-11-09 09:38:29Z joachim $
+*/
+
+<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/css' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
+<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
+</dtml-let>
+
+/*
+The MSIE PNG behavior is disabled by default but kept here in case you need it.
+This MSIE behavior was supposed to work for MSIE >= 5.5, but *some* versions of
+MSIE 5.5 have problems with it. So feel free to use it back again if your
+visitors do not use MSIE 5.5 or when MSIE 5.5 becomes history.
+*/
+
+
+img {
+  behavior: url(pngbehavior.htc);
+}
+
Index: WAeUP_SRP/base/skins/cps_custom/standard_error_message.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/standard_error_message.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/standard_error_message.pt	(revision 2217)
@@ -0,0 +1,61 @@
+<metal:html tal:define="showthirdcol nothing;
+                        error_type options/error_type|nothing;
+                        error_value options/error_value|nothing;
+                        error_message options/error_message|nothing;
+                        error_tb options/error_tb|nothing;
+                        error_traceback options/error_traceback|nothing;
+                        error_log_url options/error_log_url|nothing;
+                        p_props here/portal_properties;
+                       ">
+<tal:Anauthorized condition="python:error_type == 'Unauthorized'">
+    <metal:block use-macro="here/error_not_found/macros/not_found" />
+</tal:Anauthorized>
+
+<tal:Anauthorized condition="python:error_type != 'Unauthorized'">
+<metal:body use-macro="here/main_template/macros/master">
+
+<metal:main fill-slot="main">
+
+    
+<tal:haserror condition="error_type">
+  <tal:NotFound condition="python:error_type == 'NotFound'">
+    <metal:block use-macro="here/error_not_found/macros/not_found" />
+  </tal:NotFound>
+
+  <tal:default condition="python:error_type != 'NotFound'">
+    <metal:block use-macro="here/error_other/macros/other" />
+  </tal:default>
+
+  <tal:debugging condition="python:checkPerm('Manage portal', here)">
+    <table width="100%" cellpadding="2" cellspacing="2">
+      <tr>
+        <th width="10%">Error Type:</th>
+        <td tal:content="error_type"></td>
+      </tr>
+      <tr>
+        <th>Error Value:</th>
+        <td><pre tal:content="structure error_value" /></td>
+      </tr>
+      <tr>
+        <th>Traceback:</th>
+        <td><pre tal:content="structure error_traceback" /></td>
+      </tr>
+    </table>
+    <hr />
+    <pre tal:content="structure request" />
+    <hr />
+    <a href="" tal:condition="python:error_log_url"
+               tal:attributes="href error_log_url">
+      Show Error Log Entry
+    </a>
+  </tal:debugging>
+</tal:haserror>
+
+<tal:hasnoerror tal:condition="not:error_type">
+Sorry, an error occurred. 
+</tal:hasnoerror>
+
+</metal:main>
+</metal:body>
+</tal:Anauthorized>
+</metal:html>
Index: WAeUP_SRP/base/skins/cps_custom/stylesheet_properties.props
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/stylesheet_properties.props	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/stylesheet_properties.props	(revision 2217)
@@ -0,0 +1,159 @@
+# TODO: I want comments in this file!
+
+plone_skin:string=Nuxeo CPS Default
+
+mainFont:string=70% Arial, sans-serif, Verdana, Helvetica
+mainBackground:string=#ffffff
+mainFontColor:string=black
+mainLinkColor:string=#436976
+mainTabBorderColor:string=#838183
+mainTabBorderColorSelected:string=#838183
+mainTabBackground:string=#003a6b
+mainTabBackgroundNotSelected:string=#9cb2cd
+# FIXME: remove since it is not used ?
+#mainTabBackdrop:string=transparent
+mainTabFontWeight:string=normal
+mainTabFontColor:string=white
+mainTabFontColorSelected:string=white
+
+headingFont:string=100% Arial, sans-serif, Verdana, Helvetica
+headingFontColor:string=black
+headingSize1:string=140%
+headingSize2:string=130%
+headingSize3:string=120%
+headingSize4:string=110%
+headingSize5:string=105%
+headingSize6:string=100%
+
+descriptionFont:string=100% Arial, sans-serif, Verdana, Helvetica
+
+contentFont:string=120% Arial, sans-serif, Verdana, Helvetica
+contentBackground:string=White
+contentImageBorder:string=0
+contentLinkActiveColor:string=Red
+contentLinkVisitedColor:string=Purple
+# FIXME: remove since it is not used ?
+#contentTabBorder:string=1px solid #74ae0b
+contentTabBackground:string=#cde2a7
+contentTabBackgroundNotSelected:string=transparent
+contentTabBackdrop:string=transparent
+contentTabFontWeight:string=normal
+contentTabFontColor:string=#578308
+contentTabFontColorSelected:string=#578308
+
+preBorder:string=0px none
+preBackground:string=#eeeeee
+
+messageFont:string=normal 110% Arial, sans-serif, Verdana, Helvetica
+messageBackground:string=#ffca31
+messageBorder:string=2px solid #333333
+
+textTransform:string=none
+noBorder:string=none
+groupBorder:string=0px none transparent
+requiredField:string=url(required.png) right no-repeat
+
+inputFont:string=100% Arial, sans-serif, Verdana, Helvetica
+inputBorder:string=1px inset #757575
+# FIXME: not used
+#inputBackground:string=#f7f9fa
+
+buttonBackground:string=#ffffff 4px 4px no-repeat
+buttonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+buttonBorder:string=1px outset #757575
+
+contextButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
+contextButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+contextButtonPadding:string=2px 5px 2px 5px
+contextButtonFontColor:string=#454545
+contextButtonBorder:string=1px outset #999999
+
+standaloneButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
+standaloneButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+standaloneButtonPadding:string=2px 5px 2px 5px
+standaloneButtonFontColor:string=#454545
+standaloneButtonBorder:string=1px outset #999999
+
+destructiveButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
+destructiveButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
+destructiveButtonPadding:string=2px 5px 2px 5px;
+destructiveButtonBorder:string=1px outset #757575;
+destructiveButtonBorderHover:string=1px solid #ff0000
+destructiveButtonFontColor:string=#454545
+
+moveUpButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+moveDownButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+moveTopButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+moveBottomButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
+
+buttonWeight:string=normal
+
+boxBorder:string=0px solid #838183
+boxHeaderBackground:string=#003a6b
+boxHeaderFontColor:string=white
+# FIXME: Not used
+#boxLinkBackground:string=transparent
+#boxLinkColor:string=#436976
+boxEvenBackground:string=#eeeeee
+boxOddBackground:string=white
+boxHighlight:string=2px solid #ffa500
+
+# FIXME: Not used
+#listingBorder:string=1px solid #838183
+#listingHeaderBackground:string=#003a6b
+#listingHeaderFontColor:string=black
+#listingLinkHover:string=underline
+
+topBackground:string=#ffffff
+topMargin:string=0
+topPadding:string=0
+
+logoMargin:string=0.2em 0em 0.3em 1em
+logoPadding:string=0
+
+searchMargin:string=0
+searchPadding:string=0
+searchFontColor:string=black
+
+footerBackground:string=#eeeeee
+footerBorder:string=1px solid #003a6b
+
+columnsLeftBackground:string=#9cb2cd
+columnsRightBackground:string=#eeeeee url('rightcol_bg.png') repeat-y
+
+columnsLeftBackgroundNS4:string=#9cb2cd
+columnsRightBackgroundNS4:string=#eeeeee
+
+workspaceBackground:string=#cde2a7
+workspaceBackgroundSelected:string=#297b28
+urlFontColor:string=#666666
+
+legendFontSize:string=80%
+
+# Layout properties used to display listing type tables (this layout is used for
+# history and subscriptions tables).
+listingHeaderBackground:string=#003a6b
+listingHeaderColor:string=white
+listingCellBackground:string=#eeeeee
+listingCellColor:string=black
+listingCellOddBackground:string=#ffffff
+listingCellOddColor:string=black
+listingCellEvenBackground:string=#eeeeee
+listingCellEvenColor:string=black
+
+# Layout properties used to display RSS/Syndication logos (those logos
+# typically appear in each box).
+rssBorder:string=0.1em outset #ff6600
+rssBackground:string=#ff6600
+rssColor:string=#ffffff
+rssFont:string=bold 70% 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif
+
+# Layout properties used to display Atom/Syndication logos (those logos
+# typically appear in each box).
+atomBorder:string=0.1em outset #ff6600
+atomBackground:string=#ff6600
+atomColor:string=#ffffff
+atomFont:string=bold 70% 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif
+
+inheritedRole:string=#ffff99
+inheritedBlockedRole:string=#ff9999
Index: WAeUP_SRP/base/skins/cps_custom/user_logged_in_failed.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/user_logged_in_failed.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/user_logged_in_failed.pt	(revision 2217)
@@ -0,0 +1,22 @@
+<metal:block use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="header">
+    <h3>Login Failure</h3>
+  </metal:block>
+  <metal:block fill-slot="main">
+   
+    <br />
+    <p>
+  	You have not been logged in. Either your user name and/or password are
+  	incorrect or your browser is not configured to accept HTTP
+  	cookies (see http://www.google.com/cookies.html).
+    </p>
+    <br />
+
+    <p>
+      <input type="button" class="context" onClick="history.back()"
+        value="button_back" i18n:attributes="value" />
+    </p>
+
+
+  </metal:block>
+</metal:block>
Index: WAeUP_SRP/base/skins/cps_custom/widget_datetime_render.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/widget_datetime_render.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/widget_datetime_render.pt	(revision 2217)
@@ -0,0 +1,53 @@
+<tal:block define="mode options/mode;
+                   id here/getWidgetId;
+                   id_date string:${id}_date;
+                   id_hour string:${id}_hour;
+                   id_minute string:${id}_minute;
+                   value options/datastructure/?id;
+                   date options/datastructure/?id_date;
+                   hour options/datastructure/?id_hour;
+                   minute options/datastructure/?id_minute;
+                   fmt here/view_format;
+">
+<tal:block condition="python: mode == 'view'">
+<span tal:replace="python:here.getDateStr(value, fmt=fmt)" />
+</tal:block>
+<tal:block define="name here/getHtmlWidgetId;
+                   date_day_fmt python:fmt.startswith('iso8601')
+                       and 'iso8601_short' or fmt"
+  condition="python: mode == 'edit'">
+  <input type="text" size="11" maxlength="22"
+    tal:attributes="name string:${name}_date;
+                    id string:${name}_date;
+                    value python:here.getDateStr(value, fmt=date_day_fmt)" />
+
+  <tal:block condition="here/time_setting"
+    define="hours python:range(0,24);minutes python:(0,10,15,20,30,40,45,50);
+            elt_hour_id string:${name}_hour;
+            elt_minute_id string:${name}_minute">
+    <tal:block i18n:translate="cpsschema_at">at</tal:block>
+    <select tal:attributes="name elt_hour_id;
+                            id elt_hour_id">
+      <tal:block repeat="h hours">
+        <option tal:attributes="value h; selected python:int(hour)==h"
+          tal:content="python:'%2.2i'%h" />
+      </tal:block>
+    </select>
+    <label tal:attributes="for elt_hour_id"
+           i18n:translate="cpsschema_hour">h</label>
+    <select tal:attributes="name elt_minute_id;
+                            id elt_minute_id">
+      <tal:block repeat="m minutes">
+        <option tal:attributes="value m; selected python:int(minute)==m"
+          tal:content="python:'%2.2i'%m" />
+      </tal:block>
+      <tal:block condition="python:int(minute) not in minutes">
+        <option tal:attributes="value minute" tal:content="minute"
+          selected="selected" />
+      </tal:block>
+    </select>
+    <label tal:attributes="for elt_minute_id"
+           i18n:translate="cpsschema_minute">mn</label>
+  </tal:block>
+</tal:block>
+</tal:block>
Index: WAeUP_SRP/base/skins/cps_custom/widget_image_render.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/widget_image_render.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/widget_image_render.pt	(revision 2217)
@@ -0,0 +1,83 @@
+<tal:block define="mode options/mode;
+  id here/getWidgetId;
+  fields here/fields;
+  current_filename options/current_filename;
+  empty_file options/empty_file;
+  session_file options/session_file;
+  mimetype options/mimetype;
+  size options/size;
+  content_url options/content_url;
+  last_modified options/last_modified;
+  image_width options/width;
+  image_height options/height;
+  image_tag options/image_tag;
+  ">
+<span tal:condition="python:0">
+  <img tal:condition="python: mode == 'view' and not empty_file"
+    tal:replace="structure image_tag" />
+</span>
+<span tal:condition="python: mode == 'view' and not empty_file">
+  <a href="" target="_new" 
+     tal:attributes="href content_url"
+     tal:content="current_filename" >
+  </a>
+</span>
+
+  <tal:block condition="python: mode == 'edit'">
+
+    <metal:block use-macro="here/widget_file_render/macros/file_size_max_view" />
+
+    <metal:block define-macro="image_title_edit">
+    <span tal:condition="python:0">
+      <metal:block use-macro="here/widget_file_render/macros/file_title_edit">
+      </metal:block>
+    </span>
+    </metal:block>
+
+    <img tal:condition="python: 0 and not empty_file and not session_file"
+      tal:replace="structure image_tag" />
+
+    <metal:block define-macro="image_edit">
+      <tal:block define="allow_resize here/allow_resize|nothing">
+      <metal:block use-macro="here/widget_file_render/macros/file_edit">
+        <metal:block fill-slot="edit_file_action">
+          <metal:block define-slot="edit_file_action" />
+        </metal:block>
+        <metal:block fill-slot="change_file">
+          <input type="radio" class="noborder"  name="." value="change"
+                 tal:attributes="name radio_name;
+                                 id string:${radio_name}_change" />
+          <label i18n:translate="cpsschemas_label_file_change"
+                 tal:attributes="for string:${radio_name}_change">Change</label>
+          <input type="file" name="." size="24"
+                 tal:attributes="name name;
+            onclick string:document.getElementById('${radio_name}_change').checked='checked'" />
+          <tal:block condition="python:1">
+            <input type="hidden" value="img_auto_size" 
+                   tal:attributes="name string:${name}_resize" />
+          </tal:block>
+          <tal:block condition="python:0 and allow_resize">
+            <label i18n:translate="cpsschemas_image_resize"
+                   tal:attributes="for string:${radio_name}_change">resize</label>
+            <select tal:attributes="name string:${name}_resize;
+              onchange string:document.getElementById('${radio_name}_change').checked='checked';"
+              tal:define="wid_size python:(here.display_width, here.display_height);
+              sizes python:[s for s in here.getImgSizes() if not wid_size[0] or s['size'] < wid_size]">
+              <option tal:repeat="op sizes"
+                tal:attributes="value op/id;
+                selected python: op['size'] and (op['size'][0]==image_width
+                                               or op['size'][1]==image_height)"
+                i18n:translate=""
+                ><span tal:replace="op/id" /> <span tal:condition="op/size"
+                  i18n:name="dim"
+                  tal:replace="python:'(%sx%s)' % op['size']">
+                  640x480</span></option>
+            </select>
+          </tal:block>
+        </metal:block>
+      </metal:block>
+      </tal:block>
+    </metal:block>
+
+  </tal:block>
+</tal:block>
Index: WAeUP_SRP/base/skins/cps_custom/widget_portlet_breadcrumbs.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/widget_portlet_breadcrumbs.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/widget_portlet_breadcrumbs.pt	(revision 2217)
@@ -0,0 +1,30 @@
+<tal:block define="ds options/datastructure;
+                   display ds/display;
+                   display_hidden_folders ds/display_hidden_folders;
+                   display_site_root ds/display_site_root;
+                   highlight_last_item ds/highlight_last_item;
+                   highlight_last_item python:int(highlight_last_item);
+                   first_item ds/first_item;
+                   context nocall:options/context_obj|here;
+                   utool nocall:here/portal_url;
+                   context_url python: utool.getRelativeUrl(context);
+                   base_url python: request.get('cpsskins_base_url');
+                   breadcrumbsItems python: context.getBreadcrumbsItems(context=context, display_hidden_folders=display_hidden_folders, first_item=first_item, display_site_root=display_site_root)">
+  <tal:block condition="python: display == 'horizontal_trail'">
+    <!-- the icon should be made optional, e.g. with a "show icon" option -->
+    You are here: 
+    <img tal:attributes="src
+      string:${base_url}cpsskins_images/UpFolder_icon.png;
+      alt string:Up Folder" />
+    <tal:block repeat="item breadcrumbsItems">
+      <tal:block define="last_item repeat/item/end">
+        <strong tal:omit-tag="python: not (highlight_last_item and last_item)">
+        <a href="" tal:attributes="href item/url"
+         tal:content="python: item['title']" />
+        </strong>
+        <tal:block condition="not:last_item"
+         content="structure string:&gt;" />
+      </tal:block>
+    </tal:block>
+  </tal:block>
+</tal:block>
Index: WAeUP_SRP/base/skins/cps_custom/widget_portlet_search.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/widget_portlet_search.pt	(revision 2217)
+++ WAeUP_SRP/base/skins/cps_custom/widget_portlet_search.pt	(revision 2217)
@@ -0,0 +1,57 @@
+<span tal:condition="nothing">
+<form tal:define="ds options/datastructure;
+                  advanced_search_link ds/advanced_search_link;
+                  contextual_search_choice ds/contextual_search_choice;
+                  context_is_portlet ds/context_is_portlet;
+                  utool nocall:here/portal_url;
+                  params here/getSearchFormParams;
+                  search_script params/script;
+                  context nocall:options/context_obj;
+                  contextual_search params/contextual;
+                  advanced_search_form params/advanced;
+                  folder_prefix request/folder_prefix|nothing;
+                  cpsmcat nocall:here/translation_service;
+                  value_search
+                    request/SearchableText|python:cpsmcat('button_search');
+                  base_url python:request.get('cpsskins_base_url');"
+ method="get" action=""
+ tal:attributes="action search_script"
+ onsubmit="return checkEmptySearch(this)">
+  <div tal:condition="python:contextual_search_choice and contextual_search"
+   tal:define="id here/getId; id1 string:${id}1; id2 string:${id}2">
+    <tal:block condition="not:context_is_portlet">
+      <label tal:attributes="for id1"
+       i18n:translate="label_search_here">here</label>
+      <input type="radio" name="folder_prefix"
+       tal:attributes="id id1; checked folder_prefix;
+       value python:utool.getRelativeUrl(context)" />
+      <label tal:attributes="for id2"
+       i18n:translate="label_search_all_site">here</label>
+      <input type="radio" name="folder_prefix" value=""
+       tal:attributes="id id2; checked not:folder_prefix" />
+    </tal:block>
+    <tal:block condition="context_is_portlet">
+      <p tal:define="portlet_folder here/getLocalFolder">
+        <input type="hidden" name="folder_prefix"
+         tal:attributes="value python:utool.getRelativeUrl(portlet_folder)" />
+        <tal:block i18n:translate="">cpsportlets_search_in</tal:block>
+        <em tal:content="portlet_folder/title_or_id" />
+      </p>
+    </tal:block>
+  </div>
+  <div>
+  <input id="searchGadget" type="text" name="SearchableText" size="15"
+    value="" tal:attributes="value value_search"
+    onclick="this.value='';"/>
+  <input class="context searchButton" type="submit" value="button_ok"
+    i18n:attributes="value" />
+  </div>
+  <div>
+    <a href="" tal:condition="advanced_search_link"
+    tal:define="adv_url python:contextual_search and
+                               context.absolute_url() or utool()"
+    i18n:translate="cpsportlets_advanced_search"
+    tal:attributes="href string:${adv_url}/${advanced_search_form}">Advanced search</a>
+  </div>
+</form>
+</span>
Index: WAeUP_SRP/base/skins/waeup_custom/changeDisplayParams.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/changeDisplayParams.py	(revision 2211)
+++ 	(revision )
@@ -1,52 +1,0 @@
-## Script (Python) "changeDisplayParams"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=REQUEST
-##title=
-##
-# $Id$
-"""
-Change the order/style of the item display within a folder.
-"""
-from Products.CMFCore.utils import getToolByName
-
-context_url = REQUEST.get('context_url', context.getContextUrl())
-
-ti = getToolByName(context, 'portal_types').getTypeInfo(context.portal_type)
-
-# Retrieve display preference from session
-display_params = REQUEST.SESSION.get('cps_display_params', {})
-
-form = REQUEST.form
-
-if form is not None:
-    # Order and direction
-    display_order = form.get('display_order')
-    # "None" means use folder ordering
-    if display_order == 'None' or not display_order:
-        sort_by = None
-        direction = None
-    else:
-        sort_by, direction = display_order.split('_')
-
-    display_params['sort_by'] = sort_by
-    display_params['direction'] = direction
-
-    # Style
-    format = form.get('display_style')
-    if format:
-        # XXX:
-        # "None" means default here whereas None means "don't change"
-        if format == 'None':
-            format = None
-        display_params['format'] = format
-
-    # Update session
-    REQUEST.SESSION['cps_display_params'] = display_params
-
-meth_id = ti.queryMethodID('view', 'folder_contents')
-redirection_url = context_url + '/' + meth_id
-REQUEST.RESPONSE.redirect(redirection_url)
Index: WAeUP_SRP/base/skins/waeup_custom/content_status_modify.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/content_status_modify.py	(revision 2211)
+++ 	(revision )
@@ -1,86 +1,0 @@
-## Script (Python) "content_status_modify"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=workflow_action, REQUEST=None, **kw
-##title=
-##
-# $Id$
-"""
-FIXME: add docstring.
-"""
-
-wftool = context.portal_workflow
-
-if REQUEST is not None:
-    kw.update(REQUEST.form)
-
-comments = kw.get('comments', '')
-
-folder = context.aq_parent
-id = context.getId()
-url = None
-
-psm = 'psm_status_changed'
-
-if workflow_action in ('retract','approve'):
-    # accept, reject, ...
-    if comments:
-        del kw['comments']
-    kw['comment'] = comments
-    res = wftool.doActionFor(context, workflow_action, dest_container=context, **kw)
-    if same_type(res, ()):
-        if res[0] == 'ObjectMoved':
-            rpath = res[1]
-            url = context.portal_url()
-            if not url.endswith('/'):
-                url += '/'
-            url += rpath
-elif workflow_action != 'copy_submit':
-    # accept, reject, ...
-    if comments:
-        del kw['comments']
-    kw['comment'] = comments
-    res = wftool.doActionFor(context, workflow_action, **kw)
-    if same_type(res, ()):
-        if res[0] == 'ObjectMoved':
-            rpath = res[1]
-            url = context.portal_url()
-            if not url.endswith('/'):
-                url += '/'
-            url += rpath
-else:
-    # No section has been specified
-    # XXX We should get a list in here
-    if REQUEST and len(REQUEST.form) < 3:
-        psm = 'psm_you_must_select_sections_for_publishing'
-
-    # publishing: copy and initalize proxy into one or more sections
-    allowed_transitions = wftool.getAllowedPublishingTransitions(context)
-    for transition in allowed_transitions:
-        rpaths = kw.get(transition)
-        if rpaths:
-            if same_type(rpaths, ''):
-                rpaths = (rpaths,)
-            for rpath in rpaths:
-                wftool.doActionFor(context, workflow_action,
-                                   dest_container=rpath,
-                                   initial_transition=transition,
-                                   comment=comments)
-
-if REQUEST is not None:
-    # If the object has been deleted, we can't redirect to it.
-    if url is None:
-        if id in folder.objectIds():
-            url = context.absolute_url()
-        else:
-            url = folder.absolute_url()
-
-    if psm == 'psm_you_must_select_sections_for_publishing':
-        redirect_url = '%s/content_submit_form?%s' % (
-            url, 'portal_status_message=%s'%psm)
-    else:
-        redirect_url = '%s/?%s' % (url, 'portal_status_message=%s'%psm)
-    REQUEST.RESPONSE.redirect(redirect_url)
Index: WAeUP_SRP/base/skins/waeup_custom/cpsdocument_create.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/cpsdocument_create.py	(revision 2211)
+++ 	(revision )
@@ -1,52 +1,0 @@
-## Script (Python) "cpsdocument_create"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=REQUEST, cluster=None, type_name=None
-##title=
-##
-# $Id$
-"""
-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 creation form.
-
-A form uid is propagated during the redirect to uniquely identify the
-form in the session.
-"""
-from urllib import urlencode
-from Products.CMFCore.utils import getToolByName
-from Products.CPSDocument.utils import getFormUidUrlArg
-
-ti = getToolByName(context, 'portal_types').getTypeInfo(type_name)
-
-is_valid, ds = ti.validateObject(None, layout_mode='create',
-                                 request=REQUEST, context=context,
-                                 cluster=cluster, use_session=True)
-
-if is_valid:
-    meth_id = ti.queryMethodID('create_do', 'cpsdocument_create_do')
-    ob = getattr(context, meth_id)(type_name, ds.getDataModel())
-    url = ob.absolute_url()
-    meth_id = ti.queryMethodID('created', None)
-    if meth_id is not None:
-        getattr(context, meth_id)(object=ob)
-    action = ob.getTypeInfo().immediate_view
-    psm = 'psm_content_created'
-    args = {}
-else:
-    url = context.absolute_url()
-    action = 'cpsdocument_create_form'
-    psm = 'psm_content_error'
-    args = {'type_name': type_name}
-    args.update(getFormUidUrlArg(REQUEST))
-
-args['portal_status_message'] = psm
-url = url + '/' + action + '?' + urlencode(args)
-REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/base/skins/waeup_custom/cpsdocument_edit.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/cpsdocument_edit.py	(revision 2211)
+++ 	(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$
-"""
-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)
-args = {}
-
-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_changed'
-
-else:
-    psm = 'psm_content_error'
-    args = getFormUidUrlArg(REQUEST)
-if psm:
-    args['portal_status_message'] = psm
-url = context.absolute_url() + action + '?' + urlencode(args)
-REQUEST.RESPONSE.redirect(url)
Index: WAeUP_SRP/base/skins/waeup_custom/cpsdocument_edit_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/cpsdocument_edit_form.pt	(revision 2211)
+++ 	(revision )
@@ -1,130 +1,0 @@
-<tal:block define="
-    rendered_main python:here.cpsdocument_edit_render(request=request);
-    form_action string:cpsdocument_edit;
-    creation python:False;
-    edition python:True;
-    metadata metadata|nothing;
-    ">
-<metal:block define-macro="edit_form">
-<metal:block use-macro="here/main_template/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">
-    <h3 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>
-    </h3>
-    <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/base/skins/waeup_custom/cpsskins_lib.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/cpsskins_lib.pt	(revision 2211)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<metal:block define-macro="portalboxgroup">
-  <tal:block condition="render_box"
-  define="padding content/padding|string:0">
-
-    <div tal:define="rendered python: content.render_cache(options=options,shield=shield, context_obj=here, enable_esi=enable_esi, boxedit=boxedit, template=template);
-                     margin here/margin|string:0"
-         tal:condition="python: rendered != ''"
-         tal:attributes="style string:text-align:${content/align};; padding:$margin"
-         tal:content="structure rendered" />
-  </tal:block>
-
-  <div class="boxGroupBoundingBox" tal:condition="not:render_box">
-    <div class="boxGroupBoxSlotTitle" i18n:domain="cpsskins">
-      <tal:block define="title string:_Slot name_" i18n:translate=""
-       content="python: mcat and mcat(title) or title" />:
-      <tal:block content="content/box_group" />
-    </div>
-    <div tal:attributes="style string:padding:${content/padding}">
-      <img tal:attributes="src python: base_url + content.getIcon(1)"
-       width="16" height="16" />
-      <tal:block content="content/title" />
-    </div>
-  </div>
-
-</metal:block>
Index: WAeUP_SRP/base/skins/waeup_custom/custom.css.dtml
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/custom.css.dtml	(revision 2211)
+++ 	(revision )
@@ -1,93 +1,0 @@
-<dtml-with stylesheet_properties>
-
-table.registration td {
-  white-space: nowrap;
-  background-color: transparent;
-  color: gray;
-}
-
-table.registration td.active{
-  white-space: nowrap;
-  color: #00C600;
-  font-weight: bold;
-}
-
-table.registration td a {
-  white-space: nowrap;
-  color: gray;
-}
-
-table.registration td a:visited {
-  white-space: nowrap;
-  color: gray;
-}
-
-table.registration td a:hover {
-  text-decoration: none;
-  white-space: nowrap;
-}
-
-table.registration td.active a {
-  white-space: nowrap;  
-  color: #00C600;
-}
-
-table.registration td.active a:visited {
-  white-space: nowrap;  
-  color: #00C600;
-}
-
-table.registration td.active a:hover {
-  text-decoration: underline;
-  white-space: nowrap;  
-}
-
-table.registration td.stopped{
-  white-space: nowrap;
-  color: red;
-  font-weight: bold;
-}
-
-table.registration td.stopped a {
-  white-space: nowrap;  
-  color: red;
-}
-
-table.registration td.stopped a:visited {
-  white-space: nowrap;  
-  color: red;
-}
-
-table.registration td.stopped a:hover {
-  text-decoration: underline;
-  white-space: nowrap;  
-}
-
-table.registration td.unsuccessful{
-  white-space: nowrap;
-  color: gray;
-  text-decoration:line-through; 
-  font-weight: bold;
-}
-
-table.registration td.unsuccessful a {
-  white-space: nowrap;  
-  color: gray;
-  text-decoration:line-through; 
-}
-
-table.registration td.unsuccessful a:visited {
-  white-space: nowrap;  
-  color: gray;
-  text-decoration:line-through; 
-}
-
-table.registration td.unsuccessful a:hover {
-  color: gray;
-  text-decoration: underline; 
-  white-space: nowrap;  
-}
-
-
-</dtml-with>
-            
Index: WAeUP_SRP/base/skins/waeup_custom/folder_delete.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/folder_delete.py	(revision 2211)
+++ 	(revision )
@@ -1,47 +1,0 @@
-## Script (Python) "folder_delete"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=ids=[], REQUEST=None
-##title=
-##
-# $Id$
-"""
-FIXME: add docstring.
-"""
-
-import logging
-logger = logging.getLogger('Skins.folder_delete')
-member_id = str(context.portal_membership.getAuthenticatedMember())
-
-from Products.CMFCore.utils import getToolByName
-here = context
-
-#if context.portal_type == "University":
-#    here = context.academics
-
-ti = getToolByName(here, 'portal_types').getTypeInfo(here.portal_type)
-meth_id = ti.queryMethodID('view', 'folder_contents')
-ret_url = here.absolute_url() + '/' + meth_id
-
-
-
-if ids:
-    for id in ids:
-        # XXX has to be called from here since the workflow doesn't handle the
-        # deletion yet
-        if context.portal_type == "CoursesFolder":
-            context.courses_catalog.deleteRecord(id)
-        ob = getattr(here, id)
-        from Products.CPSCore.EventServiceTool import getPublicEventService
-        evtool = getPublicEventService(here)
-        evtool.notifyEvent('workflow_delete', ob, {})
-    here.manage_delObjects(ids)
-    message = 'portal_status_message=psm_item(s)_deleted'
-else:
-    message = 'portal_status_message=psm_select_at_least_one_document'
-
-if REQUEST is not None:
-    return REQUEST.RESPONSE.redirect(ret_url + '?' + message)
Index: WAeUP_SRP/base/skins/waeup_custom/functions.js.dtml
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/functions.js.dtml	(revision 2211)
+++ 	(revision )
@@ -1,330 +1,0 @@
-<dtml-comment>
-CPS JavaScript functions
-$Id: functions.js.dtml 32288 2006-01-26 17:36:06Z tziade $
-</dtml-comment>
-
-<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/javascript' )">
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
-</dtml-let>
-
-var msie5 = (navigator.userAgent.indexOf('MSIE 5') != -1);
-
-//************************************************************
-// Folder content
-var isSelected = false;
-
-function toggleSelect(toggleSelectButton, selectAllText, deselectAllText) {
-  formElements = toggleSelectButton.form.elements;
-
-  if (isSelected) {
-    for (i = 0; i < formElements.length; i++) {
-      formElements[i].checked = false;
-    }
-    isSelected = false;
-    toggleSelectButton.value = selectAllText;
-  } else {
-    for (i = 0; i < formElements.length; i++) {
-      formElements[i].checked = true;
-    }
-    isSelected = true;
-    toggleSelectButton.value = deselectAllText;
-  }
-}
-
-//************************************************************
-/**
- * Toggles an element's visibility.
- * Function to show tooltips.
- * If your element is a span, you must use inline display instead of block
- * XXX recognize div and span then automaticly choose the best display rule
- */
-function toggleElementVisibility(id) {
-  element = document.getElementById(id);
-  if (element) {
-    //window.alert(element.tagName)
-    if (element.style.visibility == 'hidden') {
-      element.style.visibility = 'visible';
-      if (element.tagName == 'DIV') {
-        element.style.display = 'block';
-      } else if (element.tagName == 'SPAN') {
-        element.style.display = 'inline';
-      } else {
-        element.style.display = 'block';
-      }
-    } else {
-      element.style.visibility = 'hidden';
-      element.style.display = 'none';
-    }
-  }
-}
-
-function showElement(show, id) {
-  element = document.getElementById(id);
-  if (element) {
-    //window.alert(element.tagName)
-    if (show) {
-      element.style.visibility = 'visible';
-      if (element.tagName in ['DIV', 'P']) {
-        element.style.display = 'block';
-      } else {
-        element.style.display = 'inline';
-      }
-    } else {
-      element.style.visibility = 'hidden';
-      element.style.display = 'none';
-    }
-  }
-}
-
-//************************************************************
-function trim(s) {
-  if (s) {
-    return s.replace(/^\s*|\s*$/g, "");
-  }
-  return "";
-}
-
-//************************************************************
-function checkEmptySearch(formElem) {
-  var query = trim(formElem.SearchableText.value);
-  if (query != '') {
-    formElem.SearchableText.value = query;
-    return true;
-  }
-  formElem.SearchableText.value = query;
-  formElem.SearchableText.focus();
-  return false;
-}
-
-//************************************************************
-/**
- * Sets focus on <input> elements that have a class attribute
- * containing the class 'focus'.
- * Examples:
- * <input type="text" id="username" name="__ac_name" class="focus"/>
- * <input type="text" id="searchableText" class="standalone giant focus"/>
- *
- * This function does not work on crappy MSIE5.0 and MSIE5.5.
- */
-function setFocus() {
-  if (msie5) {
-    return false;
-  }
-  var elements = document.getElementsByTagName('input');
-  for (var i = 0; i < elements.length; i++) {
-    var nodeClass = elements[i].getAttributeNode('class');
-    //alert("nodeClass = " + nodeClass);
-    if (nodeClass) {
-      var classes = nodeClass.value.split(' ');
-      for (var j = 0; j < classes.length; j++) {
-        if (classes[j] == 'focus') {
-          elements[i].focus();
-          return true;
-        }
-      }
-    }
-  }
-}
-
-/**
- * Validates that the input fields designated by the given ids are not empty.
- * It returns true if all the input fields are not empty, it returns false
- * otherwise.
- * Example:
- * <form onsubmit="return validateRequiredFields(['field1', 'field2'],
- * ['Title', 'Comments'], 'are empty while they are required fields.')">
- */
-function validateRequiredFields(fieldIds, fieldLabels, informationText) {
-  for (i = 0; i < fieldIds.length; i++) {
-    element = document.getElementById(fieldIds[i]);
-    if (element && !element.value) {
-      window.alert("'" + fieldLabels[i] + "' " + informationText);
-      return false;
-    }
-  }
-  return true;
-}
-
-//************************************************************
-function getSelectedRadio(buttonGroup) {
-  if (buttonGroup[0]) {
-    for (var i=0; i<buttonGroup.length; i++) {
-      if (buttonGroup[i].checked) {
-        return i
-      }
-    }
-  } else {
-    if (buttonGroup.checked) { return 0; }
-  }
-  return -1;
-}
-
-function getSelectedRadioValue(buttonGroup) {
-  var i = getSelectedRadio(buttonGroup);
-  if (i == -1) {
-    return "";
-  } else {
-    if (buttonGroup[i]) {
-    return buttonGroup[i].value;
-    } else {
-    return buttonGroup.value;
-    }
-  }
-}
-
-function getSelectedRadioId(buttonGroup) {
-  var i = getSelectedRadio(buttonGroup);
-  if (i == -1) {
-    return "";
-  } else {
-    if (buttonGroup[i]) {
-      return buttonGroup[i].id;
-    } else {
-      return buttonGroup.id;
-    }
-  }
-}
-
-/**
- * Return the label content corresponding to a radio selection
- */
-function getSelectedRadioLabel(buttonGroup) {
-  var id = getSelectedRadioId(buttonGroup);
-  if (id == "") {
-    return "";
-  } else {
-    for (var i=0; i<document.getElementsByTagName("label").length; i++) {
-      var element_label = document.getElementsByTagName("label")[i];
-      if (element_label.htmlFor == id) {
-        return element_label.firstChild.nodeValue;
-      }
-    }
-  }
-}
-
-
-//************************************************************
-/*
-    Used to highlight search terms
-    from Geir Bækholt, adapted for CPS
-
- */
-function highlightSearchTerm() {
-  var query_elem = document.getElementById('searchGadget')
-  if (! query_elem){
-    return false
-  }
-  var query = query_elem.value
-  // _robert_ ie 5 does not have decodeURI
-  if (typeof decodeURI != 'undefined'){
-    query = unescape(decodeURI(query)) // thanks, Casper
-  }
-  else {
-    return false
-  }
-  if (query){
-    queries = query.replace(/\+/g,' ').split(/\s+/)
-    // make sure we start the right place and not higlight menuitems or breadcrumb
-    searchresultnode = document.getElementById('searchResults')
-    if (searchresultnode) {
-      for (q=0;q<queries.length;q++) {
-        // don't highlight reserved catalog search terms
-        if (queries[q].toLowerCase() != 'not'
-          && queries[q].toLowerCase() != 'and'
-          && queries[q].toLowerCase() != 'or') {
-          climb(searchresultnode,queries[q]);
-        }
-      }
-    }
-  }
-}
-
-function climb(node, word){
-  // traverse childnodes
-  if (! node){
-    return false
-  }
-  if (node.hasChildNodes) {
-    var i;
-    for (i=0;i<node.childNodes.length;i++) {
-      climb(node.childNodes[i],word);
-    }
-    if (node.nodeType == 3) {
-      checkforhighlight(node, word);
-      // check all textnodes. Feels inefficient, but works
-    }
-  }
-}
-
-function checkforhighlight(node,word) {
-  ind = node.nodeValue.toLowerCase().indexOf(word.toLowerCase())
-  if (ind != -1) {
-    if (node.parentNode.className != "highlightedSearchTerm"){
-      par = node.parentNode;
-      contents = node.nodeValue;
-      // make 3 shiny new nodes
-      hiword = document.createElement("span");
-      hiword.className = "highlightedSearchTerm";
-      hiword.appendChild(document.createTextNode(contents.substr(ind,word.length)));
-      par.insertBefore(document.createTextNode(contents.substr(0,ind)),node);
-      par.insertBefore(hiword,node);
-      par.insertBefore(document.createTextNode( contents.substr(ind+word.length)),node);
-      par.removeChild(node);
-    }
-  }
-}
-
-/************************************************************
-/**
- * searchLanguage widget functions
- * used to auto select languages checkbox/radio
- * cf CPSSchemas/skins/cps_schemas/widget_searchlanguage_render.pt
- */
-function searchLanguageCheckSelected(languages, no_language, language) {
-  var count=0;
-  for (var i=0; i<languages.length; i++) {
-    if (languages[i].checked) {
-      count++;
-    }
-  }
-  no_language.checked = (count <= 0);
-  language.checked = (count > 0);
-}
-
-function searchLanguageClearSelected(languages) {
-  for (i=0; i<languages.length; i++) {
-    languages[i].checked = 0;
-  }
-}
-
-function toggleLayers(more_block, more_items) {
-  var objMoreBlock = document.getElementById(more_block).style;
-  var objMoreItems = document.getElementById(more_items).style;
-  if(objMoreBlock.display == "block")
-    objMoreBlock.display = "none";
-  if(objMoreItems.display == "none")
-    objMoreItems.display = "block";
-}
-
-/************************************************************
-/**
- * waeup specific functions
- */
-
-/**
- * submit_once(): Avoid multiple sendings of forms...
- */
-
-submitted = false;
-function submit_once() {
-    if (submitted) {
-        alert("Your request is being processed.\nPlease be patient.");
-        event.returnValue = 0;    // work-around for IE
-        return 0;
-    }
-    submitted = true;
-    return 1;
-}
Index: WAeUP_SRP/base/skins/waeup_custom/getBatchList.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/getBatchList.py	(revision 2211)
+++ 	(revision )
@@ -1,106 +1,0 @@
-## Script (Python) "getBatchList"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=items=[], columns=1, items_per_page=10, zoom=0, max_items=400
-##title=
-##
-# $Id$
-"""
-Given the desired number of colums, constructs a list of batches to render
-as much columns as necessary within a single macro.
-As well, return the page results link to display straight for the navigation
-"""
-
-from math import ceil
-from ZTUtils import Batch
-
-#
-# First constructing the batch
-#
-
-len_items = len(items)
-
-# desperately empty, no need to go further
-if not len_items:
-    return [], {}, []
-
-if max_items and max_items < len_items:
-    items = items[:max_items]
-    len_batch = max_items
-else:
-    len_batch = len_items
-
-b_start = int(context.REQUEST.get('b_start', 0))
-
-# extract the n first items in a zoomed list
-zoomed = []
-if not b_start and zoom:
-    zoom = int(zoom)
-    zoomed = Batch(items[:zoom], zoom, 0)
-    # deal with items left
-    items = items[zoom:]
-
-items_per_page = float(items_per_page)
-size = int(ceil(items_per_page / columns))
-
-b1 = Batch(items, size, b_start, orphan=0)
-batches = [b1]
-
-b_next = b1
-for c in range(columns - 1):
-    if b_next.next:
-        b_next = b_next.next
-        batches.append(b_next)
-
-#
-# Now the page results parameters
-#
-
-# Calculate the number of pages
-nb_pages = int(ceil(len_batch / items_per_page))
-
-# no more advanced arithmetics
-items_per_page = int(items_per_page)
-
-# Test if we are on the last page
-limit = b_start + items_per_page
-if  limit > len_batch:
-    limit = len_batch
-
-batch_info = {'nb_pages': nb_pages,
-              'start': b_start + 1,
-              'limit': limit,
-              'length': len_items,
-              'previous': None,
-              'next': None,
-              }
-
-# for the nb of items
-j = 0
-# for the current position in the search
-current = [0, 1]
-# list of b_start values
-pages = []
-
-# Loop over the number of pages and construct the page link
-for i in range(nb_pages):
-    pages.append(j)
-    if b_start == j:
-        current = [i + 1, j]
-    j += items_per_page
-
-# list of b_start to other pages
-batch_info['pages'] = pages
-
-# if we are not at the beginning of the file
-if current[0] > 1:
-    batch_info['previous'] = current[1] - items_per_page
-
-# Adding the next link if we are not at the end of the list
-if current[0] != nb_pages:
-    batch_info['next'] = current[1] + items_per_page
-
-return batches, batch_info, zoomed
Index: WAeUP_SRP/base/skins/waeup_custom/getCPSCandidateLocalRoles.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/getCPSCandidateLocalRoles.py	(revision 2211)
+++ 	(revision )
@@ -1,27 +1,0 @@
-## Script (Python) "getCPSCandidateLocalRoles"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-# $Id$
-"""
-XXX content moved into portal_membership
-
-Override this template if you have new portal types or new roles with a
-specific mapping to register.
-"""
-from Products.CMFCore.utils import getToolByName
-mtool = getToolByName(context, 'portal_membership')
-member = mtool.getAuthenticatedMember()
-
-
-allowed_roles = mtool.getCPSCandidateLocalRoles(context)
-
-
-if member.id in ("admin","perry"):
-    return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
-return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
Index: WAeUP_SRP/base/skins/waeup_custom/getContentInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/getContentInfo.py	(revision 2211)
+++ 	(revision )
@@ -1,337 +1,0 @@
-## Script (Python) "getContentInfo"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=proxy=None, doc=None, level=0, cpsmcat=None
-##title=
-##
-# $Id$
-"""
-Return information about a content item (ie a proxy)
-
-level: 0 (default cost 1)
-  id, title, title_or_id, review_state, icon, rev, lang, type
-  time_str, creator, rpath, url
-level: 1 (cost 1.3)
-  level 0 + descr, size + doc + additional information from obj
-level: 2 (cost 4.6)
-  level 1 + states
-level: 3 (cost 7)
-  level 2 + history
-level: 4 (cost ???)
-  level 3 + archived
-"""
-
-from zLOG import LOG, DEBUG
-from Products.CMFCore.utils import getToolByName
-from AccessControl import Unauthorized
-
-# how many characters for the description
-DESCRIPTION_MAX_LENGTH = 150
-
-if cpsmcat is None:
-    cpsmcat = context.translation_service
-
-if proxy is None:
-    proxy = context
-
-wtool = getToolByName(context, 'portal_workflow')
-utool = getToolByName(context, 'portal_url')
-ptool = getToolByName(context, 'portal_proxies')
-mtool = getToolByName(context, 'portal_membership')
-portal = utool.getPortalObject()
-
-rpath = None
-if hasattr(proxy.aq_explicit, 'getRID'):
-    # this is a brain
-    # rpath is build with catalog path that include languageView selection
-
-    # FIXME: something is broken here when using virtual host monsters
-    rpath = utool.getRpathFromPath(proxy.getPath())
-
-    # change view to switch to have a sticky behaviour
-    from Products.CPSCore.utils import KEYWORD_SWITCH_LANGUAGE, \
-         KEYWORD_VIEW_LANGUAGE
-    rpath = rpath.replace(KEYWORD_VIEW_LANGUAGE, KEYWORD_SWITCH_LANGUAGE)
-    proxy = proxy.getObject()
-
-bmt = getattr(portal, 'Benchmarktimer', None)
-if bmt is not None:
-    bmt = bmt('getContentInfo for ' + proxy.getId(), level=-3)
-    bmt.setMarker('start')
-
-def getRpathTitle(rpath):
-    """Get object's title, or None if Unauthorized or nonexisting."""
-    try:
-        ob = portal.restrictedTraverse(rpath, None)
-        if ob is None:
-            return None
-        return ob.Title()
-    except Unauthorized:
-        return None
-
-
-def compute_states(no_history=0):
-    wf_vars = ['review_state', 'time']
-    docid = proxy.getDocid()
-    if docid:
-        proxies_info = ptool.getProxyInfosFromDocid(docid,
-                                                    workflow_vars=wf_vars)
-    else:
-        # Not a proxy
-        ob_info = {
-            'rpath': utool.getRpath(proxy),
-            'language_revs': {'en': 0},
-            'visible': mtool.checkPermission('View', proxy),
-            }
-        for var in wf_vars:
-            ob_info[var] = wtool.getInfoFor(proxy, var, None)
-        proxies_info = [ob_info]
-    states = []
-    for proxy_info in proxies_info:
-        # take in account only accessible proxies
-        if not proxy_info['visible']:
-            continue
-
-        lrpath = proxy_info['rpath'].split('/')
-        folder_rpath = '/'.join(lrpath[:-1])
-        folder_title = getRpathTitle(folder_rpath)
-        if not folder_title:
-            # Unauthorized
-            if len(lrpath) > 1:
-                folder_title = lrpath[-2]
-            else:
-                folder_title = '?'
-
-        proxy_info_proxy = None
-        portal_type = None
-        if proxy_info.has_key('object'):
-            proxy_info_proxy = proxy_info['object']
-            if hasattr(proxy_info_proxy, 'portal_type'):
-                portal_type = proxy_info_proxy.portal_type
-
-        d = {'rpath': folder_rpath,
-             'title': folder_title,
-             'type': portal_type,
-             'review_state': proxy_info['review_state'],
-             'rev': str(proxy_info['language_revs'].values()[0]),
-             'language': proxy_info['language_revs'].keys()[0],
-             'time': proxy_info['time'],
-             'time_str': context.getDateStr(proxy_info['time']),
-             'proxy': proxy_info_proxy,
-             }
-        d['lang'] = d['language']       # for compatibility
-        states.append(d)
-
-    history = []
-    if not no_history:
-        review_history = wtool.getFullHistoryOf(proxy)
-        if not review_history:
-            review_history = wtool.getInfoFor(proxy, 'review_history', ())
-            remove_redundant = 0
-        else:
-            remove_redundant = 1
-        for d in review_history:
-            if not (d.has_key('actor')
-                    and d.has_key('time')
-                    and d.has_key('action')):
-                continue
-            action = d['action']
-            # Internal transitions hidden from the user.
-            if action in ('unlock', 'checkout_draft_in'):
-                continue
-            # Skip redundant history (two transition when publishing).
-            if action == 'copy_submit' and remove_redundant:
-                continue
-            # Transitions involving a destination container.
-            if action in ('submit', 'copy_submit'):
-                d['has_dest'] = 1
-                dest_container = d.get('dest_container') or '?'
-                d['dest_container'] = dest_container
-                dest_title = getRpathTitle(dest_container)
-                if not dest_title:
-                    # Unauthorized
-                    dest_title = dest_container.split('/')[-1]
-                d['dest_title'] = dest_title
-            d['time_str'] = context.getDateStr(d['time'])
-            history.append(d)
-
-    def cmp_rs(a, b):
-        return -cmp(a['review_state'], b['review_state'])
-    states.sort(cmp_rs)
-
-    def cmp_date(a, b):
-        return -cmp(a['time'], b['time'])
-    history.sort(cmp_date)
-
-    return states, history
-
-def compute_archived():
-    archived = proxy.getArchivedInfos()
-    # Keep only frozen revisions.
-    archived = [d for d in archived if d['is_frozen']]
-    archived.reverse()
-    for d in archived:
-        d['time_str'] = context.getDateStr(d['modified'])
-    return archived
-
-# basic information level 0
-info = {}
-if rpath is None:
-    info['rpath'] = utool.getRpath(proxy)
-else:
-    info['rpath'] = rpath
-
-info['url'] = utool.getUrlFromRpath(info['rpath'])
-
-info['title_or_id'] = proxy.id
-info['id'] = proxy.getId()
-try:
-    info['title'] = proxy.Title() #proxy.Title()
-except AttributeError:
-    raise AttributeError, 'invalid object: %s in %s' % (info['title_or_id'],
-                                                             info['rpath'])
-except TypeError:
-    info['title'] = proxy.getContent().id
-
-info['icon'] = proxy.getIcon(relative_to_portal=1)
-info['type'] = proxy.getPortalTypeName()
-
-if proxy.getTypeInfo() is not None:
-    info['type_l10n'] = cpsmcat(proxy.getTypeInfo().Title())
-else:
-##    LOG("getContentInfo() pb getting Type Information",
-##        DEBUG,
-##        'Proxy :',
-##        proxy)
-    info['type_l10n'] = ''
-info['review_state'] = wtool.getInfoFor(proxy, 'review_state', '')
-try:
-    info['rev'] = str(proxy.getRevision())
-    info['lang'] = proxy.getLanguage()
-except AttributeError:
-    # not a proxy
-    # FIXME: default lang should not be hardcoded
-    info['rev'] = '0'
-    info['lang'] = 'en'
-info['time'] = proxy.modified()
-
-# level 1
-if level > 0:
-    if doc is None:
-        doc = proxy.getContent()
-    if doc.portal_type == 'Course':
-        info['credits'] = doc.credits
-        info['semester'] = doc.semester
-        info['passmark'] = doc.passmark
-    elif doc.portal_type == 'CertificateCourse':
-        core = 'core'
-        if not doc.core_or_elective:
-            core = 'elective'
-        info['core_or_elective'] = core
-    elif doc.portal_type == 'Student':
-        try:
-            info['clearance'] = proxy.clearance.getContent()
-        except AttributeError:
-            info['clearance'] = None
-    info['time'] = doc.modified()
-    info['doc'] = doc
-    if hasattr(doc,"LongTitle"):
-        info['long_title'] = doc.LongTitle()
-    description = doc.Description() or ''
-    if len(description) > DESCRIPTION_MAX_LENGTH:
-        description = description[:DESCRIPTION_MAX_LENGTH] + '...'
-    info['description'] = description
-    if hasattr(doc.aq_explicit, 'get_size'):
-        try:
-            size = doc.get_size()
-        except:
-            size = 0
-        if size and size < 1024:
-            info['size'] = '1 K'
-        elif size > 1048576:
-            info['size'] = '%.02f M' % float(size/1048576.0)
-        elif size:
-            info['size'] = str(int(size)/1024)+' K'
-
-    if hasattr(doc.aq_explicit, 'start'):
-        if callable(doc.start):
-            start = doc.start()
-        else:
-            start = doc.start
-        if start:
-            info['start'] = start
-            info['start_str'] = context.getDateStr(start)
-
-    if hasattr(doc.aq_explicit, 'end'):
-        if callable(doc.end):
-            end = doc.end()
-        else:
-            end = doc.end
-        if end:
-            info['end'] = end
-            info['end_str'] = context.getDateStr(end)
-
-    for dc in ('Creator', 'Rights', 'Language',
-               'contributors', 'source', 'relation', 'coverage'):
-        key = dc.lower()
-        if key == 'contributors':
-            key = 'contributor'         # this is the real DC name
-        try:
-            meth = getattr(doc, dc)
-            if callable(meth):
-                value = meth()
-            else:
-                value = meth
-            if value and not same_type(value, ''):
-                value = ', '.join(value)
-            info[key] = value
-        except:
-            info[key] = ''
-
-    if hasattr(doc.aq_explicit, 'hidden_folder'):
-        info['hidden'] = doc.hidden_folder
-    else:
-        info['hidden'] = 0
-
-    if hasattr(doc.aq_explicit, 'getAdditionalContentInfo'):
-        add_info = doc.getAdditionalContentInfo(proxy)
-        info.update(add_info)
-
-    if info['review_state'] == 'published':
-        now = context.ZopeTime()
-        eff = doc.effective()
-        exp = doc.expires()
-        if now < eff:
-            info['review_state'] = 'deferred'
-            info['review_state_date'] = context.getDateStr(eff)
-        elif now > exp:
-            info['review_state'] = 'expired'
-            info['review_state_date'] = context.getDateStr(exp)
-
-# level 2
-if level == 2:
-    info['states'], ignore = compute_states(1)
-
-# level 3
-if level >= 3:
-    info['states'], info['history'] = compute_states()
-
-# level 4
-if level >= 4:
-    info['archived'] = compute_archived()
-
-info['level'] = level
-if info['time']:
-    info['time_str'] = context.getDateStr(info['time'])
-else:
-    info['time_str'] = ''
-
-
-if bmt is not None:
-    bmt.setMarker('stop')
-    bmt.saveProfile(context.REQUEST)
-
-return info
Index: WAeUP_SRP/base/skins/waeup_custom/getCreatableItems.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/getCreatableItems.py	(revision 2211)
+++ 	(revision )
@@ -1,29 +1,0 @@
-## Script (Python) "getCreatableItems"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-items = []
-utool = context.portal_url
-base_url = utool.getBaseUrl()
-#return context.getPortalTypeName()
-
-if context.getPortalTypeName() == 'Portal':
-    return items
-
-content_types = context.getSortedContentTypes(allowed=1)
-renderIcon = context.portal_cpsportlets.renderIcon
-
-for ptype in content_types:
-    ptype_id = ptype.getId()
-    items.append({
-        'title': ptype.Title(),
-        'id': ptype_id,
-        'icon_tag': renderIcon(ptype_id, base_url, '')
-    })
-
-return items
Index: WAeUP_SRP/base/skins/waeup_custom/getCustomDisplayParams.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/getCustomDisplayParams.py	(revision 2211)
+++ 	(revision )
@@ -1,44 +1,0 @@
-## Script (Python) "getCustomDisplayParams"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-# $Id$
-"""
-FIXME: docstring?
-"""
-if context.isInWorkspace():
-    custom_params = {'format': 'detail_tab',
-                     'sort_by': None,
-                     'direction': 'asc',
-                     'items_per_page': 50,
-                     'nav_action': 'folder_view',
-                     'filter': 0,
-                     'detail_tab_columns': ['title', 'type', 'size', 
-                                'date', 'author','status', 'version'],
-                    }
-
-else:
-    custom_params =  {'format': None,
-                      'sort_by': None,
-                      'direction': 'asc',
-                      'items_per_page': 100,
-                      'nav_action': 'folder_view',
-                      'filter': 0,
-                      'detail_tab_columns': ['long_title',
-                                             'id',
-                                              #'typetext',
-                                              #'size',
-                                              #'date', 
-                                              #'author', 
-                                              'status', 
-                                              #'version'
-                                              ],
-                     }
-
-return custom_params
-
Index: WAeUP_SRP/base/skins/waeup_custom/getDateStr.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/getDateStr.py	(revision 2211)
+++ 	(revision )
@@ -1,84 +1,0 @@
-## Script (Python) "getDateStr"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=dt=None, fmt='medium'
-##title=
-##
-# $Id$
-"""
-Return a string date using the current locale.
-"""
-
-# TODO: don't call Localizer directly
-
-from DateTime.DateTime import DateTimeError
-
-if not dt:
-    return ''
-if fmt in ('iso8601_medium',):
-    dfmt = '%Y-%m-%dT%H:%MZ'
-elif fmt in ('medium','iso8601_medium_easy'):
-    dfmt = '%Y-%m-%d %H:%M'
-elif fmt in ('iso8601_short', 'iso8601'):
-    dfmt = '%Y-%m-%d'
-elif fmt == 'iso8601_long':
-    dfmt = '%Y-%m-%dT%H:%M:%SZ'
-elif fmt == 'iso8601_long_easy':
-    dfmt = '%Y-%m-%d %H:%M:%S'
-else:
-    dfmt = fmt
-try:
-    ret = dt.strftime(dfmt)
-    # XXX remove this as soon as strftime is fixed
-    # space hack to fix %p strftime bug when LC_ALL=fr_FR
-    if (dfmt.endswith('%p') and not ret.endswith('M')):
-        h = int(dt.strftime('%H'))
-        if h > 12:
-            ret += ' PM'
-        else:
-            ret += ' AM'
-except (DateTimeError,ValueError):
-    ret = 'Invalid'
-    
-return ret
-
-
-mcat = context.translation_service
-
-if fmt in ('short', 'medium', 'long'):
-    # This string will be used to retrieve format in the right .po file
-    fmt = 'date_' + fmt
-# For iso8601 dates read http://www.w3.org/TR/NOTE-datetime
-elif fmt not in ('iso8601', 'iso8601_short', 'iso8601_medium', 'iso8601_long',
-                 'iso8601_medium_easy', 'iso8601_long_easy'):
-    fmt = 'iso8601_medium_easy'
-
-try:
-    if fmt == 'iso8601_short' or fmt == 'iso8601':
-        dfmt = '%Y-%m-%d'
-    elif fmt == 'iso8601_medium':
-        dfmt = '%Y-%m-%dT%H:%MZ'
-    elif fmt == 'iso8601_medium_easy':
-        dfmt = '%Y-%m-%d %H:%M'
-    elif fmt == 'iso8601_long':
-        dfmt = '%Y-%m-%dT%H:%M:%SZ'
-    elif fmt == 'iso8601_long_easy':
-        dfmt = '%Y-%m-%d %H:%M:%S'
-    else:
-        dfmt = mcat(fmt)
-    ret = dt.strftime(dfmt)
-    # XXX remove this as soon as strftime is fixed
-    # space hack to fix %p strftime bug when LC_ALL=fr_FR
-    if (dfmt.endswith('%p') and not ret.endswith('M')):
-        h = int(dt.strftime('%H'))
-        if h > 12:
-            ret += ' PM'
-        else:
-            ret += ' AM'
-except DateTimeError:
-    ret = 'Invalid'
-
-return ret
Index: WAeUP_SRP/base/skins/waeup_custom/logged_in.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/logged_in.py	(revision 2211)
+++ 	(revision )
@@ -1,188 +1,0 @@
-## Script (Python) "logged_in"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=
-##
-"""Prepare user login
-modified from cps_default/logged_in.py
-
-$Id$
-"""
-try:
-    from Products.zdb import set_trace
-except:
-    def set_trace():
-        pass
-import DateTime
-current = DateTime.DateTime()
-import logging
-logger = logging.getLogger('Skins.logged_in')
-
-
-from urllib import unquote
-
-request = context.REQUEST
-response = request.RESPONSE
-utool = context.portal_url
-mtool = context.portal_membership
-wftool = context.portal_workflow
-portal = utool.getPortalObject()
-
-redirect_to_portal = False
-is_anon = mtool.isAnonymousUser()
-member = mtool.getAuthenticatedMember()
-#load_passport = hasattr(context.waeup_tool,'loadStudentFoto')
-
-if not is_anon:
-    if "Student" in member.getRoles():
-        to_waeup_student_home = True
-        students = context.portal_url.getPortalObject().campus.students
-        student = getattr(students,str(member))
-        student_app = getattr(student,'application',None)
-        student_per = getattr(student,'personal',None)
-        if request.has_key('returning') and  student_app is None:
-            email=request.get("email")
-            phone=request.get("phone_nr")
-            context.waeup_tool.makeStudentData(str(member),
-                                                   email=email,
-                                                   phone_nr=phone,
-                                                   )
-            #d = {}
-            #d['id'] = str(member)
-            #d['email'] = email
-            #d['phone'] = phone
-            #context.students_catalog.modifyRecord(**d)
-        elif student_app is None:
-            context.waeup_tool.makeStudentData(str(member))
-        student_app = getattr(student,'application',None)
-        if 'payments' not in student.objectIds():
-            student.invokeFactory('PaymentsFolder','payments')
-            payments = getattr(student,'payments')
-            wftool.doActionFor(payments,'open')
-            d = {}
-            d['Title'] = 'Online Payments'
-            payments.getContent().edit(mapping=d)
-        student_pume = getattr(student,'pume',None)
-        s_review_state = context.getStudentReviewState(student.id)
-        a_review_state = wftool.getInfoFor(student_app,'review_state',None)
-        student_per = getattr(student,'personal',None)
-        p_review_state = wftool.getInfoFor(student_per,'review_state',None)
-        logger.info('%s logged in, review_state %s' % (member,s_review_state))
-        app_doc = student_app.getContent()
-
-        if request.has_key('returning'):
-            email=request.get("email")
-            phone=request.get("phone_nr")
-            # should be always closed, however ...
-            if a_review_state != 'opened':
-                wftool.doActionFor(student_app,'open')
-            # should be always opened after import, however ...
-            if p_review_state != 'opened':
-                wftool.doActionFor(student_per,'open')
-            per_doc = student_per.getContent()
-            app_doc.edit(mapping = {'app_email' : email})
-            per_doc.edit(mapping = {'email' : email, 'phone' : phone})
-            wftool.doActionFor(student_app,'close')
-
-        #from Products.zdb import set_trace;set_trace()
-        if s_review_state == 'returning' and 'passport' not in app_doc.objectIds():
-            folder = 'pictures_returning'
-            res = context.students_catalog(id = str(member))
-            filename = res[0].matric_no.upper()
-            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
-            logger.info('%s (%s), %s' % (member,s_review_state,msg))
-        if s_review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested')  and 'passport' not in app_doc.objectIds():
-            folder = 'pictures_admitted_latest'
-            filename = app_doc.jamb_reg_no.replace('/','_')
-            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
-            logger.info('%s (%s), %s' % (member,s_review_state,msg))
-        if s_review_state in ("student_created","admitted") and\
-                             a_review_state == 'created' :
-            wftool.doActionFor(student_app,'open')
-            if student_pume is not None:
-              wftool.doActionFor(student_pume,'close')
-            da = {}
-            pin = request.get('pin')
-            if not pin:
-                jamb_reg_no = app_doc.jamb_reg_no
-                for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
-                    res = context.portal_pins(student=reg_no)
-                    if len(res) > 0:
-                        break
-                if len(res) > 0:
-                    p = res[0].pin
-                    if len(p) > 10:
-                        pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
-                    else:
-                        pin = p
-            da['app_ac_pin'] = pin
-            da['app_ac_date'] = current
-            app_doc.edit(mapping = da)
-        elif s_review_state in ("admitted") and a_review_state == 'opened' and\
-                                            not app_doc.app_ac_pin:
-            jamb_reg_no = app_doc.jamb_reg_no
-            for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()):
-                res = context.portal_pins(student=reg_no)
-                if len(res) > 0:
-                    break
-            if len(res) > 0:
-                p = res[0].pin
-                if len(p) > 10:
-                    pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])
-                else:
-                    pin = p
-                da = {}
-                da['app_ac_pin'] = pin
-                app_doc.edit(mapping = da)
-        elif s_review_state in ("cleared_and_validated",) and\
-                             p_review_state == 'created' :
-            wftool.doActionFor(student_per,'open')
-        res = context.students_catalog(id = str(member))
-        matric_no = res[0].matric_no
-        verdict = res[0].verdict
-        if s_review_state in ('returning','school_fee_paid') and not verdict:
-            results = context.results_import(matric_no = matric_no)
-            if results:
-                study_course = getattr(student,'study_course')
-                sc_review_state = wftool.getInfoFor(study_course,'review_state',None)
-                dsc = {}
-                dsc['current_verdict'] = context.getVerdict(results[0].Verdict)[0]
-                if sc_review_state != 'opened':
-                    wftool.doActionFor(study_course,'open')
-                study_course_doc =study_course.getContent()
-                study_course_doc.edit(mapping = dsc)
-                wftool.doActionFor(study_course,'close_for_edit')
-        has_results = context.results_import(matric_no = matric_no)
-        if s_review_state == "application_pin_entered":
-            redirect_url = "%s/application_edit_form" % student.absolute_url()
-        elif s_review_state in ('admitted', 'objection_raised',):
-            redirect_url = "%s/admission_form" % student.absolute_url()
-        elif s_review_state == "clearance_pin_entered":
-            redirect_url = "%s/clearance_edit_form" % student.absolute_url()
-        elif s_review_state == "cleared_and_validated":
-            redirect_url = "%s/personal_edit_form" % student.absolute_url()
-        elif s_review_state == "returning" and has_results:
-            redirect_url = "%s/session_results_view" % student.absolute_url()
-        elif s_review_state in ('school_fee_paid','courses_registered'):
-            redirect_url = "%s/study_course/study_course_view" % student.absolute_url()
-        else:
-            redirect_url = "%s/student_index" % student.absolute_url()
-    else:
-        logger.info('%s logged in' % (member))
-        redirect_url = portal.absolute_url()
-#Anonymous
-else:
-    response.expireCookie('__ac', path='/')
-    return context.user_logged_in_failed()
-
-# Setup skins
-if (getattr(utool, 'updateSkinCookie', False) and
-    utool.updateSkinCookie()):
-    context.setupCurrentSkin()
-
-response.redirect(redirect_url)
-
Index: WAeUP_SRP/base/skins/waeup_custom/logout.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/logout.py	(revision 2211)
+++ 	(revision )
@@ -1,24 +1,0 @@
-## Script (Python) "logout"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=
-##title=Logout handler
-##
-# notify the event service that the user has logged out
-import logging
-logger = logging.getLogger('Skins.logout')
-user = context.portal_membership.getAuthenticatedMember()
-if user:
-    from Products.CPSCore.EventServiceTool import getPublicEventService
-    evtool = getPublicEventService(context)
-    evtool.notifyEvent('user_logout', user, {})
-    logger.info('%s logged out' % (user))
-
-REQUEST = context.REQUEST
-if REQUEST.has_key('portal_skin'):
-    context.portal_skins.clearSkinCookie()
-REQUEST.RESPONSE.expireCookie('__ac', path='/')
-return REQUEST.RESPONSE.redirect(REQUEST.URL1+'/logged_out')
Index: WAeUP_SRP/base/skins/waeup_custom/msie.css.dtml
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/msie.css.dtml	(revision 2211)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
-Internet Explorer CSS customization.
-This file is used and read *only* by MSIE through the use of a MSIE conditional
-comment. This is the place to put instructions to correct the rendering problems
-specific to MSIE.
-
-$Id$
-*/
-
-<dtml-let last_modified="_.DateTime()-14" expires="_.DateTime()+1" >
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Content-Type', 'text/css' )">
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Last-Modified', last_modified.toZone('GMT').rfc822() )">
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Cache-Control', 'max-age=36000, must-revalidate' )">
-<dtml-call "REQUEST.RESPONSE.setHeader( 'Expires', expires.toZone('GMT').rfc822() )" >
-</dtml-let>
-
-/*
-The MSIE PNG behavior is disabled by default but kept here in case you need it.
-This MSIE behavior was supposed to work for MSIE >= 5.5, but *some* versions of
-MSIE 5.5 have problems with it. So feel free to use it back again if your
-visitors do not use MSIE 5.5 or when MSIE 5.5 becomes history.
-*/
-
-
-img {
-  behavior: url(pngbehavior.htc);
-}
-
Index: WAeUP_SRP/base/skins/waeup_custom/standard_error_message.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/standard_error_message.pt	(revision 2211)
+++ 	(revision )
@@ -1,61 +1,0 @@
-<metal:html tal:define="showthirdcol nothing;
-                        error_type options/error_type|nothing;
-                        error_value options/error_value|nothing;
-                        error_message options/error_message|nothing;
-                        error_tb options/error_tb|nothing;
-                        error_traceback options/error_traceback|nothing;
-                        error_log_url options/error_log_url|nothing;
-                        p_props here/portal_properties;
-                       ">
-<tal:Anauthorized condition="python:error_type == 'Unauthorized'">
-    <metal:block use-macro="here/error_not_found/macros/not_found" />
-</tal:Anauthorized>
-
-<tal:Anauthorized condition="python:error_type != 'Unauthorized'">
-<metal:body use-macro="here/main_template/macros/master">
-
-<metal:main fill-slot="main">
-
-    
-<tal:haserror condition="error_type">
-  <tal:NotFound condition="python:error_type == 'NotFound'">
-    <metal:block use-macro="here/error_not_found/macros/not_found" />
-  </tal:NotFound>
-
-  <tal:default condition="python:error_type != 'NotFound'">
-    <metal:block use-macro="here/error_other/macros/other" />
-  </tal:default>
-
-  <tal:debugging condition="python:checkPerm('Manage portal', here)">
-    <table width="100%" cellpadding="2" cellspacing="2">
-      <tr>
-        <th width="10%">Error Type:</th>
-        <td tal:content="error_type"></td>
-      </tr>
-      <tr>
-        <th>Error Value:</th>
-        <td><pre tal:content="structure error_value" /></td>
-      </tr>
-      <tr>
-        <th>Traceback:</th>
-        <td><pre tal:content="structure error_traceback" /></td>
-      </tr>
-    </table>
-    <hr />
-    <pre tal:content="structure request" />
-    <hr />
-    <a href="" tal:condition="python:error_log_url"
-               tal:attributes="href error_log_url">
-      Show Error Log Entry
-    </a>
-  </tal:debugging>
-</tal:haserror>
-
-<tal:hasnoerror tal:condition="not:error_type">
-Sorry, an error occurred. 
-</tal:hasnoerror>
-
-</metal:main>
-</metal:body>
-</tal:Anauthorized>
-</metal:html>
Index: WAeUP_SRP/base/skins/waeup_custom/stylesheet_properties.props
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/stylesheet_properties.props	(revision 2211)
+++ 	(revision )
@@ -1,159 +1,0 @@
-# TODO: I want comments in this file!
-
-plone_skin:string=Nuxeo CPS Default
-
-mainFont:string=70% Arial, sans-serif, Verdana, Helvetica
-mainBackground:string=#ffffff
-mainFontColor:string=black
-mainLinkColor:string=#436976
-mainTabBorderColor:string=#838183
-mainTabBorderColorSelected:string=#838183
-mainTabBackground:string=#003a6b
-mainTabBackgroundNotSelected:string=#9cb2cd
-# FIXME: remove since it is not used ?
-#mainTabBackdrop:string=transparent
-mainTabFontWeight:string=normal
-mainTabFontColor:string=white
-mainTabFontColorSelected:string=white
-
-headingFont:string=100% Arial, sans-serif, Verdana, Helvetica
-headingFontColor:string=black
-headingSize1:string=140%
-headingSize2:string=130%
-headingSize3:string=120%
-headingSize4:string=110%
-headingSize5:string=105%
-headingSize6:string=100%
-
-descriptionFont:string=100% Arial, sans-serif, Verdana, Helvetica
-
-contentFont:string=120% Arial, sans-serif, Verdana, Helvetica
-contentBackground:string=White
-contentImageBorder:string=0
-contentLinkActiveColor:string=Red
-contentLinkVisitedColor:string=Purple
-# FIXME: remove since it is not used ?
-#contentTabBorder:string=1px solid #74ae0b
-contentTabBackground:string=#cde2a7
-contentTabBackgroundNotSelected:string=transparent
-contentTabBackdrop:string=transparent
-contentTabFontWeight:string=normal
-contentTabFontColor:string=#578308
-contentTabFontColorSelected:string=#578308
-
-preBorder:string=0px none
-preBackground:string=#eeeeee
-
-messageFont:string=normal 110% Arial, sans-serif, Verdana, Helvetica
-messageBackground:string=#ffca31
-messageBorder:string=2px solid #333333
-
-textTransform:string=none
-noBorder:string=none
-groupBorder:string=0px none transparent
-requiredField:string=url(required.png) right no-repeat
-
-inputFont:string=100% Arial, sans-serif, Verdana, Helvetica
-inputBorder:string=1px inset #757575
-# FIXME: not used
-#inputBackground:string=#f7f9fa
-
-buttonBackground:string=#ffffff 4px 4px no-repeat
-buttonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
-buttonBorder:string=1px outset #757575
-
-contextButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
-contextButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
-contextButtonPadding:string=2px 5px 2px 5px
-contextButtonFontColor:string=#454545
-contextButtonBorder:string=1px outset #999999
-
-standaloneButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
-standaloneButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
-standaloneButtonPadding:string=2px 5px 2px 5px
-standaloneButtonFontColor:string=#454545
-standaloneButtonBorder:string=1px outset #999999
-
-destructiveButtonBackground:string=#ffffff url(buttonbg_e7.png) bottom left repeat-x
-destructiveButtonBackgroundHover:string=#e7e7e7 url(buttonbg_bc.png) bottom left repeat-x
-destructiveButtonPadding:string=2px 5px 2px 5px;
-destructiveButtonBorder:string=1px outset #757575;
-destructiveButtonBorderHover:string=1px solid #ff0000
-destructiveButtonFontColor:string=#454545
-
-moveUpButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
-moveDownButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
-moveTopButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
-moveBottomButtonBackground:string=white url(buttonbg_e7.png) bottom left repeat-x
-
-buttonWeight:string=normal
-
-boxBorder:string=0px solid #838183
-boxHeaderBackground:string=#003a6b
-boxHeaderFontColor:string=white
-# FIXME: Not used
-#boxLinkBackground:string=transparent
-#boxLinkColor:string=#436976
-boxEvenBackground:string=#eeeeee
-boxOddBackground:string=white
-boxHighlight:string=2px solid #ffa500
-
-# FIXME: Not used
-#listingBorder:string=1px solid #838183
-#listingHeaderBackground:string=#003a6b
-#listingHeaderFontColor:string=black
-#listingLinkHover:string=underline
-
-topBackground:string=#ffffff
-topMargin:string=0
-topPadding:string=0
-
-logoMargin:string=0.2em 0em 0.3em 1em
-logoPadding:string=0
-
-searchMargin:string=0
-searchPadding:string=0
-searchFontColor:string=black
-
-footerBackground:string=#eeeeee
-footerBorder:string=1px solid #003a6b
-
-columnsLeftBackground:string=#9cb2cd
-columnsRightBackground:string=#eeeeee url('rightcol_bg.png') repeat-y
-
-columnsLeftBackgroundNS4:string=#9cb2cd
-columnsRightBackgroundNS4:string=#eeeeee
-
-workspaceBackground:string=#cde2a7
-workspaceBackgroundSelected:string=#297b28
-urlFontColor:string=#666666
-
-legendFontSize:string=80%
-
-# Layout properties used to display listing type tables (this layout is used for
-# history and subscriptions tables).
-listingHeaderBackground:string=#003a6b
-listingHeaderColor:string=white
-listingCellBackground:string=#eeeeee
-listingCellColor:string=black
-listingCellOddBackground:string=#ffffff
-listingCellOddColor:string=black
-listingCellEvenBackground:string=#eeeeee
-listingCellEvenColor:string=black
-
-# Layout properties used to display RSS/Syndication logos (those logos
-# typically appear in each box).
-rssBorder:string=0.1em outset #ff6600
-rssBackground:string=#ff6600
-rssColor:string=#ffffff
-rssFont:string=bold 70% 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif
-
-# Layout properties used to display Atom/Syndication logos (those logos
-# typically appear in each box).
-atomBorder:string=0.1em outset #ff6600
-atomBackground:string=#ff6600
-atomColor:string=#ffffff
-atomFont:string=bold 70% 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif
-
-inheritedRole:string=#ffff99
-inheritedBlockedRole:string=#ff9999
Index: WAeUP_SRP/base/skins/waeup_custom/user_logged_in_failed.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/user_logged_in_failed.pt	(revision 2211)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<metal:block use-macro="here/main_template/macros/master">
-  <metal:block fill-slot="header">
-    <h3>Login Failure</h3>
-  </metal:block>
-  <metal:block fill-slot="main">
-   
-    <br />
-    <p>
-  	You have not been logged in. Either your user name and/or password are
-  	incorrect or your browser is not configured to accept HTTP
-  	cookies (see http://www.google.com/cookies.html).
-    </p>
-    <br />
-
-    <p>
-      <input type="button" class="context" onClick="history.back()"
-        value="button_back" i18n:attributes="value" />
-    </p>
-
-
-  </metal:block>
-</metal:block>
Index: WAeUP_SRP/base/skins/waeup_custom/widget_datetime_render.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/widget_datetime_render.pt	(revision 2211)
+++ 	(revision )
@@ -1,53 +1,0 @@
-<tal:block define="mode options/mode;
-                   id here/getWidgetId;
-                   id_date string:${id}_date;
-                   id_hour string:${id}_hour;
-                   id_minute string:${id}_minute;
-                   value options/datastructure/?id;
-                   date options/datastructure/?id_date;
-                   hour options/datastructure/?id_hour;
-                   minute options/datastructure/?id_minute;
-                   fmt here/view_format;
-">
-<tal:block condition="python: mode == 'view'">
-<span tal:replace="python:here.getDateStr(value, fmt=fmt)" />
-</tal:block>
-<tal:block define="name here/getHtmlWidgetId;
-                   date_day_fmt python:fmt.startswith('iso8601')
-                       and 'iso8601_short' or fmt"
-  condition="python: mode == 'edit'">
-  <input type="text" size="11" maxlength="22"
-    tal:attributes="name string:${name}_date;
-                    id string:${name}_date;
-                    value python:here.getDateStr(value, fmt=date_day_fmt)" />
-
-  <tal:block condition="here/time_setting"
-    define="hours python:range(0,24);minutes python:(0,10,15,20,30,40,45,50);
-            elt_hour_id string:${name}_hour;
-            elt_minute_id string:${name}_minute">
-    <tal:block i18n:translate="cpsschema_at">at</tal:block>
-    <select tal:attributes="name elt_hour_id;
-                            id elt_hour_id">
-      <tal:block repeat="h hours">
-        <option tal:attributes="value h; selected python:int(hour)==h"
-          tal:content="python:'%2.2i'%h" />
-      </tal:block>
-    </select>
-    <label tal:attributes="for elt_hour_id"
-           i18n:translate="cpsschema_hour">h</label>
-    <select tal:attributes="name elt_minute_id;
-                            id elt_minute_id">
-      <tal:block repeat="m minutes">
-        <option tal:attributes="value m; selected python:int(minute)==m"
-          tal:content="python:'%2.2i'%m" />
-      </tal:block>
-      <tal:block condition="python:int(minute) not in minutes">
-        <option tal:attributes="value minute" tal:content="minute"
-          selected="selected" />
-      </tal:block>
-    </select>
-    <label tal:attributes="for elt_minute_id"
-           i18n:translate="cpsschema_minute">mn</label>
-  </tal:block>
-</tal:block>
-</tal:block>
Index: WAeUP_SRP/base/skins/waeup_custom/widget_image_render.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/widget_image_render.pt	(revision 2211)
+++ 	(revision )
@@ -1,83 +1,0 @@
-<tal:block define="mode options/mode;
-  id here/getWidgetId;
-  fields here/fields;
-  current_filename options/current_filename;
-  empty_file options/empty_file;
-  session_file options/session_file;
-  mimetype options/mimetype;
-  size options/size;
-  content_url options/content_url;
-  last_modified options/last_modified;
-  image_width options/width;
-  image_height options/height;
-  image_tag options/image_tag;
-  ">
-<span tal:condition="python:0">
-  <img tal:condition="python: mode == 'view' and not empty_file"
-    tal:replace="structure image_tag" />
-</span>
-<span tal:condition="python: mode == 'view' and not empty_file">
-  <a href="" target="_new" 
-     tal:attributes="href content_url"
-     tal:content="current_filename" >
-  </a>
-</span>
-
-  <tal:block condition="python: mode == 'edit'">
-
-    <metal:block use-macro="here/widget_file_render/macros/file_size_max_view" />
-
-    <metal:block define-macro="image_title_edit">
-    <span tal:condition="python:0">
-      <metal:block use-macro="here/widget_file_render/macros/file_title_edit">
-      </metal:block>
-    </span>
-    </metal:block>
-
-    <img tal:condition="python: 0 and not empty_file and not session_file"
-      tal:replace="structure image_tag" />
-
-    <metal:block define-macro="image_edit">
-      <tal:block define="allow_resize here/allow_resize|nothing">
-      <metal:block use-macro="here/widget_file_render/macros/file_edit">
-        <metal:block fill-slot="edit_file_action">
-          <metal:block define-slot="edit_file_action" />
-        </metal:block>
-        <metal:block fill-slot="change_file">
-          <input type="radio" class="noborder"  name="." value="change"
-                 tal:attributes="name radio_name;
-                                 id string:${radio_name}_change" />
-          <label i18n:translate="cpsschemas_label_file_change"
-                 tal:attributes="for string:${radio_name}_change">Change</label>
-          <input type="file" name="." size="24"
-                 tal:attributes="name name;
-            onclick string:document.getElementById('${radio_name}_change').checked='checked'" />
-          <tal:block condition="python:1">
-            <input type="hidden" value="img_auto_size" 
-                   tal:attributes="name string:${name}_resize" />
-          </tal:block>
-          <tal:block condition="python:0 and allow_resize">
-            <label i18n:translate="cpsschemas_image_resize"
-                   tal:attributes="for string:${radio_name}_change">resize</label>
-            <select tal:attributes="name string:${name}_resize;
-              onchange string:document.getElementById('${radio_name}_change').checked='checked';"
-              tal:define="wid_size python:(here.display_width, here.display_height);
-              sizes python:[s for s in here.getImgSizes() if not wid_size[0] or s['size'] < wid_size]">
-              <option tal:repeat="op sizes"
-                tal:attributes="value op/id;
-                selected python: op['size'] and (op['size'][0]==image_width
-                                               or op['size'][1]==image_height)"
-                i18n:translate=""
-                ><span tal:replace="op/id" /> <span tal:condition="op/size"
-                  i18n:name="dim"
-                  tal:replace="python:'(%sx%s)' % op['size']">
-                  640x480</span></option>
-            </select>
-          </tal:block>
-        </metal:block>
-      </metal:block>
-      </tal:block>
-    </metal:block>
-
-  </tal:block>
-</tal:block>
Index: WAeUP_SRP/base/skins/waeup_custom/widget_portlet_breadcrumbs.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/widget_portlet_breadcrumbs.pt	(revision 2211)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<tal:block define="ds options/datastructure;
-                   display ds/display;
-                   display_hidden_folders ds/display_hidden_folders;
-                   display_site_root ds/display_site_root;
-                   highlight_last_item ds/highlight_last_item;
-                   highlight_last_item python:int(highlight_last_item);
-                   first_item ds/first_item;
-                   context nocall:options/context_obj|here;
-                   utool nocall:here/portal_url;
-                   context_url python: utool.getRelativeUrl(context);
-                   base_url python: request.get('cpsskins_base_url');
-                   breadcrumbsItems python: context.getBreadcrumbsItems(context=context, display_hidden_folders=display_hidden_folders, first_item=first_item, display_site_root=display_site_root)">
-  <tal:block condition="python: display == 'horizontal_trail'">
-    <!-- the icon should be made optional, e.g. with a "show icon" option -->
-    You are here: 
-    <img tal:attributes="src
-      string:${base_url}cpsskins_images/UpFolder_icon.png;
-      alt string:Up Folder" />
-    <tal:block repeat="item breadcrumbsItems">
-      <tal:block define="last_item repeat/item/end">
-        <strong tal:omit-tag="python: not (highlight_last_item and last_item)">
-        <a href="" tal:attributes="href item/url"
-         tal:content="python: item['title']" />
-        </strong>
-        <tal:block condition="not:last_item"
-         content="structure string:&gt;" />
-      </tal:block>
-    </tal:block>
-  </tal:block>
-</tal:block>
Index: WAeUP_SRP/base/skins/waeup_custom/widget_portlet_search.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_custom/widget_portlet_search.pt	(revision 2211)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<span tal:condition="nothing">
-<form tal:define="ds options/datastructure;
-                  advanced_search_link ds/advanced_search_link;
-                  contextual_search_choice ds/contextual_search_choice;
-                  context_is_portlet ds/context_is_portlet;
-                  utool nocall:here/portal_url;
-                  params here/getSearchFormParams;
-                  search_script params/script;
-                  context nocall:options/context_obj;
-                  contextual_search params/contextual;
-                  advanced_search_form params/advanced;
-                  folder_prefix request/folder_prefix|nothing;
-                  cpsmcat nocall:here/translation_service;
-                  value_search
-                    request/SearchableText|python:cpsmcat('button_search');
-                  base_url python:request.get('cpsskins_base_url');"
- method="get" action=""
- tal:attributes="action search_script"
- onsubmit="return checkEmptySearch(this)">
-  <div tal:condition="python:contextual_search_choice and contextual_search"
-   tal:define="id here/getId; id1 string:${id}1; id2 string:${id}2">
-    <tal:block condition="not:context_is_portlet">
-      <label tal:attributes="for id1"
-       i18n:translate="label_search_here">here</label>
-      <input type="radio" name="folder_prefix"
-       tal:attributes="id id1; checked folder_prefix;
-       value python:utool.getRelativeUrl(context)" />
-      <label tal:attributes="for id2"
-       i18n:translate="label_search_all_site">here</label>
-      <input type="radio" name="folder_prefix" value=""
-       tal:attributes="id id2; checked not:folder_prefix" />
-    </tal:block>
-    <tal:block condition="context_is_portlet">
-      <p tal:define="portlet_folder here/getLocalFolder">
-        <input type="hidden" name="folder_prefix"
-         tal:attributes="value python:utool.getRelativeUrl(portlet_folder)" />
-        <tal:block i18n:translate="">cpsportlets_search_in</tal:block>
-        <em tal:content="portlet_folder/title_or_id" />
-      </p>
-    </tal:block>
-  </div>
-  <div>
-  <input id="searchGadget" type="text" name="SearchableText" size="15"
-    value="" tal:attributes="value value_search"
-    onclick="this.value='';"/>
-  <input class="context searchButton" type="submit" value="button_ok"
-    i18n:attributes="value" />
-  </div>
-  <div>
-    <a href="" tal:condition="advanced_search_link"
-    tal:define="adv_url python:contextual_search and
-                               context.absolute_url() or utool()"
-    i18n:translate="cpsportlets_advanced_search"
-    tal:attributes="href string:${adv_url}/${advanced_search_form}">Advanced search</a>
-  </div>
-</form>
-</span>
Index: WAeUP_SRP/base/skins/waeup_student/apply_pume_manage.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/apply_pume_manage.py	(revision 2211)
+++ WAeUP_SRP/base/skins/waeup_student/apply_pume_manage.py	(revision 2217)
@@ -31,5 +31,5 @@
 
 if not context.isSectionOfficer():
-    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.absolete_url())
+    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.absolute_url())
 
 #type_name = 'StudentApplication'
@@ -106,5 +106,5 @@
     context.applicants_catalog.modifyRecord(**data)
     logger.info('%s reset application record of %s' % (member,reg_no))
-
+set_trace()
 if edit and reg_no:
     #data['reg_no'] = reg_no
@@ -124,5 +124,5 @@
                              commit = False,
                             )
-    
+
 
 return context.apply_pume_manage_form(rendered = res,
