Index: /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/layout.py
===================================================================
--- /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/layout.py	(revision 5413)
+++ /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/layout.py	(revision 5414)
@@ -121,4 +121,10 @@
         return usertitle
 
+    def getUserId(self):
+        """Return id of current user.
+        """
+        userid = self.request.principal.id
+        return userid
+
     def update(self):
         yui.reset_fonts_grids.need()
Index: /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/pages.py
===================================================================
--- /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/pages.py	(revision 5413)
+++ /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/pages.py	(revision 5414)
@@ -293,4 +293,24 @@
         self.hitlist = search(query=self.query, view=self)
         return
+        
+#
+# Contact forms...
+#
+class ContactAdminForm(WAeUPPage):
+    grok.context(IUniversity)
+    grok.name('contactadmin')
+    grok.template('contactadminform')
+    grok.require('waeup.Public')
+    pnav = 3 
+    
+    def title(self):
+        """Return True if the calling user is authenticated.
+        """
+        userid = self.request.principal.id
+        if userid != 'zope.anybody':
+            tt = u'Contact' 
+        else:
+            tt = u'Enquiries'         
+        return tt     
 
 #
Index: /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/templates/contactadminform.pt
===================================================================
--- /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/templates/contactadminform.pt	(revision 5414)
+++ /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/templates/contactadminform.pt	(revision 5414)
@@ -0,0 +1,37 @@
+<form id="form1" name="form1" method="post" action="mail2admin">
+<input type="hidden" name="regno" type="text" id="regno"
+     tal:attributes="value layout/getUserId"/>
+<table width="100%" border="0" cellspacing="5" cellpadding="0">
+<tr>
+  <td width="150px">
+     <strong>Full Name: </strong>
+  </td>
+  <td tal:condition="not:layout/isAuthenticated">
+     <input name="fullname" type="text" id="fullname" />
+  </td>
+  <td tal:condition="layout/isAuthenticated" tal:content="layout/getUserTitle">
+      User Name
+  </td>  
+</tr>
+<tr>
+  <td>
+     <strong>Email: </strong>
+  </td>
+  <td>
+     <input name="email" type="text" id="email" />
+  </td>
+</tr>
+<tr>
+  <td valign="top">
+     <strong>Text: </strong>
+  </td>
+  <td>
+     <textarea name="descr" rows="10" cols="60" id="descr"></textarea>
+  </td>
+</tr>
+<tr>
+  <td>&nbsp;</td>
+  <td><input name="Submit" type="submit" class="standalone" value="Submit" /></td>
+</tr>
+</table>
+</form>
Index: /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/viewlets.py
===================================================================
--- /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/viewlets.py	(revision 5413)
+++ /main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/viewlets.py	(revision 5414)
@@ -542,4 +542,28 @@
     def link_target(self):
         return self.view.application_url('@@search')
+        
+class ContactTab(PrimaryNavTab):
+    """Contact tab in primary navigation.
+    """
+    grok.order(4)
+    grok.require('waeup.Public')
+    grok.template('primarynavtab')
+    
+    pnav = 3
+    def tab_title(self):
+        """Return True if the calling user is authenticated.
+        """
+        userid = self.request.principal.id
+        if userid != 'zope.anybody':
+            tt = u'Contact' 
+        else:
+            tt = u'Enquiries'         
+        return tt 
+
+    @property
+    def link_target(self):
+        return self.view.application_url('contactadmin')        
+
+
 
 #
