Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_view.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_view.py	(revision 293)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_view.py	(revision 295)
@@ -1,17 +1,73 @@
-##parameters=REQUEST=None,psm=None,groups=None
+##parameters=REQUEST=None
 # $Id$
+"""
+"""
+request = REQUEST
+rget = request.get
+rset = request.set
+fget = request.form.get
+form = request.form
+fhas = request.form.has_key
 
-"""Default view for the forum. If post_id is not None, post with id = <post_id>
-will be displayed, otherwise first post will be displayed."""
 
-member = context.portal_membership.getAuthenticatedMember()
+lt = context.portal_layouts
+pr = context.portal_registration
+pm = context.portal_membership
+items = context.contentValues()
 
-if not context.portal_membership.isAnonymousUser():
-    if 'Manager' in member.getRoles():
-        return context.folder_view()
-index = getattr(context,'documents',None)
-if index:
-    fp = getattr(index,'academicsfrontpage',None)
-    if fp:
-        return fp() 
-return context.academics.academics_view_all(psm=psm)
+validate = fhas('add') or fhas('change') or fhas('delete')
+res,psm,ds = lt.renderLayout(layout_id='faculty_row',
+                      schema_id= 'faculty_row',
+                      context=context,
+                      mapping= {},#validate and request,
+                      ob={},
+                      layout_mode='edit',
+                      formaction = "academics_view",
+                      items=items,
+                      )
+#return res
+
+if 1 or psm == 'invalid':
+    return context.academics_view_form(rendered = res,
+                                 psm = 'Please correct your errors',
+                                 ds = ds,
+                                 )
+elif psm == '':
+    return context.academics_view_form(rendered = res,
+                                 psm = psm,
+                                 ds = ds,
+                                 )
+inr = 0
+if fhas('add') and (fget('type') or fget('subject') or fget('result')):
+    sr.append((fget('type'),fget('subject'),fget('result')))
+    psm = "new result added"
+elif fhas('change') and fget('keys'):
+    for k in fget('keys'):
+        sr[int(k)] = (fget('type_%s' % k),fget('subject_%s' % k),fget('result_%s' % k))
+        inr += 1
+    psm = "%s items changed" % inr
+elif fhas('delete') and fget('keys'):
+    new = []
+    todelete = fget('keys')
+    for k in range(len(sr)):
+        if str(k) not in todelete:
+            new.append(sr[k])
+    inr = len(todelete)
+    sr = new
+    psm = "%s items deleted" % inr
+elif psm == 'valid':
+    psm = "Your changes have been saved."
+
+res,dummy,fds = lt.renderLayout(layout_id= 'faculty_row',
+                      schema_id= 'faculty_row',
+                      context=context,
+                      mapping=request,
+                      ob={},
+                      layout_mode='create',
+                      formaction = "academics_view",
+                      )
+
+return context.academic_view_form(rendered = res,
+                                 #psm = "%s <br /> %s" % (str(ds),str(lt.faculty_row.getLayoutDefinition()))
+                                 psm = psm,
+                                 )
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_view_all.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_view_all.pt	(revision 293)
+++ 	(revision )
@@ -1,37 +1,0 @@
-<html metal:use-macro="here/content_lib_master/macros/master">
-
-  <metal:block fill-slot="head_slot">
-    <tal:block tal:define="student here/getContent">
-    </tal:block>
-  </metal:block>
-
-  <metal:block fill-slot="css_slot">
-    <link rel="Stylesheet" type="text/css" href=""
-          tal:attributes="href string:${base_url}student.css" />
-  </metal:block>
-  <metal:block fill-slot="header">
-  </metal:block>
-
-  <metal:block fill-slot="main"
-               tal:define="items here/contentValues">
-    <h2>Academics (Faculties)</h2>
-    <table cellspacing="0" cellpadding="0">
-      <tal:block condition="python: len(items)">
-        <span tal:repeat="item items">
-          <tr tal:condition="python:item.portal_type == 'Faculty'">
-            <td colspan="1">
-              <a href="faculty" tal:attributes="href item/absolute_url" tal:content="item/title_or_id"></a>
-            </td>
-          </tr>
-        </span>
-      </tal:block>
-      <tr tal:condition="python:not len(items)">
-        <td>
-          nothing yet !
-        </td>
-      </tr>
-    </table>
-  </metal:block>
-  <metal:block fill-slot="sub">
-  </metal:block>
-</html>
Index: WAeUP_SRP/trunk/skins/waeup_academics/academics_view_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_academics/academics_view_form.pt	(revision 295)
+++ WAeUP_SRP/trunk/skins/waeup_academics/academics_view_form.pt	(revision 295)
@@ -0,0 +1,29 @@
+<html metal:use-macro="here/content_lib_master/macros/master">
+  <metal:block fill-slot="head_slot">
+  </metal:block>
+
+  <metal:block fill-slot="css_slot">
+    <link rel="Stylesheet" type="text/css" href=""
+      tal:attributes="href string:${base_url}document.css" />
+  </metal:block>
+  <metal:block fill-slot="header">
+  </metal:block>
+
+  <metal:block fill-slot="main"
+               tal:define="roles member/getRoles;
+               backend python:'UniversityManager' in roles or 'StudentManager' in roles;
+               frontend python:'Student' in roles or isAnon;
+               folder here/getContent;
+               items here/contentValues;
+               rendered options;"
+               >
+    <h1> <span tal:content="context/title_or_id" /></h1>      
+  
+    <p>The Acamdemic Section</p>       
+ 
+    <p>The Faculties:</p>
+<span tal:replace="structure rendered" />  
+  </metal:block>
+  <metal:block fill-slot="sub">
+  </metal:block>
+</html>
Index: WAeUP_SRP/trunk/skins/waeup_default/layout_row_edit.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/layout_row_edit.pt	(revision 295)
+++ WAeUP_SRP/trunk/skins/waeup_default/layout_row_edit.pt	(revision 295)
@@ -0,0 +1,187 @@
+<tal:block define="global creation python:1" />
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             creation creation|nothing;
+             metadata metadata|nothing;
+             type_name request/type_name|nothing;
+             ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+             creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
+             edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
+             metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
+             formaction options/formaction;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             results options/items;
+             "
+             >
+  <span tal:content="structure layout" tal:condition="python: 0" />
+  <form tal:condition="python: 1" action='tobereplaced' method='post' tal:attributes="action formaction"
+        enctype='multipart/form-data' class='workflow'>
+    <div class=''>
+      <div class='documentFields'>
+        <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout">
+          <tr tal:repeat="item results" valign="top">
+            <td>
+        <table width="100%" cellpadding="2" cellspacing="2" summary="Form layout">
+          <tr tal:repeat="row layout/rows" valign="top">
+            <td tal:repeat="cell row"
+                tal:attributes="colspan cell/ncols">
+              <tal:block define="widget cell/widget;
+              wid widget/getWidgetId;
+              dm options/datastructure/getDataModel;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required widget/is_required|nothing;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              widget_css_class python:test(is_flexible, 'group', widget_css_class);
+              css_class python:test(err, 'row error',
+              test(is_flexible, 'group', 'row'))"
+              >
+                <div tal:attributes="class widget_css_class;
+                id python:widget.getHtmlWidgetId()+'_widget';"
+                >
+                  <div class="label" tal:condition="widget/label_edit"
+                       tal:attributes="class python:test(is_required, 'label required','label')">
+                    <label i18n:translate="" tal:condition="widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                    <label tal:condition="not:widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                  </div>
+                  <button type="button" class="tooltipControl"
+                          tal:condition="widget/help"
+                          tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+                  <div class="field">
+                    <div tal:replace="structure cell/widget_rendered"/>
+                  </div>
+                  <div class="tooltipArea" style="visibility: hidden;"
+                       tal:condition="widget/help"
+                       tal:attributes="id tooltip_id;
+                       onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                       >
+                    <tal:block i18n:translate="" tal:condition="widget/is_i18n"
+                               tal:content="widget/help">i18_key-help_for_this_field</tal:block>
+                    <tal:block tal:condition="not:widget/is_i18n"
+                               tal:content="widget/help">This is the help for this field</tal:block>
+                  </div>
+                  <tal:block condition="err">
+                    <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                      <br /><em style="color: red"
+                                tal:content="msg">err</em>
+                    </tal:block>
+                  </tal:block>
+                </div>
+              </tal:block>
+            </td>
+          </tr>
+        </table>
+            </td>
+          </tr>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="change" value=" Change " />
+          <input class="standalone" type="submit" name="delete" value=" Delete " />
+        </td>
+      </tr>
+        </table>
+    <table cellspacing="0" cellpadding="2" border="0" width="100%" tal:condition="nothing">
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <span tal:repeat="row results" tal:condition="python: 0" tal:omit-tag="">
+        <tr tal:define="rindex repeat/row/index">
+          <td align="left" valign="top">
+            <input type="checkbox" name="keys:list" value="100" tal:attributes="value string:${repeat/row/index}"/>
+          </td>
+          <td align="left" valign="top">
+            <div class="field">
+              <input type="text" name="key_0" value="100" size="20" 
+                     tal:attributes="name string:type_${rindex};value python:row[0]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="label_0" value="Year 1 (100 Level)" size="40" 
+                     tal:attributes="name string:subject_${rindex};value python:row[1]" />
+            </div>
+          </td>
+          <td align="left">
+            <div class="field">
+              <input type="text" name="msgid_0" value="" size="10" 
+                     tal:attributes="name string:result_${rindex};value python:row[2]" />
+            </div>
+          </td>
+        </tr>
+      </span>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="change" value=" Change " />
+          <input class="standalone" type="submit" name="delete" value=" Delete " />
+        </td>
+      </tr>
+    </table>
+    <table tal:condition="python:0" cellspacing="0" cellpadding="2" border="0" width="100%">
+      <tr>
+        <td align="left" valign="top" colspan="2">
+          <div>Add a new post-primary school result:</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Type</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Subject</div>
+        </td>
+        <td align="left" valign="top">
+          <div class="label">Result</div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" valign="top">
+          &nbsp;
+        </td>
+        <td align="left" valign="top">
+          <div  class="field">
+            <input type="text" name="type" value="" size="20" /> 
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="subject" value="" size="40" />
+          </div>
+        </td>
+        <td align="left">
+          <div  class="field">
+            <input type="text" name="result" value="" size="10" />
+          </div>
+        </td>
+      </tr>
+      <tr>
+        <td align="left" colspan="3">
+          <input class="standalone" type="submit" name="add" value=" Change/Add " />
+        </td>
+      </tr>
+    </table>
+  </form>
+</metal:block>
+  
