diff zpt/staff/edit_main.zpt @ 159:ee79f6ba8d01

clean up staff editing and some zpt forms.
author casties
date Thu, 06 Jun 2013 15:34:20 +0200
parents 9b38ba45773b
children 485bf377913a
line wrap: on
line diff
--- a/zpt/staff/edit_main.zpt	Thu Jun 06 14:00:31 2013 +0200
+++ b/zpt/staff/edit_main.zpt	Thu Jun 06 15:34:20 2013 +0200
@@ -1,35 +1,36 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html metal:define-macro="page">
+<html metal:define-macro="page"
+  tal:define="global onload nothing;
+              global menusel nothing;
+              global staffroot python:here.MPIWGrootURL()+'/members';
+              global root string:$staffroot/${here/getUsername};">
 <head>
-  <!--  <base tal:attributes="href python:here.getStaffURL()+'/'"/>-->
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-  <link rel="stylesheet" href="editstaff.css" type="text/css"/>  
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+  <link rel="stylesheet" tal:attributes="href string:$staffroot/edit_css" type="text/css"/>  
   <metal:x metal:define-slot="javascript"/>
 </head>
-<body onload="kupu = startKupu();">
-  <h2 class="title">Edit homepage of <span tal:replace="python:here.content.first_name"/> <span tal:replace="python:here.content.last_name"/></h2>
+<body tal:attributes="onload onload">
+  <h2 class="title">Edit homepage of <span tal:replace="here/content/first_name"/> <span tal:replace="here/content/last_name"/></h2>
   <metal:block metal:define-slot="navsel"/>
    <p>Please contact the support group <a href="mailto:support@mpiwg-berlin.mpg.de">support@mpiwg-berlin.mpg.de (Tel. 247)</a>, if you need any help.</p>
   
   <div class="mainnav">
-    <span tal:attributes="class python:here.getPathStyle('maindata', menusel, 'mainmenu')"><a href="edit">Basic Data</a></span>
-    <span tal:attributes="class python:here.getPathStyle('cv', menusel, 'mainmenu')"><a href="editProfile">Profile</a></span>
-    <span tal:attributes="class python:here.getPathStyle('publications', menusel, 'mainmenu')"><a href="editPublications">Publications</a></span>
-    <span tal:attributes="class python:here.getPathStyle('research', menusel, 'mainmenu')"><a href="editShortEntry">Research: short entry</a></span>
-    <span tal:attributes="class python:here.getPathStyle('image', menusel, 'mainmenu')"><a href="editImage">Photo</a></span>
-    <span tal:attributes="class python:here.getPathStyle('downloads', menusel, 'mainmenu')"><a href="editDownloads">Edit 
+    <span tal:attributes="class python:here.getPathStyle('maindata', menusel, 'mainmenu')"><a tal:attributes="href string:$root/edit">Basic Data</a></span>
+    <span tal:attributes="class python:here.getPathStyle('cv', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editProfile">Profile</a></span>
+    <span tal:attributes="class python:here.getPathStyle('publications', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editPublications">Publications</a></span>
+    <span tal:attributes="class python:here.getPathStyle('research', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editShortEntry">Research: short entry</a></span>
+    <span tal:attributes="class python:here.getPathStyle('image', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editImage">Photo</a></span>
+    <span tal:attributes="class python:here.getPathStyle('downloads', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editDownloads">Edit 
 downloads</a></span>
     <!--  <span tal:attributes="class python:here.getPathStyle('cv', menusel, 'mainmenu')"><a href="editCV">Curriculum Vitae</a></span>-->
     
     <!--  <span tal:attributes="class python:here.getPathStyle('awards', menusel, 'mainmenu')"><a href="editAwards">Awards</a></span>-->
-    <span tal:attributes="class python:here.getPathStyle('talks', menusel, 'mainmenu')"><a href="editTalks">Talks</a></span>
-    <span tal:attributes="class python:here.getPathStyle('teaching', menusel, 'mainmenu')"><a href="editTeaching">Teaching</a></span>
-    <span tal:attributes="class python:here.getPathStyle('additionalLink', menusel, 'mainmenu')"><a href="editAdditionalLinks">Additional links</a></span>
- 
+    <span tal:attributes="class python:here.getPathStyle('talks', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editTalks">Talks</a></span>
+    <span tal:attributes="class python:here.getPathStyle('teaching', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editTeaching">Teaching</a></span>
+    <span tal:attributes="class python:here.getPathStyle('additionalLink', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editAdditionalLinks">Additional links</a></span>
     
-    
-    <span class="mainmenu"><a tal:attributes="href python:'http://www.mpiwg-berlin.mpg.de/en/staff/members/'+here.getStaffURL()+'/index_html'" target="_blank">View</a></span>
+    <span class="mainmenu"><a tal:attributes="href python:here.en.MPIWGrootURL()+'/staff/members/'+here.getUsername()" target="_blank">View</a></span>
   </div>
   <div class="content">
   <tal:block metal:define-slot="body"/>