changeset 30:aa4ab114c28a

more work on projects.
author casties
date Tue, 23 Apr 2013 14:36:32 +0200
parents 224023958871
children b12d80f033fb
files HashTree.py MPIWGDepartment.py MPIWGRoot.py css/mpiwg.css
diffstat 4 files changed, 38 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/HashTree.py	Tue Apr 23 10:25:52 2013 +0200
+++ b/HashTree.py	Tue Apr 23 14:36:32 2013 +0200
@@ -85,14 +85,19 @@
     def getNode(self, key):
         """gets node under key from the tree.
         key can be sequence of key string or a single string using keySeparator.
+        If key is None, returns root node.
         """
-        #logging.debug("getNode(key=%s)"%(key))
+        if key is None:
+            return self.root
+
         if isinstance(key, basestring):
             keys = key.split(self.keySeparator)
             if self.keyFn is not None:
                 keys = [self.keyFn(k) for k in keys]
+                
         elif isinstance(key, list):
             keys = key
+            
         else:
             keys = [key]
             
--- a/MPIWGDepartment.py	Tue Apr 23 10:25:52 2013 +0200
+++ b/MPIWGDepartment.py	Tue Apr 23 14:36:32 2013 +0200
@@ -134,7 +134,7 @@
         img = getattr(self, 'img-thumb.jpg')
         return img
         
-    def getThumbImgUrl(self):
+    def getThumbUrl(self):
         """returns the URL of the image object for the sidebar thumbnail"""
         img = getattr(self, 'img-thumb.jpg')
         return img.absolute_url()
@@ -155,7 +155,7 @@
         onlyArchived = 1 : current projects
         onlyArchived = 2 : archived projects
         """
-        pf = self.en.getProjectsFolder()
+        pf = self.en.getProjectFolder()
         projects = pf.getProjectList(self.getProjectId(), active=onlyActive, archived=onlyArchived)
         #logging.debug("getProjects projects=%s"%repr(projects))
         if count > 0:
--- a/MPIWGRoot.py	Tue Apr 23 10:25:52 2013 +0200
+++ b/MPIWGRoot.py	Tue Apr 23 14:36:32 2013 +0200
@@ -273,7 +273,7 @@
         items.sort(key=lambda x:int(x.weight))
         return items
 
-    def getProjectsFolder(self):
+    def getProjectFolder(self):
         """returns the MPIWGProjectFolder"""
         dir = getattr(self, 'projects', None)
         return dir
--- a/css/mpiwg.css	Tue Apr 23 10:25:52 2013 +0200
+++ b/css/mpiwg.css	Tue Apr 23 14:36:32 2013 +0200
@@ -514,7 +514,7 @@
 }
 
 div.tool.box h3:first-child {
-    /* does this work correctly? */
+    /* top header has no margin */
     margin-top: 0;
 }
 
@@ -551,6 +551,10 @@
     background-color: white;
 }
 
+div.tool.box div.box.thumbs {
+    width: 420px;
+}
+
 /* 
  * service box on frontpage 
  */
@@ -620,6 +624,15 @@
     margin-bottom: 5px;
     border: 0;
 }
+/* toolbox with thumbs */
+div.box.thumbs div.thumb {
+    display: inline;
+}
+div.box.thumbs div.thumb img {
+    width: 55px;
+    height: 34px;
+}
+
 
 /*
  * other boxes
@@ -652,7 +665,7 @@
 }
 
 /*
- * small boxes with thumbnail
+ * small box with thumbnail
  */
 div.mini {
     padding: 10px 0;
@@ -660,6 +673,7 @@
 }
 
 div.row.quintuple div.mini {
+    max-width: 122px;
     font-size: 11px;
 }
 
@@ -707,15 +721,9 @@
     font-size: 14px;
 }
 
-/* paragraph with line */
-div.item {
-    padding-top: 5px;
-    padding-bottom: 5px;
-    border-bottom: 1px solid #dccbae;
-    line-height: 1.5;
-}
-
-/* slider buttons */
+/* 
+ * slider buttons 
+ */
 div.box div.slider {
     position: absolute;
     top: 110px;
@@ -733,6 +741,16 @@
 }
 
 /* 
+ * paragraph with line
+ */
+div.item {
+    padding-top: 5px;
+    padding-bottom: 5px;
+    border-bottom: 1px solid #dccbae;
+    line-height: 1.5;
+}
+
+/* 
  * sidebar 
  */
 div.sidebar {