[cig-commits] r11624 - in cs/portal/trunk/seismo/SeismoWebPortal: . designs/plone static static/css static/icons templates/SeismoWebPortal

leif at geodynamics.org leif at geodynamics.org
Fri Mar 28 13:01:01 PDT 2008


Author: leif
Date: 2008-03-28 13:01:00 -0700 (Fri, 28 Mar 2008)
New Revision: 11624

Added:
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/document.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/eventcat.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/eventfinder.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/folder.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/mesh.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/modecat.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/model.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/parameters.gif
   cs/portal/trunk/seismo/SeismoWebPortal/static/icons/stationlist.gif
Modified:
   cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.html
   cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.py
   cs/portal/trunk/seismo/SeismoWebPortal/gmt.py
   cs/portal/trunk/seismo/SeismoWebPortal/gui.py
   cs/portal/trunk/seismo/SeismoWebPortal/models.py
   cs/portal/trunk/seismo/SeismoWebPortal/static/css/style.css
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/desktop.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/home.html
   cs/portal/trunk/seismo/SeismoWebPortal/views.py
Log:
Added some icons.


Modified: cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.html	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.html	2008-03-28 20:01:00 UTC (rev 11624)
@@ -5,8 +5,11 @@
 
 <ul id="portal-globalnav">
     #for $window in $desktop.windowList
-        #set $klass = $window is $desktop.activeWindow and "selected" or "plain"
-        <li class="$klass"><a href="$window.url">$window.title</a></li>
+        #if $window is $desktop.activeWindow
+            <li class="selected"><a href="$window.url">$window.icon $window.title</a></li>
+        #else
+            <li class="plain"><a href="$window.url">$window.title</a></li>
+        #end if
     #end for
 </ul>
 
@@ -83,15 +86,17 @@
                     </dl>
                 </div>
             </td>
-            #endif
+            #end if
             <td id="portal-column-content">
                 #if $appWindow.windowList
                     <div id="content" class="documentEditable">
                         <ul class="contentViews">
-                            #for $window in $appWindow.windowList
-                                #set $klass = $window is $appWindow.activeWindow and "selected" or "plain"
-                                <li class="$klass"><a href="$window.url">$window.title</a></li>
-                            #end for
+                            #if $len($appWindow.windowList) > 1
+                                #for $window in $appWindow.windowList
+                                    #set $klass = $window is $appWindow.activeWindow and "selected" or "plain"
+                                    <li class="$klass"><a href="$window.url">$window.title</a></li>
+                                #end for
+                            #end if
                         </ul>
                         <div class="contentActions">
                             <ul>
@@ -124,14 +129,14 @@
                                             </dl>
                                         </li>
                                     #end for
-                                #endif
+                                #end if
                             </ul>
                         </div>
                         <div class="documentContent" id="region-content">
                             $design.render($appWindow.activeWindow.content)
                         </div>
                     </div>
-                #endif
+                #end if
             </td>
 
 <!--

Modified: cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.py	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/designs/plone/Desktop.py	2008-03-28 20:01:00 UTC (rev 11624)
@@ -33,10 +33,10 @@
 currentTime=time.time
 __CHEETAH_version__ = '2.0rc7'
 __CHEETAH_versionTuple__ = (2, 0, 0, 'candidate', 7)
-__CHEETAH_genTime__ = 1206636933.3486111
-__CHEETAH_genTimestamp__ = 'Thu Mar 27 09:55:33 2008'
+__CHEETAH_genTime__ = 1206731980.3169739
+__CHEETAH_genTimestamp__ = 'Fri Mar 28 12:19:40 2008'
 __CHEETAH_src__ = 'Desktop.html'
-__CHEETAH_srcLastModified__ = 'Thu Mar 27 09:55:30 2008'
+__CHEETAH_srcLastModified__ = 'Fri Mar 28 12:19:33 2008'
 __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
@@ -95,17 +95,25 @@
 <ul id="portal-globalnav">
 ''')
         for window in VFFSL(SL,"desktop.windowList",True): # generated from line 7, col 5
-            klass = VFFSL(SL,"window",True) is VFFSL(SL,"desktop.activeWindow",True) and "selected" or "plain"
-            write('        <li class="')
-            _v = VFFSL(SL,"klass",True) # '$klass' on line 9, col 20
-            if _v is not None: write(_filter(_v, rawExpr='$klass')) # from line 9, col 20.
-            write('"><a href="')
-            _v = VFFSL(SL,"window.url",True) # '$window.url' on line 9, col 37
-            if _v is not None: write(_filter(_v, rawExpr='$window.url')) # from line 9, col 37.
-            write('">')
-            _v = VFFSL(SL,"window.title",True) # '$window.title' on line 9, col 50
-            if _v is not None: write(_filter(_v, rawExpr='$window.title')) # from line 9, col 50.
-            write('</a></li>\n')
+            if VFFSL(SL,"window",True) is VFFSL(SL,"desktop.activeWindow",True): # generated from line 8, col 9
+                write('            <li class="selected"><a href="')
+                _v = VFFSL(SL,"window.url",True) # '$window.url' on line 9, col 43
+                if _v is not None: write(_filter(_v, rawExpr='$window.url')) # from line 9, col 43.
+                write('">')
+                _v = VFFSL(SL,"window.icon",True) # '$window.icon' on line 9, col 56
+                if _v is not None: write(_filter(_v, rawExpr='$window.icon')) # from line 9, col 56.
+                write(' ')
+                _v = VFFSL(SL,"window.title",True) # '$window.title' on line 9, col 69
+                if _v is not None: write(_filter(_v, rawExpr='$window.title')) # from line 9, col 69.
+                write('</a></li>\n')
+            else: # generated from line 10, col 9
+                write('            <li class="plain"><a href="')
+                _v = VFFSL(SL,"window.url",True) # '$window.url' on line 11, col 40
+                if _v is not None: write(_filter(_v, rawExpr='$window.url')) # from line 11, col 40.
+                write('">')
+                _v = VFFSL(SL,"window.title",True) # '$window.title' on line 11, col 53
+                if _v is not None: write(_filter(_v, rawExpr='$window.title')) # from line 11, col 53.
+                write('</a></li>\n')
         write('''</ul>
 
 <div id="portal-personaltools-wrapper"><ul id="portal-personaltools">
@@ -118,21 +126,21 @@
                title="Large Text">Large</a></li>
 
 ''')
-        if VFFSL(SL,"desktop.user",True): # generated from line 22, col 5
+        if VFFSL(SL,"desktop.user",True): # generated from line 25, col 5
             write('        <li class="portalUser">\n            <!--<a id="user-name" href="">-->\n                <span class="visualCaseSensitive">')
-            _v = VFFSL(SL,"desktop.user.first_name",True) # '$desktop.user.first_name' on line 25, col 51
-            if _v is not None: write(_filter(_v, rawExpr='$desktop.user.first_name')) # from line 25, col 51.
+            _v = VFFSL(SL,"desktop.user.first_name",True) # '$desktop.user.first_name' on line 28, col 51
+            if _v is not None: write(_filter(_v, rawExpr='$desktop.user.first_name')) # from line 28, col 51.
             write(' (')
-            _v = VFFSL(SL,"desktop.user.username",True) # '$desktop.user.username' on line 25, col 77
-            if _v is not None: write(_filter(_v, rawExpr='$desktop.user.username')) # from line 25, col 77.
+            _v = VFFSL(SL,"desktop.user.username",True) # '$desktop.user.username' on line 28, col 77
+            if _v is not None: write(_filter(_v, rawExpr='$desktop.user.username')) # from line 28, col 77.
             write(''')</span>
             <!--</a>-->
         </li>
    
         <li>
             <a href="''')
-            _v = VFFSL(SL,"root",True) # '$root' on line 30, col 22
-            if _v is not None: write(_filter(_v, rawExpr='$root')) # from line 30, col 22.
+            _v = VFFSL(SL,"root",True) # '$root' on line 33, col 22
+            if _v is not None: write(_filter(_v, rawExpr='$root')) # from line 33, col 22.
             write('''/profile/">
                 Profile
             </a>
@@ -140,17 +148,17 @@
     
         <li>
             <a href="''')
-            _v = VFFSL(SL,"root",True) # '$root' on line 36, col 22
-            if _v is not None: write(_filter(_v, rawExpr='$root')) # from line 36, col 22.
+            _v = VFFSL(SL,"root",True) # '$root' on line 39, col 22
+            if _v is not None: write(_filter(_v, rawExpr='$root')) # from line 39, col 22.
             write('''/logout/">
                 Log out
             </a>
         </li>
 ''')
-        else: # generated from line 40, col 5
+        else: # generated from line 43, col 5
             write('        <li>\n            <a href="')
-            _v = VFFSL(SL,"root",True) # '$root' on line 42, col 22
-            if _v is not None: write(_filter(_v, rawExpr='$root')) # from line 42, col 22.
+            _v = VFFSL(SL,"root",True) # '$root' on line 45, col 22
+            if _v is not None: write(_filter(_v, rawExpr='$root')) # from line 45, col 22.
             write('''/login/">
                Log in
             </a>
@@ -164,10 +172,10 @@
         appWindow = VFFSL(SL,"desktop.activeWindow",True)
         write('\n\n')
         breadcrumbs = VFFSL(SL,"getattr",False)(VFFSL(SL,"appWindow",True), 'breadcrumbs', None)
-        if VFFSL(SL,"breadcrumbs",True): # generated from line 55, col 1
+        if VFFSL(SL,"breadcrumbs",True): # generated from line 58, col 1
             write('    <div id="portal-breadcrumbs">\n        <span id="breadcrumbs-you-are-here">You are here:</span> ')
-            _v = VFN(VFFSL(SL,"design",True),"renderBreadcrumbs",False)(VFFSL(SL,"breadcrumbs",True)) # '$design.renderBreadcrumbs($breadcrumbs)' on line 57, col 66
-            if _v is not None: write(_filter(_v, rawExpr='$design.renderBreadcrumbs($breadcrumbs)')) # from line 57, col 66.
+            _v = VFN(VFFSL(SL,"design",True),"renderBreadcrumbs",False)(VFFSL(SL,"breadcrumbs",True)) # '$design.renderBreadcrumbs($breadcrumbs)' on line 60, col 66
+            if _v is not None: write(_filter(_v, rawExpr='$design.renderBreadcrumbs($breadcrumbs)')) # from line 60, col 66.
             write('\n    </div>\n')
         write('''
 
@@ -180,7 +188,7 @@
     <tbody>
         <tr>
 ''')
-        if VFFSL(SL,"hasattr",False)(VFFSL(SL,"appWindow",True), 'renderNavTree'): # generated from line 70, col 13
+        if VFFSL(SL,"hasattr",False)(VFFSL(SL,"appWindow",True), 'renderNavTree'): # generated from line 73, col 13
             navTree = VFN(VFFSL(SL,"appWindow",True),"renderNavTree",False)(VFFSL(SL,"design",True))
             write('''            <td id="portal-column-one">
                 <div class="visualPadding">
@@ -191,8 +199,8 @@
                         <dd class="portletItem lastItem">
                             <ul class="portletNavigationTree navTreeLevel0">
                                 ''')
-            _v = VFFSL(SL,"navTree",True) # '$navTree' on line 80, col 33
-            if _v is not None: write(_filter(_v, rawExpr='$navTree')) # from line 80, col 33.
+            _v = VFFSL(SL,"navTree",True) # '$navTree' on line 83, col 33
+            if _v is not None: write(_filter(_v, rawExpr='$navTree')) # from line 83, col 33.
             write('''
                             </ul>
                         </dd>
@@ -201,20 +209,21 @@
             </td>
 ''')
         write('            <td id="portal-column-content">\n')
-        if VFFSL(SL,"appWindow.windowList",True): # generated from line 88, col 17
+        if VFFSL(SL,"appWindow.windowList",True): # generated from line 91, col 17
             write('                    <div id="content" class="documentEditable">\n                        <ul class="contentViews">\n')
-            for window in VFFSL(SL,"appWindow.windowList",True): # generated from line 91, col 29
-                klass = VFFSL(SL,"window",True) is VFFSL(SL,"appWindow.activeWindow",True) and "selected" or "plain"
-                write('                                <li class="')
-                _v = VFFSL(SL,"klass",True) # '$klass' on line 93, col 44
-                if _v is not None: write(_filter(_v, rawExpr='$klass')) # from line 93, col 44.
-                write('"><a href="')
-                _v = VFFSL(SL,"window.url",True) # '$window.url' on line 93, col 61
-                if _v is not None: write(_filter(_v, rawExpr='$window.url')) # from line 93, col 61.
-                write('">')
-                _v = VFFSL(SL,"window.title",True) # '$window.title' on line 93, col 74
-                if _v is not None: write(_filter(_v, rawExpr='$window.title')) # from line 93, col 74.
-                write('</a></li>\n')
+            if VFFSL(SL,"len",False)(VFFSL(SL,"appWindow.windowList",True)) > 1: # generated from line 94, col 29
+                for window in VFFSL(SL,"appWindow.windowList",True): # generated from line 95, col 33
+                    klass = VFFSL(SL,"window",True) is VFFSL(SL,"appWindow.activeWindow",True) and "selected" or "plain"
+                    write('                                    <li class="')
+                    _v = VFFSL(SL,"klass",True) # '$klass' on line 97, col 48
+                    if _v is not None: write(_filter(_v, rawExpr='$klass')) # from line 97, col 48.
+                    write('"><a href="')
+                    _v = VFFSL(SL,"window.url",True) # '$window.url' on line 97, col 65
+                    if _v is not None: write(_filter(_v, rawExpr='$window.url')) # from line 97, col 65.
+                    write('">')
+                    _v = VFFSL(SL,"window.title",True) # '$window.title' on line 97, col 78
+                    if _v is not None: write(_filter(_v, rawExpr='$window.title')) # from line 97, col 78.
+                    write('</a></li>\n')
             write('''                        </ul>
                         <div class="contentActions">
                             <ul>
@@ -227,42 +236,42 @@
                                     </a>
                                 </li>
 ''')
-            for button in VFFSL(SL,"appWindow.activeWindow.buttons",True): # generated from line 106, col 33
+            for button in VFFSL(SL,"appWindow.activeWindow.buttons",True): # generated from line 111, col 33
                 write('                                    <li><a href="')
-                _v = VFFSL(SL,"button.url",True) # '$button.url' on line 107, col 50
-                if _v is not None: write(_filter(_v, rawExpr='$button.url')) # from line 107, col 50.
+                _v = VFFSL(SL,"button.url",True) # '$button.url' on line 112, col 50
+                if _v is not None: write(_filter(_v, rawExpr='$button.url')) # from line 112, col 50.
                 write('">')
-                _v = VFFSL(SL,"button.title",True) # '$button.title' on line 107, col 63
-                if _v is not None: write(_filter(_v, rawExpr='$button.title')) # from line 107, col 63.
+                _v = VFFSL(SL,"button.title",True) # '$button.title' on line 112, col 63
+                if _v is not None: write(_filter(_v, rawExpr='$button.title')) # from line 112, col 63.
                 write('</a></li>\n')
-            if VFFSL(SL,"appWindow.activeWindow.menuBar",True): # generated from line 109, col 33
+            if VFFSL(SL,"appWindow.activeWindow.menuBar",True): # generated from line 114, col 33
                 menuBar = VFN(VFFSL(SL,"appWindow.activeWindow",True),"menuBar",True)[:]
                 VFN(VFFSL(SL,"menuBar",True),"reverse",False)()
-                for menu in VFFSL(SL,"menuBar",True): # generated from line 112, col 37
+                for menu in VFFSL(SL,"menuBar",True): # generated from line 117, col 37
                     write('                                        <li>\n                                            <dl class="actionMenu" id="')
-                    _v = VFFSL(SL,"menu.id",True) # '$menu.id' on line 114, col 72
-                    if _v is not None: write(_filter(_v, rawExpr='$menu.id')) # from line 114, col 72.
+                    _v = VFFSL(SL,"menu.id",True) # '$menu.id' on line 119, col 72
+                    if _v is not None: write(_filter(_v, rawExpr='$menu.id')) # from line 119, col 72.
                     write('">\n                                                <dt class="actionMenuHeader"><a href="')
-                    _v = VFFSL(SL,"menu.url",True) # '$menu.url' on line 115, col 87
-                    if _v is not None: write(_filter(_v, rawExpr='$menu.url')) # from line 115, col 87.
+                    _v = VFFSL(SL,"menu.url",True) # '$menu.url' on line 120, col 87
+                    if _v is not None: write(_filter(_v, rawExpr='$menu.url')) # from line 120, col 87.
                     write('">')
-                    _v = VFFSL(SL,"menu.title",True) # '$menu.title' on line 115, col 98
-                    if _v is not None: write(_filter(_v, rawExpr='$menu.title')) # from line 115, col 98.
+                    _v = VFFSL(SL,"menu.title",True) # '$menu.title' on line 120, col 98
+                    if _v is not None: write(_filter(_v, rawExpr='$menu.title')) # from line 120, col 98.
                     write('''</a></dt>
                                                 <dd class="actionMenuContent">
                                                     <ul>
 ''')
-                    for item in VFFSL(SL,"menu.items",True): # generated from line 118, col 57
+                    for item in VFFSL(SL,"menu.items",True): # generated from line 123, col 57
                         klass = "visualIconPadding visualIcon"
                         write('                                                            <li><a href="')
-                        _v = VFFSL(SL,"item.url",True) # '$item.url' on line 120, col 74
-                        if _v is not None: write(_filter(_v, rawExpr='$item.url')) # from line 120, col 74.
+                        _v = VFFSL(SL,"item.url",True) # '$item.url' on line 125, col 74
+                        if _v is not None: write(_filter(_v, rawExpr='$item.url')) # from line 125, col 74.
                         write('" class="')
-                        _v = VFFSL(SL,"klass",True) # '$klass' on line 120, col 92
-                        if _v is not None: write(_filter(_v, rawExpr='$klass')) # from line 120, col 92.
+                        _v = VFFSL(SL,"klass",True) # '$klass' on line 125, col 92
+                        if _v is not None: write(_filter(_v, rawExpr='$klass')) # from line 125, col 92.
                         write('">')
-                        _v = VFFSL(SL,"item.title",True) # '$item.title' on line 120, col 100
-                        if _v is not None: write(_filter(_v, rawExpr='$item.title')) # from line 120, col 100.
+                        _v = VFFSL(SL,"item.title",True) # '$item.title' on line 125, col 100
+                        if _v is not None: write(_filter(_v, rawExpr='$item.title')) # from line 125, col 100.
                         write('</a></li>\n')
                     write('''                                                    </ul>
                                                 </dd>
@@ -273,8 +282,8 @@
                         </div>
                         <div class="documentContent" id="region-content">
                             ''')
-            _v = VFN(VFFSL(SL,"design",True),"render",False)(VFFSL(SL,"appWindow.activeWindow.content",True)) # '$design.render($appWindow.activeWindow.content)' on line 131, col 29
-            if _v is not None: write(_filter(_v, rawExpr='$design.render($appWindow.activeWindow.content)')) # from line 131, col 29.
+            _v = VFN(VFFSL(SL,"design",True),"render",False)(VFFSL(SL,"appWindow.activeWindow.content",True)) # '$design.render($appWindow.activeWindow.content)' on line 136, col 29
+            if _v is not None: write(_filter(_v, rawExpr='$design.render($appWindow.activeWindow.content)')) # from line 136, col 29.
             write('''
                         </div>
                     </div>

Modified: cs/portal/trunk/seismo/SeismoWebPortal/gmt.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/gmt.py	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/gmt.py	2008-03-28 20:01:00 UTC (rev 11624)
@@ -22,7 +22,7 @@
     os.putenv("LD_LIBRARY_PATH", "/home/leif/opt/netCDF/lib")
 
     # Spawn 'psmeca' to draw the beachball.
-    child = Popen3([join(gmt_bin, "psmeca"), '-R0/10/0/10', '-Jx1', '-G255/0/0', '-M', '-Sm1.7', '-L2', '-K', '-V', '-P'])
+    child = Popen3([join(gmt_bin, "psmeca"), '-R0/10/0/10', '-Jx1', '-G255/0/0', '-M', '-Sm1.1', '-L2', '-K', '-V', '-P'])
     print >>child.tochild, "3 5 0 %f %f %f %f %f %f 1 0 0" % (
         cmt.Mrr, cmt.Mtt, cmt.Mpp, cmt.Mrt, cmt.Mrp, cmt.Mtp)
     child.tochild.close()

Modified: cs/portal/trunk/seismo/SeismoWebPortal/gui.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/gui.py	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/gui.py	2008-03-28 20:01:00 UTC (rev 11624)
@@ -32,13 +32,18 @@
 
 
 class AppWindow(Window, WindowParent):
-    
+
     def __init__(self, url, title):
         Window.__init__(self, url, title)
         WindowParent.__init__(self)
 
+    def icon(self):
+        if hasattr(self, 'iconURL'):
+            return '<img src="%s" width=32 height=32 style="vertical-align: bottom;">' % self.iconURL
+        return ''
 
 
+
 class ChildWindow(Window):
 
     def __init__(self, url, title):
@@ -204,8 +209,8 @@
 
 
 class FileBrowser(TreeBrowser):
-    pass
+    iconURL = "/specfem3dglobe/icons/folder.gif"
 
 
 class EventFinder(Navigator):
-    pass
+    iconURL = "/specfem3dglobe/icons/eventfinder.gif"

Modified: cs/portal/trunk/seismo/SeismoWebPortal/models.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/models.py	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/models.py	2008-03-28 20:01:00 UTC (rev 11624)
@@ -123,7 +123,7 @@
 
     def icon(self):
         ss = self.singleSource
-        return ss and ss.beachball() or ""
+        return ss and ss.beachball() or '<img src="/specfem3dglobe/icons/document.gif">'
 
     def save(self):
         super(Event, self).save()
@@ -196,7 +196,7 @@
 
     def beachball(self):
         src = "/specfem3dglobe/beachballs/%d.gif" % self.id
-        return """<img class=beachball src="%s">""" % src
+        return """<img src="%s">""" % src
 
     def cmtSolution(self):
         from cmt import CMTSolution
@@ -271,7 +271,7 @@
     def __str__(self): return self.fsNode.name
 
     def icon(self):
-        return '<img src="/specfem3dglobe/pics/kml.icon.gif">'
+        return '<img src="/specfem3dglobe/icons/stationlist.gif">'
 
     def save(self):
         super(StationList, self).save()
@@ -369,7 +369,7 @@
     def __str__(self): return self.fsNode.name
 
     def icon(self):
-        return '<img src="/specfem3dglobe/pics/kml.icon.gif">'
+        return '<img src="/specfem3dglobe/icons/mesh.gif">'
 
     def save(self):
         super(Specfem3DGlobeMesh, self).save()
@@ -400,7 +400,7 @@
     def __str__(self): return self.fsNode.name
 
     def icon(self):
-        return '<img src="/specfem3dglobe/pics/kml.icon.gif">'
+        return '<img src="/specfem3dglobe/icons/model.gif">'
 
     def save(self):
         super(Specfem3DGlobeModel, self).save()
@@ -470,7 +470,7 @@
     def __str__(self): return self.fsNode.name
     
     def icon(self):
-        return '<img src="/specfem3dglobe/pics/kml.icon.gif">'
+        return '<img src="/specfem3dglobe/icons/parameters.gif">'
 
     def nodes(self):
         """Return the number of processors required for this simulation."""
@@ -558,7 +558,7 @@
     def __str__(self): return self.fsNode.name
     
     def icon(self):
-        return '<img src="/specfem3dglobe/pics/kml.icon.gif">'
+        return '<img src="/specfem3dglobe/icons/modecat.gif">'
 
     def save(self):
         super(MineosModeCatalog, self).save()
@@ -602,7 +602,7 @@
     def __str__(self): return self.fsNode.name
     
     def icon(self):
-        return '<img src="/specfem3dglobe/pics/kml.icon.gif">'
+        return '<img src="/specfem3dglobe/icons/parameters.gif">'
 
     def save(self):
         super(MineosParameters, self).save()

Modified: cs/portal/trunk/seismo/SeismoWebPortal/static/css/style.css
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/static/css/style.css	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/static/css/style.css	2008-03-28 20:01:00 UTC (rev 11624)
@@ -628,6 +628,20 @@
 
 
 
+/* icon views */
+
+.icon table {
+    display: inline;
+    text-align: center;
+    margin: 1em;
+}
+
+.icon a {
+    text-decoration: none;
+}
+
+
+
 /* misc. */
 
 .greek {

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/document.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/document.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/eventcat.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/eventcat.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/eventfinder.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/eventfinder.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/folder.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/folder.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/mesh.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/mesh.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/modecat.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/modecat.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/model.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/model.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/parameters.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/parameters.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/stationlist.gif
===================================================================
(Binary files differ)


Property changes on: cs/portal/trunk/seismo/SeismoWebPortal/static/icons/stationlist.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/desktop.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/desktop.html	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/desktop.html	2008-03-28 20:01:00 UTC (rev 11624)
@@ -1,2 +1,12 @@
 
 <h2>desktop</h2>
+
+<div class=icon>
+
+    <table><tr><td><a href="/specfem3dglobe/home/"><img src="/specfem3dglobe/icons/folder.gif"></a></td></tr><tr><td><a href="/specfem3dglobe/home/">Home</a></td></tr></table>
+
+    <table><tr><td><a href="/specfem3dglobe/trash/"><img src="/specfem3dglobe/icons/folder.gif"></a></td></tr><tr><td><a href="/specfem3dglobe/trash/">Trash</a></td></tr></table>
+
+    <table><tr><td><a href="/specfem3dglobe/events/"><img src="/specfem3dglobe/icons/eventfinder.gif"></a></td></tr><tr><td><a href="/specfem3dglobe/events/">Event Finder</a></td></tr></table>
+
+</ul>

Modified: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/home.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/home.html	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/home.html	2008-03-28 20:01:00 UTC (rev 11624)
@@ -1,8 +1,8 @@
 
 <h2>Home</h2>
 
-<ul>
+<div class=icon>
 {% for item in folder %}
-    <li><a href="{{item.url}}">{{ item.icon }} {{ item.name }}</a></li>
+    <table><tr><td><a href="{{item.url}}">{{ item.icon }}</a></td></tr><tr><td><a href="{{item.url}}">{{ item.name }}</a></td></tr></table>
 {% endfor %}
 </ul>

Modified: cs/portal/trunk/seismo/SeismoWebPortal/views.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/views.py	2008-03-28 18:23:22 UTC (rev 11623)
+++ cs/portal/trunk/seismo/SeismoWebPortal/views.py	2008-03-28 20:01:00 UTC (rev 11624)
@@ -83,6 +83,7 @@
         "css": static,
         "doc": static,
         "pics": static,
+        "icons": static,
         "samples": static,
         })
 
@@ -1203,8 +1204,9 @@
 
     if path: raise Http404
 
+    search = gui.Search("search", "Search", url = "/specfem3dglobe/events/")
     navtree = gui.Directory("events", "Events", [
-        gui.Search("search", "Search", url = "/specfem3dglobe/events/"),
+        search,
         ])
     appWindow = gui.EventFinder("/specfem3dglobe/events/", "Event Finder", navtree)
     desktop.insertWindow(appWindow)
@@ -1215,6 +1217,7 @@
     #fileBrowser.path.append(eventsDir)
 
     if not request.GET:
+        appWindow.path.append(search)
         search = gui.ChildWindow("/specfem3dglobe/events/", "Search")
         desktop.activeWindow.insertWindow(search)
         html = loader.render_to_string('SeismoWebPortal/event_search.html')



More information about the cig-commits mailing list