[cig-commits] r11980 - in cs/portal/trunk/northridge/SeismoWebPortal: . site static static/pics templates templates/SeismoWebPortal templates/registration

leif at geodynamics.org leif at geodynamics.org
Fri May 16 19:43:30 PDT 2008


Author: leif
Date: 2008-05-16 19:43:29 -0700 (Fri, 16 May 2008)
New Revision: 11980

Added:
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/contact_info.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/style.css
Removed:
   cs/portal/trunk/northridge/SeismoWebPortal/static/pics/specfem_users_map.gif
   cs/portal/trunk/northridge/SeismoWebPortal/static/style.css
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/registration_form.html
Modified:
   cs/portal/trunk/northridge/SeismoWebPortal/forms.py
   cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py
   cs/portal/trunk/northridge/SeismoWebPortal/site/urls.py
   cs/portal/trunk/northridge/SeismoWebPortal/templates/404.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/500.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_detail.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search_results.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/job_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_upload.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_detail.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/outputfile_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/password_change_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/pluggable.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/register.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/root.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/run_status.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/single_source_event_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/splash.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/userinfo_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/login.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset_done.html
   cs/portal/trunk/northridge/SeismoWebPortal/urls.py
   cs/portal/trunk/northridge/SeismoWebPortal/views.py
Log:
Removed hard-coded references to old URL root ("/specfem3dglobe/").


Modified: cs/portal/trunk/northridge/SeismoWebPortal/forms.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/forms.py	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/forms.py	2008-05-17 02:43:29 UTC (rev 11980)
@@ -149,9 +149,10 @@
 
 class RegistrationAddManipulator(RegistrationManipulator):
     
-    def __init__(self, request):
+    def __init__(self, request, root):
         super(RegistrationAddManipulator, self).__init__()
         self.request = request
+        self.root = root
         self.fields.extend([
             forms.TextField('username',     maxlength=30,  is_required=True, validator_list=self.usernameValidatorList()),
             forms.PasswordField('password1', maxlength=128, is_required=True),
@@ -220,7 +221,7 @@
             return
         raise validators.ValidationError(
 """Someone has already registered using this e-mail address. """
-"""(If you've forgotten your username and/or password, try <a href="/specfem3dglobe/pwreset/">resetting your password</a>.)"""
+"""(If you've forgotten your username and/or password, try <a href="%s/pwreset/">resetting your password</a>.)""" % self.root
     )
 
     

Modified: cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/mezzanine.py	2008-05-17 02:43:29 UTC (rev 11980)
@@ -67,7 +67,7 @@
                 elif hasattr(new_object, 'get_absolute_url'):
                     return HttpResponseRedirect(new_object.get_absolute_url())
                 else:
-                    return HttpResponseRedirect(cls.urlForObject(new_object))
+                    return HttpResponseRedirect(cls.urlForObject(new_object, request.root))
         else:
             # No POST, so we want a brand new form without any data or errors
             errors = {}
@@ -80,6 +80,8 @@
         t = template_loader.get_template(template_name)
         c = RequestContext(request, {
             'form': form,
+            'action': request.path,
+            'root': request.root,
         }, context_processors)
         for key, value in extra_context.items():
             if callable(value):
@@ -130,7 +132,7 @@
                 elif hasattr(object, 'get_absolute_url'):
                     return HttpResponseRedirect(object.get_absolute_url())
                 else:
-                    return HttpResponseRedirect(self.url)
+                    return HttpResponseRedirect(self.urlForObject(self, request.root))
         else:
             errors = {}
             # This makes sure the form acurate represents the fields of the place.
@@ -143,6 +145,8 @@
         c = RequestContext(request, {
             'form': form,
             template_object_name: object,
+            'action': request.path,
+            'root': request.root,
         }, context_processors)
         for key, value in extra_context.items():
             if callable(value):
@@ -181,13 +185,15 @@
             if post_delete_redirect:
                 return HttpResponseRedirect(post_delete_redirect)
             else:
-                return HttpResponseRedirect(self.postDeleteRedirect())
+                return HttpResponseRedirect(self.postDeleteRedirect(request.root))
         else:
             if not template_name:
                 template_name = "%s/%s_confirm_delete.html" % (model._meta.app_label, model._meta.object_name.lower())
             t = template_loader.get_template(template_name)
             c = RequestContext(request, {
                 template_object_name: object,
+                'action': request.path,
+                'root': request.root,
             }, context_processors)
             for key, value in extra_context.items():
                 if callable(value):
@@ -262,11 +268,13 @@
                 'first_on_page': paginator.first_on_page(page - 1),
                 'pages': paginator.pages,
                 'hits' : paginator.hits,
+                'root': request.root,
             }, context_processors)
         else:
             c = RequestContext(request, {
                 '%s_list' % template_object_name: queryset,
-                'is_paginated': False
+                'is_paginated': False,
+                'root': request.root,
             }, context_processors)
             if not allow_empty and len(queryset) == 0:
                 raise Http404
@@ -306,6 +314,7 @@
             t = template_loader.get_template(template_name)
         c = RequestContext(request, {
             template_object_name: obj,
+            'root': request.root,
         }, context_processors)
         for key, value in extra_context.items():
             if callable(value):
@@ -316,7 +325,7 @@
 
     def duplicate(self, request):
         dup = self._duplicate()
-        return HttpResponseRedirect(self.urlForObject(dup, action = 'edit'))
+        return HttpResponseRedirect(self.urlForObject(dup, request.root, action = 'edit'))
     
     def _duplicate(self):
         from copy import copy
@@ -367,27 +376,30 @@
                 elif hasattr(new_object, 'get_absolute_url'):
                     return HttpResponseRedirect(new_object.get_absolute_url())
                 else:
-                    return HttpResponseRedirect(cls.urlForObject(new_object))
+                    return HttpResponseRedirect(cls.urlForObject(new_object, request.root))
         else:
             errors = new_data = {}
 
         form = oldforms.FormWrapper(manipulator, new_data, errors)
         template_name = "%s/%s_upload.html" % (ModelClass._meta.app_label, ModelClass._meta.object_name.lower())
         t = template_loader.get_template(template_name)
-        c = RequestContext(request, {'form': form })
+        c = RequestContext(request, {
+            'form': form,
+            'action': request.path,
+            'root': request.root,
+            })
         return t.render(c)
 
     id = property(lambda self: self.obj.id)
-    url = property(lambda self: self.urlForObject(self.obj))
 
     @classmethod
-    def urlForObject(cls, obj, action=None):
+    def urlForObject(cls, obj, root, action=None):
         if action:
-            return "/specfem3dglobe/?class=%s&object=%d&action=%s" % (cls.__name__, obj.id, action)
-        return "/specfem3dglobe/?class=%s&object=%d" % (cls.__name__, obj.id)
+            return "%s/?class=%s&object=%d&action=%s" % (root, cls.__name__, obj.id, action)
+        return "%s/?class=%s&object=%d" % (root, cls.__name__, obj.id)
 
-    def postDeleteRedirect(self):
-        return "/specfem3dglobe/?class=%s" % (self.__class__.__name__)
+    def postDeleteRedirect(self, root):
+        return "%s/?class=%s" % (root, self.__class__.__name__)
 
 
 
@@ -428,7 +440,7 @@
                 new_data['object'] = None; del new_data['object']
                 new_data['action'] = None; del new_data['action']
                 obj = manipulator.save(new_data)
-                return HttpResponseRedirect(cls.urlForObject(obj))
+                return HttpResponseRedirect(cls.urlForObject(obj, request.root))
         else:
             new_data = manipulator.flatten_data()
             errors = {}
@@ -439,6 +451,7 @@
             form = form,
             action = request.path,
             object = event,
+            root = request.root,
             ))
         return t.render(c)
 
@@ -458,7 +471,7 @@
 
         if not request.GET.get('itype'):
             t = loader.get_template('SeismoWebPortal/event_search.html')
-            c = RequestContext(request, {})
+            c = RequestContext(request, dict(action = request.path, root = request.root))
             return t.render(c)
 
         # Simply forward the search request to globalcmt.org.
@@ -493,6 +506,7 @@
         c = RequestContext(request,
                            {'event_list': parser.cmtList,
                             'error': parser.error,
+                            'root': request.root,
                             }
                            )
         return t.render(c)
@@ -523,8 +537,8 @@
     downloadableAsText = True
     downloadableAsKML = True
 
-    def postDeleteRedirect(self):
-        return "/specfem3dglobe/?class=Event&object=%d" % self.obj.event.id
+    def postDeleteRedirect(self, root):
+        return "%s/?class=Event&object=%d" % (root, self.obj.event.id)
 
     def downloadAsText(self, request):
         source = self.obj
@@ -673,7 +687,7 @@
             if not errors:
                 manipulator.do_html2python(new_data)
                 new_object = manipulator.save(new_data)
-                return HttpResponseRedirect(cls.urlForObject(new_object))
+                return HttpResponseRedirect(cls.urlForObject(new_object, request.root))
         else:
             # Populate new_data with a 'flattened' version of the current data.
             new_data = manipulator.flatten_data()
@@ -687,6 +701,7 @@
             nchunks = nchunks,
             object = mesh,
             action = request.path,
+            root = request.root,
             ))
         return t.render(c)
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/site/urls.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/site/urls.py	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/site/urls.py	2008-05-17 02:43:29 UTC (rev 11980)
@@ -9,6 +9,6 @@
 
     #(r'^accounts/login/$', 'django.contrib.auth.views.login'),
 
-    (r'^specfem3dglobe/', include('SeismoWebPortal.urls')),
+    (r'^portals/seismo/', include('SeismoWebPortal.urls')),
 
 )

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/static/pics/specfem_users_map.gif
===================================================================
(Binary files differ)

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/static/style.css
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/static/style.css	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/static/style.css	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,428 +0,0 @@
-
-body {
-    font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
-    color: black;
-    background-color: white;
-}
-
-img {
-    border-width: 0;
-}
-
-h1 {
-    font-size: medium;
-}
-
-h1 img {
-    vertical-align: middle;
-}
-
-
-#header {
-    width: 100%;
-    margin-bottom: 1em;
-}
-
-#login {
-    font-size: small;
-}
-
-#login img {
-    vertical-align: bottom;
-}
-
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  buttons
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
-#buttonbar {
-    border-style: solid;
-    border-width: 1px;
-    border-color: #8cacbb;
-    background-color: #dee7ec;
-    font-size: small;
-    width: 100%;
-}
-
-td.separator {
-    border-left: 1px dotted #8cacbb;
-}
-
-#buttonbar a {
-    text-decoration: none;
-    color: black;
-}
-
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  buttons/menus
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
-#menubar {
-    border-bottom: 1px solid #8cacbb;
-    font-size: small;
-}
-
-#viewbar {
-    border-bottom: 1px solid #8cacbb;
-    font-size: small;
-}
-
-.actionMenu {
-    position: relative;
-    margin: 0;
-    padding: 0;
-}
-
-.actionMenu img {
-    vertical-align: middle;
-}
-
-.actionMenu a {
-    text-decoration: none;
-    color: black;
-}
-
-.actionMenu .actionMenuHeader {
-    border: 1px solid black;
-}
-
-.actionMenu .actionMenuHeader a {
-    padding-left: 1ex;
-    padding-right: 1ex;
-}
-
-.actionMenu.deactivated .actionMenuHeader a:hover {
-    background-color: #cde2a7;
-}
-
-.actionMenu .actionMenuContent {
-    display: none;
-    position: absolute;
-    background-color: white;
-    padding: 0;
-    margin: 0;
-    border: 0;
-}
-
-.actionMenu .actionMenuContent ul {
-    padding: 0;
-    margin: 0;
-    border: 0;
-}
-
-.actionMenu .actionMenuContent li {
-    list-style: none;
-    padding: 0;
-    margin: 0;
-    border: 0;
-}
-
-.actionMenu.activated .actionMenuHeader {
-    color: white;
-    background-color: black;
-}
-
-.actionMenu.activated .actionMenuHeader a {
-    color: white;
-}
-
-.actionMenu.activated .actionMenuContent {
-    display: block;
-    border: 1px solid black;
-}
-
-.actionMenu .actionMenuContent li {
-    white-space: nowrap;
-}
-
-.actionMenu .actionMenuContent li a {
-    display: block;
-    padding-left: 1ex;
-    padding-right: 1ex;
-}
-
-.actionMenu .actionMenuContent li a:hover {
-    color: white;
-    background-color: black;
-}
-
-.actionMenuItem {
-    display: block;
-    padding-left: 1ex;
-    padding-right: 1ex;
-}
-
-.actionButton {
-    border: 1px solid black;
-    padding-left: 1ex;
-    padding-right: 1ex;
-    text-decoration: none;
-    color: black;
-}
-
-a.actionButton:hover {
-    color: white;
-    background-color: black;
-}
-
-.disabled {
-    color: silver;
-}
-
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  radio
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
-a.radio {
-    color: black;
-    text-decoration: none;
-}
-
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  tables
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
-.content table {
-    border: 1px solid black;
-    width: 100%;
-}
-
-.content thead {
-    border-bottom: 1px solid black;
-}
-
-tr.even {
-    background-color: #eef;
-}
-
-tr:target {
-    background-color: #ff9;
-}
-
-.content th {
-    text-align: left;
-    padding-left: 1ex;
-    padding-right: 1ex;
-}
-
-.content th.colgroup {
-    text-align: center;
-}
-
-.content td {
-    padding-left: 1ex;
-    padding-right: 1ex;
-}
-
-.float {
-    text-align: right;
-}
-
-.int {
-    text-align: right;
-}
-
-.notApplicable {
-    color: gray;
-    text-align: center;
-}
-
-.inlineInfo {
-    font-size: small;
-}
-
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  forms
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
-fieldset {
-    margin: 1em;
-    padding: 1em;
-    clear: both;
-}
-
-form fieldset legend {
-    font-size: x-large;
-}
-
-fieldset fieldset {
-    float: left;
-}
-
-fieldset fieldset legend {
-    font-size: large;
-}
-
-form div {
-    padding-top: .2em;
-    padding-bottom: .2em;
-    clear: both;
-}
-
-form p {
-    clear: both;
-}
-
-.error {
-    font-weight: bold;
-    color: red;
-}
-
-form span.error {
-    margin: 0em .2em 1em 1em;
-    padding: .2em .2em .2em .2em;
-}
-
-.computed {
-    font-weight: bold;
-    background-color: #fcc;
-    border: thin solid red;
-}
-
-label.before {
-    font-weight: bold;
-    float: left;
-    text-align: right;
-    margin-right: 1ex;
-}
-
-.tab30ex label.before {
-    width: 30ex;
-}
-
-.tab30ex fieldset label.before {
-    /* account for the fieldset margin & padding */
-    width: 26ex;
-}
-
-.tab30ex label.after {
-    /*float: left;*/
-}
-
-.tab30ex .checkbox { margin-left: 30ex; }
-.tab30ex .radio { margin-left: 30ex; }
-
-.tab30ex fieldset .checkbox {
-    /* account for the fieldset margin & padding */
-    margin-left: 26ex;
-}
-
-.tab30ex fieldset .radio {
-    /* account for the fieldset margin & padding */
-    margin-left: 26ex;
-}
-
-.tab30ex fieldset fieldset .checkbox { margin-left: 0; }
-.tab30ex fieldset fieldset .radio { margin-left: 0; }
-
-.radio ul {
-    list-style: none;
-}
-
-label.before:after {
-    content: ":";
-}
-
-.tab30ex input.vIntegerField {
-    float: left;
-}
-
-.tab30ex input.vFloatField {
-    float: left;
-}
-
-.tab30ex input.vCheckboxField {
-    float: left;
-}
-
-.tab30ex select.vSelectField {
-    float: left;
-    margin-bottom: 1em;
-}
-
-input.reset {
-    float: right;
-}
-
-input.submit {
-    margin-top: 2em;
-    margin-bottom: 2em;
-}
-
-.tab30ex input.submit {
-    margin-left: 30ex;
-}
-
-input {
-    font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
-    border: 1px solid #8cacbb;
-    background: White url(/specfem3dglobe/images/input_background.gif) repeat-x;
-}
-
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  collapsible help
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
-.help.collapsedInlineCollapsible {
-    display: inline;
-}
-
-.help.collapsedInlineCollapsible .collapsibleHeader {
-    display: inline;
-}
-
-.help.collapsedOnLoad .collapsibleContent,
-.help.collapsedInlineCollapsible .collapsibleContent,
-.help.collapsedBlockCollapsible .collapsibleContent {
-    display: none;
-}
-
-.collapsibleHeader {
-    cursor: pointer;
-    color: #00f;
-}
-
-.collapsibleHeader img {
-    vertical-align: middle;
-}
-
-.help.expandedInlineCollapsible {
-    display: block;
-}
-
-.help.expandedInlineCollapsible .collapsibleContent,
-.help.expandedBlockCollapsible .collapsibleContent {
-    display: block;
-    border-style: double;
-    border-color: black;
-    background-color: #ffc;
-    padding: 1em;
-    margin-left: 16px;
-}
-
-.help .collapsibleContent dt {
-    font-weight: bold;
-}
-
-.help div.illustration {
-    border: 1px solid black;
-    padding: 1em 1em 1em 1em;
-    background-color: white;
-}
-
-
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  misc.
-  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-
-pre {
-    border: 1px solid black;
-    padding: 1em;
-    background-color: #eee;
-}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/404.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/404.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/404.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,10 +1,8 @@
-
-{% extends "SeismoWebPortal/root.html" %}
-
-{% block body %}
-
-<p><a href="/specfem3dglobe/"><img id=logo src="/specfem3dglobe/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
-
-<h1>Not Found</h1>
-
-{% endblock %}
+<html>
+    <head>
+        <title>Not Found</title>
+    </head>
+    <body>
+        <h1>Not Found</h1>
+    </body>
+</html>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/500.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/500.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/500.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,10 +1,8 @@
-
-{% extends "SeismoWebPortal/root.html" %}
-
-{% block body %}
-
-<p><a href="/specfem3dglobe/"><img id=logo src="/specfem3dglobe/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
-
-<h1>Internal Server Error</h1>
-
-{% endblock %}
+<html>
+    <head>
+        <title>Internal Server Error</title>
+    </head>
+    <body>
+        <h1>Internal Server Error</h1>
+    </body>
+</html>

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/contact_info.html (from rev 11877, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/registration_form.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/contact_info.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/contact_info.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -0,0 +1,48 @@
+
+    <div>
+        <label for="id_first_name" class=before>first name</label>
+        {{ form.first_name }}
+        {% if form.first_name.errors %}<span class=error>{{ form.first_name.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_last_name" class=before>last name</label>
+        {{ form.last_name }}
+        {% if form.last_name.errors %}<span class=error>{{ form.last_name.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_email" class=before>e-mail</label>
+        {{ form.email }}
+        {% if form.email.errors %}<span class=error>{{ form.email.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_institution" class=before>institution</label>
+        {{ form.institution }}
+        {% if form.institution.errors %}<span class=error>{{ form.institution.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_address1" class=before>address</label>
+        {{ form.address1 }} (optional)
+        {% if form.address1.errors %}<span class=error>{{ form.address1.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_address2" class=before>city</label>
+        {{ form.address2 }} (optional)
+        {% if form.address2.errors %}<span class=error>{{ form.address2.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_address3" class=before>state &amp; ZIP</label>
+        {{ form.address3 }} (optional)
+        {% if form.address3.errors %}<span class=error>{{ form.address3.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_phone" class=before>phone number</label>
+        {{ form.phone }} (optional)
+        {% if form.phone.errors %}<span class=error>{{ form.phone.errors|join:", " }}</span>{% endif %}
+    </div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete event</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="Event">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_detail.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_detail.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_detail.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -35,7 +35,7 @@
         <tbody>
         {% for source in object.sources %}
         <tr class="{% cycle odd,even %}" id="s{{source.id}}">
-            <td><a href="/specfem3dglobe/?class=Source&object={{source.id}}">{{ source.eventName }}</a></td>
+            <td><a href="{{root}}/?class=Source&object={{source.id}}">{{ source.eventName }}</a></td>
             <td class=float>{{ source.timeShift|stringformat:".4f" }}</td>
             <td class=float>{{ source.halfDuration|stringformat:".4f" }}</td>
             <td class=float>{{ source.latitude|stringformat:".4f" }}&deg;</td>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -5,7 +5,7 @@
 <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
 {% endif %}
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="Event">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="edit">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_list.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_list.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -16,7 +16,7 @@
         <tbody>
         {% for object in object_list %}
         <tr class="{% cycle odd,even %}" id="o{{object.id}}">
-            <td><a href="/specfem3dglobe/?class=Event&object={{object.id}}">{{ object.name }}</a></td>
+            <td><a href="{{root}}/?class=Event&object={{object.id}}">{{ object.name }}</a></td>
             {% if object.singleSource %}
             <td>point-source</td>
             <td>{{ object.singleSource.beachball }}</td>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -7,7 +7,7 @@
 <a href="http://www.globalcmt.org/">Powered by the Global CMT Project.</a>
 {% endif %}
 
-<form method="get" action=".">
+<form method="get" action="{{action}}">
     <input type="hidden" name="class" value="Event">
     <input type="hidden" name="action" value="search">
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search_results.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search_results.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_search_results.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -25,8 +25,8 @@
         {% for event in event_list %}
         <tr class="{% cycle odd,even %}">
             <td>
-                <!-- an inline events/add form, already filled-out -->
-	        <form method="post" action="/specfem3dglobe/">
+                <!-- an inline event creation form, already filled-out -->
+	        <form method="post" action="{{root}}">
                     <input type="hidden" name="class" value="Event">
                     <input type="hidden" name="action" value="new">
 		    <input type="hidden" name="name"             value="{{ event.eventName }}"/>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/event_upload.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,9 @@
 
 <h2>upload event</h2>
 
-<form action="/specfem3dglobe/?class=Event&action=upload" method="post" enctype="multipart/form-data">
+<form action="{{action}}" method="post" enctype="multipart/form-data">
+    <input type="hidden" name="class" value="Event">
+    <input type="hidden" name="action" value="upload">
 
     {% if form.has_errors %}
     <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
@@ -24,7 +26,7 @@
 </form>
 
 <dl class="help collapsible collapsedOnLoad">
-<dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+<dt class="collapsibleHeader"><img src="{{root}}/images/help-large.gif"> Help</dt>
 <dd class="collapsibleContent">
 
 <h3><code>CMTSOLUTION</code> file format</h3>
@@ -35,7 +37,7 @@
 known as the Harvard CMT catalog).  It looks like this:</p>
 
 <div class=illustration id=cmtsolutionIllustration>
-    <img src="/specfem3dglobe/pics/cmtsolution.gif" width=700 height=310>
+    <img src="{{root}}/pics/cmtsolution.gif" width=700 height=310>
     <p class=caption><code>CMTSOLUTION</code> file obtained from the
     Harvard CMT catalog.  The top line is the initial estimate of the
     source, which is used as a starting point for the CMT

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -23,9 +23,9 @@
 <code>seismograms.tar.gz</code> in the "output" column of the
 simulation's information page. Click this link to download the output of
 the simulation: seismograms in ASCII and <a href="http://www.llnl.gov/sac/">SAC</a> format.
-Then, <a href="/specfem3dglobe/samples/UTILS.tar.gz">download the
+Then, <a href="{{root}}/samples/UTILS.tar.gz">download the
 post-processing utilities</a> to process the data.  See
-<a href="/specfem3dglobe/doc/manual_SPECFEM3D_GLOBE.pdf">the manual</a>
+<a href="{{root}}/doc/manual_SPECFEM3D_GLOBE.pdf">the manual</a>
 for further details.
 
 <p>As you become familiar with the code, feel free to explore this
@@ -33,7 +33,7 @@
 
 <h3>tips</h3>
 
-<p><img src="/specfem3dglobe/pics/kml.icon.gif"> If you have
+<p><img src="{{root}}/pics/kml.icon.gif"> If you have
 <a href="http://earth.google.com/">Google Earth</a> installed on your
 computer, you can use it to map events and stations.  Just look for
 the KML icon and click it!</p>
@@ -45,5 +45,5 @@
 
 <h3>additional documentation</h3>
 
-<p><a href="/specfem3dglobe/doc/manual_SPECFEM3D_GLOBE.pdf">
-   <img src="/specfem3dglobe/pics/adobe-pdf.icon.gif">SPECFEM 3D GLOBE User Manual</a>
+<p><a href="{{root}}/doc/manual_SPECFEM3D_GLOBE.pdf">
+   <img src="{{root}}/pics/adobe-pdf.icon.gif">SPECFEM 3D GLOBE User Manual</a>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/job_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/job_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/job_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -11,7 +11,7 @@
     <p>{{ form.error_dict }}
     {% endif %}
 
-    <form method="post" action="{{ action }}">
+    <form method="post" action="{{action}}">
 
     <p><label for="id_run">run</label> {{ form.run }}
     <p><label for="id_task">task</label> {{ form.task }}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_2chunks.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -11,7 +11,7 @@
         <label for="id_angular_width_eta" class=before>angular width <span class=greek>&eta;</span></label>
         {{ form.angular_width_eta }}
         {% if form.angular_width_eta.errors %}<span class=error>{{ form.angular_width_eta.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&eta;</span></dt><dd>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&eta;</span></dt><dd>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</dd></dl></dd></dl>
     </div>
     {% endblock %}
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_3chunks.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -26,7 +26,7 @@
         <label for="id_nproc" class=before>Nproc</label>
         {{ form.nproc }}
         {% if form.nproc.errors %}<span class=error>{{ form.nproc.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc</dt><dd>The number of processors or mesh slices along each side of the chunks. To accommodate the mesh doubling layers, we must have Nex = 8 &times; c &times; Nproc, where c >= 1 is a positive integer.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc</dt><dd>The number of processors or mesh slices along each side of the chunks. To accommodate the mesh doubling layers, we must have Nex = 8 &times; c &times; Nproc, where c >= 1 is a positive integer.</dd></dl></dd></dl>
     </div>
     <p>Total number of required processors:
        Nchunks &times; Nproc<span style="vertical-align: super">2</span> =
@@ -42,7 +42,7 @@
     {% if form.nex.errors %}<span class=error>{{ form.nex.errors|join:", " }}</span>{% endif %}
 
     <dl class="help collapsible collapsedOnLoad">
-    <dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+    <dt class="collapsibleHeader"><img src="{{root}}/images/help-large.gif"> Help</dt>
     <dd class="collapsibleContent">
     <dl>
         <dt>Nex</dt><dd><p>The number of spectral elements along each side of the chunks. This number must be 8 &times; a multiple of Nproc defined above. We do not recommend using Nex less than 64 because the curvature of the Earth cannot be honored if one uses too few elements, which results in inaccurate and unstable  simulations.</p></dd>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>{% if object %}edit{% else %}new{% endif %} {% block heading %}{{ nchunks }}-chunk regional mesh{% endblock %}</h2>
 
-<form name="mesh_form" method="post" action="{{ action }}">
+<form name="mesh_form" method="post" action="{{action}}">
     <input type="hidden" name="class" value="Specfem3DGlobeMesh">
     {% if object %}
     <input type="hidden" name="object" value="{{object.id}}">
@@ -26,13 +26,13 @@
         <label for="id_angular_width_xi" class=before>angular width <span class=greek>&xi;</span></label>
         {{ form.angular_width_xi }}
         {% if form.angular_width_xi.errors %}<span class=error>{{ form.angular_width_xi.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&xi;</span></dt><dd>Denotes the width of one side of the chunk (90&deg; or less).</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&xi;</span></dt><dd>Denotes the width of one side of the chunk (90&deg; or less).</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_angular_width_eta" class=before>angular width <span class=greek>&eta;</span></label>
         {{ form.angular_width_eta }}
         {% if form.angular_width_eta.errors %}<span class=error>{{ form.angular_width_eta.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&eta;</span></dt><dd>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular width <span class=greek>&eta;</span></dt><dd>Denotes the width of the second side of the chunk (90&deg; or less). Note that this value may be different from angular width <span class=greek>&xi;</span>.</dd></dl></dd></dl>
     </div>
     {% endblock %}
 
@@ -41,19 +41,19 @@
         <label for="id_gamma_rotation_azimuth" class=before><span class=greek>&gamma;</greek> rotation azimuth</label>
         {{ form.gamma_rotation_azimuth }}
         {% if form.gamma_rotation_azimuth.errors %}<span class=error>{{ form.gamma_rotation_azimuth.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt><span class=greek>&gamma;</greek> rotation azimuth</dt><dd>Defines the rotation angle of the chunk about its center measured counter clockwise from due North (degrees).</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt><span class=greek>&gamma;</greek> rotation azimuth</dt><dd>Defines the rotation angle of the chunk about its center measured counter clockwise from due North (degrees).</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_center_latitude" class=before>center latitude</label>
         {{ form.center_latitude }}
         {% if form.center_latitude.errors %}<span class=error>{{ form.center_latitude.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>center latitude</dt><dd>Defines the latitude of the center of the chunk (degrees).</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>center latitude</dt><dd>Defines the latitude of the center of the chunk (degrees).</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_center_longitude" class=before>center longitude</label>
         {{ form.center_longitude }}
         {% if form.center_longitude.errors %}<span class=error>{{ form.center_longitude.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>center longitude</dt><dd>Defines the longitude of the center of the chunk (degrees).</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>center longitude</dt><dd>Defines the longitude of the center of the chunk (degrees).</dd></dl></dd></dl>
     </div>
     {% endblock %}
 
@@ -67,13 +67,13 @@
         <label for="id_nproc_xi" class=before>Nproc <span class=greek>&xi;</span></label>
         {{ form.nproc_xi }}
         {% if form.nproc_xi.errors %}<span class=error>{{ form.nproc_xi.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc <span class=greek>&xi;</span></dt><dd>The number of processors or mesh slices along the <span class=greek>&xi;</span> side of the chunk. To accommodate the mesh doubling layers, we must have Nex <span class=greek>&xi;</span> = 8 &times; c &times; Nproc <span class=greek>&xi;</span>, where c >= 1 is a positive integer.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc <span class=greek>&xi;</span></dt><dd>The number of processors or mesh slices along the <span class=greek>&xi;</span> side of the chunk. To accommodate the mesh doubling layers, we must have Nex <span class=greek>&xi;</span> = 8 &times; c &times; Nproc <span class=greek>&xi;</span>, where c >= 1 is a positive integer.</dd></dl></dd></dl>
     </div>
     <div>
         <label for="id_nproc_eta" class=before>Nproc <span class=greek>&eta;</span></label>
         {{ form.nproc_eta }}
         {% if form.nproc_eta.errors %}<span class=error>{{ form.nproc_eta.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc <span class=greek>&eta;</span></dt><dd>The number of processors or slices along the <span class=greek>&eta;</span> side of the chunk; we must have Nex <span class=greek>&eta;</span> = 8 &times; c &times; Nproc <span class=greek>&eta;</span>, where c >= 1 is a positive integer.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>Nproc <span class=greek>&eta;</span></dt><dd>The number of processors or slices along the <span class=greek>&eta;</span> side of the chunk; we must have Nex <span class=greek>&eta;</span> = 8 &times; c &times; Nproc <span class=greek>&eta;</span>, where c >= 1 is a positive integer.</dd></dl></dd></dl>
     </div>
 
     <p>Total number of required processors:
@@ -100,7 +100,7 @@
     {% if form.nex_eta.errors %}<span class=error>{{ form.nex_eta.errors|join:", " }}</span>{% endif %}
 
     <dl class="help collapsible collapsedOnLoad">
-    <dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+    <dt class="collapsibleHeader"><img src="{{root}}/images/help-large.gif"> Help</dt>
     <dd class="collapsibleContent">
     <dl>
         <dt>Nex <span class=greek>&xi;</span></dt><dd><p>The number of spectral elements along the <span class=greek>&xi;</span> side of the chunk. This number must be 8 &times; a multiple of Nproc <span class=greek>&xi;</span> defined above. For a 90&deg; chunk, we do not recommend using Nex <span class=greek>&xi;</span> less than 64 because the curvature of the Earth cannot be honored if one uses too few elements, which results in inaccurate and unstable  simulations.</p></dd>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete mineos mode catalog</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="MineosModeCatalog">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>{% if object %}edit{% else %}new{% endif %} Mineos mode catalog</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="MineosModeCatalog">
     {% if object %}
     <input type="hidden" name="object" value="{{object.id}}">
@@ -20,7 +20,7 @@
         <label for="id_eps" class=before>eps</label>
         {{ form.eps }}
         {% if form.eps.errors %}<span class=error>{{ form.eps.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>eps</dt><dd>The parameter <code>eps</code> controls the accuracy of the Runge-Kutta integration scheme. The relative accuracy 
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>eps</dt><dd>The parameter <code>eps</code> controls the accuracy of the Runge-Kutta integration scheme. The relative accuracy 
 of an eigenfrequency is a factor 2 to 3 times <code>eps</code>. Parameter <code>eps</code> also controls the precision with which 
 a root is found and the minimum relative separation of two roots with the same angular order. It is 
 safe to set eps = 10<span style="vertical-align: super">-7</span> for periods greater than 10 seconds. For periods between 5 and 10 seconds, it 
@@ -30,7 +30,7 @@
     <div>
         <label for="id_max_depth" class=before>maximum depth</label> {{ form.max_depth }} km
         {% if form.max_depth.errors %}<span class=error>{{ form.max_depth.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>maximum depth</dt><dd>Maximum depth, d<span style="vertical-align: sub">max</span>, to cut all output eigenfunctions (in km). All output values exist in the interval 
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>maximum depth</dt><dd>Maximum depth, d<span style="vertical-align: sub">max</span>, to cut all output eigenfunctions (in km). All output values exist in the interval 
 (r<span style="vertical-align: sub">n</span>, r<span style="vertical-align: sub">n</span> - d<span style="vertical-align: sub">max</span>) only, where r<span style="vertical-align: sub">n</span> is the radius of the free surface in km.</dd></dl></dd></dl>
     </div>
 
@@ -38,22 +38,22 @@
 
 
     <p>Neglect gravitational terms above {{ form.wgrav }} mHz. {% if form.wgrav.errors %}<span class=error>{{ form.wgrav.errors|join:", " }}</span>{% endif %}
-       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>neglect gravitational terms</dt><dd>This gives about a factor of 3 increase in speed.</dd></dl></dd></dl>
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>neglect gravitational terms</dt><dd>This gives about a factor of 3 increase in speed.</dd></dl></dd></dl>
 
     <p><label for="id_lmin" class=before>angular orders</label> {{ form.lmin }} <= l < {{ form.lmax }}
        {% if form.lmin.errors %}<span class=error>{{ form.lmin.errors|join:", " }}</span>{% endif %}
        {% if form.lmax.errors %}<span class=error>{{ form.lmax.errors|join:", " }}</span>{% endif %}
-       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular orders</dt><dd>The range of angular orders l to be computed. For radial modes, this range is not used.</dd></dl></dd></dl>
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>angular orders</dt><dd>The range of angular orders l to be computed. For radial modes, this range is not used.</dd></dl></dd></dl>
 
     <p><label for="id_wmin" class=before>compute frequency range</label> {{ form.wmin }} <= w < {{ form.wmax }} mHz
        {% if form.wmin.errors %}<span class=error>{{ form.wmin.errors|join:", " }}</span>{% endif %}
        {% if form.wmax.errors %}<span class=error>{{ form.wmax.errors|join:", " }}</span>{% endif %}
-       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>compute frequency range</dt><dd>The frequency range to be computed (in millihertz).</dd></dl></dd></dl>
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>compute frequency range</dt><dd>The frequency range to be computed (in millihertz).</dd></dl></dd></dl>
 
     <p><label for="id_nmin" class=before>dispersion branch numbers</label> {{ form.nmin }} <= n < {{ form.nmax }}
        {% if form.nmin.errors %}<span class=error>{{ form.nmin.errors|join:", " }}</span>{% endif %}
        {% if form.nmax.errors %}<span class=error>{{ form.nmax.errors|join:", " }}</span>{% endif %}
-       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>dispersion branch numbers</dt><dd>The range of dispersion branch numbers n to be computed; n = 0 is the fundamental mode.</dd></dl></dd></dl>
+       <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>dispersion branch numbers</dt><dd>The range of dispersion branch numbers n to be computed; n = 0 is the fundamental mode.</dd></dl></dd></dl>
 
 
     <div class=tab30ex>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_list.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_list.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -24,7 +24,7 @@
     <tbody>
     {% for object in object_list %}
     <tr class="{% cycle odd,even %}" id="o{{object.id}}">
-        <td><a href="/specfem3dglobe/?class=MineosModeCatalog&object={{object.id}}">xxx</a></td>
+        <td><a href="{{root}}/?class=MineosModeCatalog&object={{object.id}}">xxx</a></td>
         <td>{{ object.eps }}</td>
         <td>{{ object.wgrav }}</td>
         <td>{{ object.lmin }}</td>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete mineos model</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="MineosModel">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -5,7 +5,7 @@
 <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
 {% endif %}
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="MineosModel">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="edit">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_list.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_list.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -11,7 +11,7 @@
     <tbody>
     {% for object in object_list %}
     <tr class="{% cycle odd,even %}" id="o{{object.id}}">
-        <td><a href="/specfem3dglobe/?class=MineosModel&object={{object.id}}">{{ object }}</a></td>
+        <td><a href="{{root}}/?class=MineosModel&object={{object.id}}">{{ object }}</a></td>
     </tr>
     {% endfor %}
     </tbody>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_upload.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_upload.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodel_upload.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,9 @@
 
 <h2>upload mineos model</h2>
 
-<form action="/specfem3dglobe/?class=MineosModel&action=upload" method="POST" enctype="multipart/form-data">
+<form action="{{action}}" method="POST" enctype="multipart/form-data">
+    <input type="hidden" name="class" value="MineosModel">
+    <input type="hidden" name="action" value="upload">
 
     {% if form.has_errors %}
     <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete mineos parameters</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="MineosParameters">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_detail.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_detail.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_detail.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -2,13 +2,13 @@
 <h2>{{ object }}</h2>
 
 <dl class=parameters>
-    <dt>model</dt><dd><a href="/specfem3dglobe/?class=MineosModel&object={{object.model.id}}">{{ object.model }}</a></dd>
-    <dt>mode catalog</dt><dd><a href="/specfem3dglobe/?class=MineosModeCatalog&object={{object.model.id}}">{{ object.catalog }}</a></dd>
+    <dt>model</dt><dd><a href="{{root}}/?class=MineosModel&object={{object.model.id}}">{{ object.model }}</a></dd>
+    <dt>mode catalog</dt><dd><a href="{{root}}/?class=MineosModeCatalog&object={{object.model.id}}">{{ object.catalog }}</a></dd>
     <dt>oscillations</dt>
-        <dd><img src="/specfem3dglobe/pics/icon-{% if object.radial %}yes{% else %}no{% endif %}.gif" alt="{{ object.radial }}"> radial</dd>
-        <dd><img src="/specfem3dglobe/pics/icon-{% if object.toroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.toroidal }}"> toroidal </dd>
-        <dd><img src="/specfem3dglobe/pics/icon-{% if object.spheroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.spheroidal }}"> spheroidal</dd>
-        <dd><img src="/specfem3dglobe/pics/icon-{% if object.ictoroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.ictoroidal }}"> inner core toroidal</dd>
+        <dd><img src="{{root}}/pics/icon-{% if object.radial %}yes{% else %}no{% endif %}.gif" alt="{{ object.radial }}"> radial</dd>
+        <dd><img src="{{root}}/pics/icon-{% if object.toroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.toroidal }}"> toroidal </dd>
+        <dd><img src="{{root}}/pics/icon-{% if object.spheroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.spheroidal }}"> spheroidal</dd>
+        <dd><img src="{{root}}/pics/icon-{% if object.ictoroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.ictoroidal }}"> inner core toroidal</dd>
     <dt>select frequency range</dt><dd>{{ object.fmin }} <= f < {{ object.fmax }}</dd>
     <dt>sampling period</dt><dd>{{ object.step }}s</dd>
 </dl>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>{% if object %}edit{% else %}new{% endif %} Mineos parameters</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="MineosParameters">
     {% if object %}
     <input type="hidden" name="object" value="{{object.id}}">
@@ -65,7 +65,7 @@
     <p><label for="id_step" class=before>sampling period</label> {{ form.step }} s
        {% if form.step.errors %}<span class=error>{{ form.step.errors|join:", " }}</span>{% endif %}
 
-    <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+    <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-large.gif"> Help</dt>
     <dd class="collapsibleContent">
         <dl>
             <dt>select frequency range</dt><dd>The frequency range to be selected from the input eigenfunction databases. All modes with frequencies out of this range are rejected.</dd>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_list.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_list.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -26,13 +26,13 @@
     <tbody>
     {% for object in object_list %}
     <tr class="{% cycle odd,even %}" id="o{{object.id}}">
-        <td><a href="/specfem3dglobe/?class=MineosParameters&object={{object.id}}">xxx</a></td>
+        <td><a href="{{root}}/?class=MineosParameters&object={{object.id}}">xxx</a></td>
         <td>{{ object.model }}</td>
         <td>{{ object.catalog }}</td>
-        <td><img src="/specfem3dglobe/pics/icon-{% if object.radial %}yes{% else %}no{% endif %}.gif" alt="{{ object.radial }}"></td>
-        <td><img src="/specfem3dglobe/pics/icon-{% if object.toroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.toroidal }}"></td>
-        <td><img src="/specfem3dglobe/pics/icon-{% if object.spheroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.spheroidal }}"></td>
-        <td><img src="/specfem3dglobe/pics/icon-{% if object.ictoroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.ictoroidal }}"></td>
+        <td><img src="{{root}}/pics/icon-{% if object.radial %}yes{% else %}no{% endif %}.gif" alt="{{ object.radial }}"></td>
+        <td><img src="{{root}}/pics/icon-{% if object.toroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.toroidal }}"></td>
+        <td><img src="{{root}}/pics/icon-{% if object.spheroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.spheroidal }}"></td>
+        <td><img src="{{root}}/pics/icon-{% if object.ictoroidal %}yes{% else %}no{% endif %}.gif" alt="{{ object.ictoroidal }}"></td>
         <td>{{ object.fmin }}</td>
         <td>{{ object.fmax }}</td>
         <td>{{ object.step }}</td>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/outputfile_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/outputfile_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/outputfile_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -11,7 +11,7 @@
     <p>{{ form.error_dict }}
     {% endif %}
 
-    <form method="post" action="{{ action }}">
+    <form method="post" action="{{action}}">
 
     <p><label for="id_job">job</label> {{ form.job }}
     <p><label for="id_name">name</label> {{ form.name }}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/password_change_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/password_change_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/password_change_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -7,8 +7,8 @@
 
 <div class=tabs>
     <ul>
-        <li class=first><a href="/specfem3dglobe/registration/">registration</a>
-        <li class=selected><a href="/specfem3dglobe/registration/password/">password</a>
+        <li class=first><a href="{{root}}/registration/">registration</a>
+        <li class=selected><a href="{{root}}/registration/password/">password</a>
     </ul>
 </div>
 
@@ -16,7 +16,7 @@
 <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
 {% endif %}
 
-<form action="/specfem3dglobe/registration/password/" method="post">
+<form action="{{action}}" method="post">
     <div class=tab30ex>
 
     <div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/pluggable.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/pluggable.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/pluggable.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -7,16 +7,16 @@
     <tr>
         <td>
             <h1>
-                <img src="/specfem3dglobe/pics/cig.gif">
-                <img src="/specfem3dglobe/images/seismogram.gif">
+                <img src="{{root}}/pics/cig.gif">
+                <img src="{{root}}/images/seismogram.gif">
                 CIG Seismology Web Portal
             </h1>
         </td>
         <td id=login align=right>
             {% if user.is_authenticated %}
-            <img src="/specfem3dglobe/images/user.gif"> {{ user.first_name }} ({{ user.username }}) ~
+            <img src="{{root}}/images/user.gif"> {{ user.first_name }} ({{ user.username }}) ~
             {% endif %}
-            <a class="actionButton" href="/specfem3dglobe/logout/">logout</a>
+            <a class="actionButton" href="{{root}}/logout/">logout</a>
         </td>
     </tr>
     <tr>
@@ -24,37 +24,37 @@
             <table id=buttonbar>
                 <tr>
                     <td align=center>
-                        <a href="/specfem3dglobe/"><img src="/specfem3dglobe/icons/home.gif" width=32 height=32><br>
+                        <a href="{{root}}/"><img src="{{root}}/icons/home.gif" width=32 height=32><br>
                         Home</a>
                     </td>
                     <td align=center>
-                        <a href="/specfem3dglobe/?class=Event"><img src="/specfem3dglobe/icons/events.gif" width=32 height=32><br>
+                        <a href="{{root}}/?class=Event"><img src="{{root}}/icons/events.gif" width=32 height=32><br>
                         Events</a>
                     </td>
                     <td align=center>
-                        <a href="/specfem3dglobe/?class=StationList"><img src="/specfem3dglobe/icons/stationlist.gif" width=32 height=32><br>
+                        <a href="{{root}}/?class=StationList"><img src="{{root}}/icons/stationlist.gif" width=32 height=32><br>
                         Stations</a>
                     </td>
                     <td class=separator></td>
                     <td align=center>
-                        <a href="/specfem3dglobe/?class=Specfem3DGlobeParameters"><img src="/specfem3dglobe/icons/parameters.gif" width=32 height=32><br>
+                        <a href="{{root}}/?class=Specfem3DGlobeParameters"><img src="{{root}}/icons/parameters.gif" width=32 height=32><br>
                         3D Parameters</a>
                     </td>
                     <td align=center>
-                        <a href="/specfem3dglobe/?class=Specfem3DGlobeMesh"><img src="/specfem3dglobe/icons/mesh.gif" width=32 height=32><br>
+                        <a href="{{root}}/?class=Specfem3DGlobeMesh"><img src="{{root}}/icons/mesh.gif" width=32 height=32><br>
                         Meshes</a>
                     </td>
                     <td class=separator></td>
                     <td align=center>
-                        <a href="/specfem3dglobe/?class=MineosParameters"><img src="/specfem3dglobe/icons/parameters.gif" width=32 height=32><br>
+                        <a href="{{root}}/?class=MineosParameters"><img src="{{root}}/icons/parameters.gif" width=32 height=32><br>
                         1D Parameters</a>
                     </td>
                     <td align=center>
-                        <a href="/specfem3dglobe/?class=MineosModel"><img src="/specfem3dglobe/icons/prem.gif" width=32 height=32><br>
+                        <a href="{{root}}/?class=MineosModel"><img src="{{root}}/icons/prem.gif" width=32 height=32><br>
                         1D Models</a>
                     </td>
                     <td align=center>
-                        <a href="/specfem3dglobe/?class=MineosModeCatalog"><img src="/specfem3dglobe/icons/modecat.gif" width=32 height=32><br>
+                        <a href="{{root}}/?class=MineosModeCatalog"><img src="{{root}}/icons/modecat.gif" width=32 height=32><br>
                         Mode Catalogs</a>
                     </td>
                 </tr>
@@ -67,9 +67,9 @@
                 <tr>
                     <td>
                         {% ifequal klass 'Event' %}
-                        <a class="actionButton" href="/specfem3dglobe/?class={{klass}}&action=search"><img src="/specfem3dglobe/images/search_icon.gif"> Search</a>
+                        <a class="actionButton" href="{{root}}/?class={{klass}}&action=search"><img src="{{root}}/images/search_icon.gif"> Search</a>
                         {% else %}
-                        <span class="actionButton disabled"><img src="/specfem3dglobe/images/search_icon.gif"> Search</span>
+                        <span class="actionButton disabled"><img src="{{root}}/images/search_icon.gif"> Search</span>
                         {% endifequal %}
                     </td>
                     <td>
@@ -77,19 +77,19 @@
                         {% ifequal klass 'Specfem3DGlobeMesh' %}
                         <dl class="actionMenu" id="newMenu">
                             <dt class="actionMenuHeader">
-                                <a href="some_destination">New <img src="/specfem3dglobe/images/menu-arrow.gif" width=13 height=8></a>
+                                <a href="some_destination">New <img src="{{root}}/images/menu-arrow.gif" width=13 height=8></a>
                             </dt>
                             <dd class="actionMenuContent">
                                 <ul>
-                                    <li><a href="/specfem3dglobe/?class={{klass}}&action=new&nchunks=1">1-chunk regional mesh</a></li>
-                                    <li><a href="/specfem3dglobe/?class={{klass}}&action=new&nchunks=2">2-chunk regional mesh</a></li>
-                                    <li><a href="/specfem3dglobe/?class={{klass}}&action=new&nchunks=3">3-chunk regional mesh</a></li>
-                                    <li><a href="/specfem3dglobe/?class={{klass}}&action=new&nchunks=6">global mesh</a></li>
+                                    <li><a href="{{root}}/?class={{klass}}&action=new&nchunks=1">1-chunk regional mesh</a></li>
+                                    <li><a href="{{root}}/?class={{klass}}&action=new&nchunks=2">2-chunk regional mesh</a></li>
+                                    <li><a href="{{root}}/?class={{klass}}&action=new&nchunks=3">3-chunk regional mesh</a></li>
+                                    <li><a href="{{root}}/?class={{klass}}&action=new&nchunks=6">global mesh</a></li>
                                 </ul>
                             </dd>
                         </dl>
                         {% else %}
-                        <a class="actionButton" href="/specfem3dglobe/?class={{klass}}&action=new">New</a>
+                        <a class="actionButton" href="{{root}}/?class={{klass}}&action=new">New</a>
                         {% endifequal %}
                         {% else %}
                         <span class="actionButton disabled">New</span>
@@ -97,56 +97,56 @@
                     </td>
                     <td>
                         {% if uploadable %}
-                        <a class="actionButton" href="/specfem3dglobe/?class={{klass}}&action=upload">Upload</a>
+                        <a class="actionButton" href="{{root}}/?class={{klass}}&action=upload">Upload</a>
                         {% else %}
                         <span class="actionButton disabled">Upload</span>
                         {% endif %}
                     </td>
                     <td>
                         {% if object %}
-                        <a class="actionButton" href="/specfem3dglobe/?class={{klass}}&object={{object.id}}&action=edit">Edit</a>
+                        <a class="actionButton" href="{{root}}/?class={{klass}}&object={{object.id}}&action=edit">Edit</a>
                         {% else %}
                         <span class="actionButton disabled">Edit</span>
                         {% endif %}
                     </td>
                     <td>
                         {% if duplicatable %}
-                        <a class="actionButton" href="/specfem3dglobe/?class={{klass}}&object={{object.id}}&action=duplicate"><img src="/specfem3dglobe/images/dup_icon.gif"> Duplicate</a>
+                        <a class="actionButton" href="{{root}}/?class={{klass}}&object={{object.id}}&action=duplicate"><img src="{{root}}/images/dup_icon.gif"> Duplicate</a>
                         {% else %}
-                        <span class="actionButton disabled"><img src="/specfem3dglobe/images/dup_icon.gif"> Duplicate</span>
+                        <span class="actionButton disabled"><img src="{{root}}/images/dup_icon.gif"> Duplicate</span>
                         {% endif %}
                     </td>
                     <td>
                         {% if object %}
-                        <a class="actionButton" href="/specfem3dglobe/?class={{klass}}&object={{object.id}}&action=delete"><img src="/specfem3dglobe/images/delete_icon.gif"> Delete</a>
+                        <a class="actionButton" href="{{root}}/?class={{klass}}&object={{object.id}}&action=delete"><img src="{{root}}/images/delete_icon.gif"> Delete</a>
                         {% else %}
-                        <span class="actionButton disabled"><img src="/specfem3dglobe/images/delete_icon.gif"> Delete</span>
+                        <span class="actionButton disabled"><img src="{{root}}/images/delete_icon.gif"> Delete</span>
                         {% endif %}
                     </td>
                     <td>
                         {% if downloadable %}
                         <dl class="actionMenu" id="downloadMenu">
                             <dt class="actionMenuHeader">
-                                <a href="some_destination">Download <img src="/specfem3dglobe/images/menu-arrow.gif" width=13 height=8></a>
+                                <a href="some_destination">Download <img src="{{root}}/images/menu-arrow.gif" width=13 height=8></a>
                             </dt>
                             <dd class="actionMenuContent">
                                 <ul>
                                     <li>
                                         {% if downloadableAsText %}
-                                        <a href="/specfem3dglobe/?class={{klass}}&object={{object.id}}&action=downloadAsText"><img src="/specfem3dglobe/icons/document.gif" width=32 height=32> Text</a>
+                                        <a href="{{root}}/?class={{klass}}&object={{object.id}}&action=downloadAsText"><img src="{{root}}/icons/document.gif" width=32 height=32> Text</a>
                                         {% else %}
-                                        <span class="actionMenuItem disabled"><img src="/specfem3dglobe/icons/document.gif" width=32 height=32> Text</span>
+                                        <span class="actionMenuItem disabled"><img src="{{root}}/icons/document.gif" width=32 height=32> Text</span>
                                         {% endif %}
                                     </li>
                                     <li>
                                         {% if downloadableAsKML %}
-                                        <a href="/specfem3dglobe/?class={{klass}}&object={{object.id}}&action=downloadAsKML"><img src="/specfem3dglobe/pics/kml.icon.gif"> Google Earth Map</a>
+                                        <a href="{{root}}/?class={{klass}}&object={{object.id}}&action=downloadAsKML"><img src="{{root}}/pics/kml.icon.gif"> Google Earth Map</a>
                                         {% else %}
-                                        <span class="actionMenuItem disabled"><img src="/specfem3dglobe/pics/kml.icon.gif"> Google Earth Map</span>
+                                        <span class="actionMenuItem disabled"><img src="{{root}}/pics/kml.icon.gif"> Google Earth Map</span>
                                         {% endif %}
                                     </li>
-                                    <li><span class="actionMenuItem disabled"><img src="/specfem3dglobe/pics/adobe-pdf.icon.gif"> PDF</span></li>
-                                    <li><span class="actionMenuItem disabled"><img src="/specfem3dglobe/images/ps.gif"> PostScript</span></li>
+                                    <li><span class="actionMenuItem disabled"><img src="{{root}}/pics/adobe-pdf.icon.gif"> PDF</span></li>
+                                    <li><span class="actionMenuItem disabled"><img src="{{root}}/images/ps.gif"> PostScript</span></li>
                                 </ul>
                             </dd>
                         </dl>
@@ -155,7 +155,7 @@
                         {% endif %}
                     </td>
                     <td>
-                        <a class="actionButton" href="/specfem3dglobe/run/">Run Simulation</a>
+                        <a class="actionButton" href="{{root}}/run/">Run Simulation</a>
                     </td>
                 </tr>
             </table>
@@ -166,12 +166,12 @@
                     <td>
                         {% if object %}
                         {% ifequal klass 'Source' %}
-                        <a href="/specfem3dglobe/?class=Event&object={{object.obj.event.id}}#s{{object.id}}"><img src="/specfem3dglobe/images/highlight-item.gif" alt="Highlight Item" width=24 height=16></a>
+                        <a href="{{root}}/?class=Event&object={{object.obj.event.id}}#s{{object.id}}"><img src="{{root}}/images/highlight-item.gif" alt="Highlight Item" width=24 height=16></a>
                         {% else %}
-                        <a href="/specfem3dglobe/?class={{klass}}#o{{object.id}}"><img src="/specfem3dglobe/images/highlight-item.gif" alt="Highlight Item" width=24 height=16></a>
+                        <a href="{{root}}/?class={{klass}}#o{{object.id}}"><img src="{{root}}/images/highlight-item.gif" alt="Highlight Item" width=24 height=16></a>
                         {% endifequal %}
                         {% else %}
-                        <img src="/specfem3dglobe/images/highlight-item-disabled.gif" alt="Highlight Item" width=24 height=16>
+                        <img src="{{root}}/images/highlight-item-disabled.gif" alt="Highlight Item" width=24 height=16>
                         {% endif %}
                     </td>
                     <td>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/register.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/register.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/register.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -3,20 +3,68 @@
 
 {% block body %}
 
-<p><a href="/specfem3dglobe/"><img id=logo src="/specfem3dglobe/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
+<p><a href="{{root}}/"><img id=logo src="{{root}}/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
 
 <h2>new user registration</h2>
 
 <p>To create a new account, simply fill-out the form below.
 
-<p>If you've registered before, but have simply forgotten your username and/or password, try <a href="/specfem3dglobe/pwreset/">resetting your password</a>.
+<p>If you've registered before, but have simply forgotten your username and/or password, try <a href="{{root}}/pwreset/">resetting your password</a>.
    If you need help, <a href="mailto:portal at geodynamics.org">contact us</a>.
 
-{% include "SeismoWebPortal/registration_form.html" %}
+{% if form.has_errors %}
+<p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
+{% endif %}
 
-<div class=illustration id=usermap>
-    <img src="/specfem3dglobe/pics/specfem_users_map.gif" width=461 height=230>
-    <p class=caption>SPECFEM User Map</p>
-</div>
+<form method="post" action="{{action}}">
 
+    <div class=tab30ex>
+
+    <fieldset><legend>username and password</legend>
+
+    <div>
+        <label for="id_username" class=before>username</label>
+        {{ form.username }}
+        {% if form.username.errors %}<span class=error>{{ form.username.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_password1" class=before>password</label>
+        {{ form.password1 }}
+        {% if form.password1.errors %}<span class=error>{{ form.password1.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_password2" class=before>confirm password</label>
+        {{ form.password2 }}
+        {% if form.password2.errors %}<span class=error>{{ form.password2.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    </fieldset>
+
+
+    <fieldset><legend>contact information</legend>
+    {% include "SeismoWebPortal/contact_info.html" %}
+    </fieldset>
+
+
+    <fieldset><legend>invitation</legend>
+
+    <p>If you were given an invitation code, enter it below.
+       A valid invitation enables you to start running simulations immediately!
+
+    <div>
+        <label for="id_invite" class=before>invitation code</label>
+        {{ form.invite }}
+        {% if form.invite.errors %}<span class=error>{{ form.invite.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    </fieldset>
+
+    <div><input class=submit type="submit" value="Register"/></div>
+
+    </div> <!-- tab30ex -->
+
+</form>
+
 {% endblock %}

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/registration_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/registration_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/registration_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,112 +0,0 @@
-
-{% if form.has_errors %}
-<p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
-{% endif %}
-
-<form method="post" action="/specfem3dglobe/registration/">
-    <div class=tab30ex>
-
-    {% if user.is_anonymous %}
-    <fieldset><legend>username and password</legend>
-
-    <div>
-        <label for="id_username" class=before>username</label>
-        {{ form.username }}
-        {% if form.username.errors %}<span class=error>{{ form.username.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_password1" class=before>password</label>
-        {{ form.password1 }}
-        {% if form.password1.errors %}<span class=error>{{ form.password1.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_password2" class=before>confirm password</label>
-        {{ form.password2 }}
-        {% if form.password2.errors %}<span class=error>{{ form.password2.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    </fieldset>
-
-    {% endif %}
-
-    <fieldset><legend>contact information</legend>
-
-    <div>
-        <label for="id_first_name" class=before>first name</label>
-        {{ form.first_name }}
-        {% if form.first_name.errors %}<span class=error>{{ form.first_name.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_last_name" class=before>last name</label>
-        {{ form.last_name }}
-        {% if form.last_name.errors %}<span class=error>{{ form.last_name.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_email" class=before>e-mail</label>
-        {{ form.email }}
-        {% if form.email.errors %}<span class=error>{{ form.email.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_institution" class=before>institution</label>
-        {{ form.institution }}
-        {% if form.institution.errors %}<span class=error>{{ form.institution.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_address1" class=before>address</label>
-        {{ form.address1 }} (optional)
-        {% if form.address1.errors %}<span class=error>{{ form.address1.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_address2" class=before>city</label>
-        {{ form.address2 }} (optional)
-        {% if form.address2.errors %}<span class=error>{{ form.address2.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_address3" class=before>state &amp; ZIP</label>
-        {{ form.address3 }} (optional)
-        {% if form.address3.errors %}<span class=error>{{ form.address3.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_phone" class=before>phone number</label>
-        {{ form.phone }} (optional)
-        {% if form.phone.errors %}<span class=error>{{ form.phone.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    </fieldset>
-
-
-    {% if user.is_anonymous %}
-
-    <fieldset><legend>invitation</legend>
-
-    <p>If you were given an invitation code, enter it below.
-       A valid invitation enables you to start running simulations immediately!
-
-    <div>
-        <label for="id_invite" class=before>invitation code</label>
-        {{ form.invite }}
-        {% if form.invite.errors %}<span class=error>{{ form.invite.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    </fieldset>
-
-    {% endif %}
-
-    {% if user.is_anonymous %}
-    <div><input class=submit type="submit" value="Register"/></div>
-    {% else %}
-    <div><input class=submit type="submit" value="Save"/></div>
-    {% endif %}
-
-    </div> <!-- tab30ex -->
-
-</form>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/root.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/root.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/root.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,9 +1,9 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
-    <link href="/specfem3dglobe/style.css" type="text/css" rel="stylesheet" media="all" />
-    <script type="text/javascript" language="javascript" src="/specfem3dglobe/script.js"></script>
-    <title>{% block title %}SPECFEM 3D GLOBE{% endblock %}</title>
+    <link href="{{root}}/style.css" type="text/css" rel="stylesheet" media="all" />
+    <script type="text/javascript" language="javascript" src="{{root}}/script.js"></script>
+    <title>CIG Seismology Web Portal</title>
 </head>
 
 <body>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/run_status.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/run_status.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/run_status.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -5,7 +5,7 @@
 
     <body>
 
-    <form action="." method="POST" enctype="multipart/form-data">
+    <form action="{{action}}" method="POST" enctype="multipart/form-data">
     <p>{{ form.status }}
     <p>output: {{ form.output }} {{ form.output_file }}
     <p><input type="submit" value="Save">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/single_source_event_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/single_source_event_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/single_source_event_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -5,7 +5,7 @@
 <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
 {% endif %}
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="Event">
     {% if object %}
     <input type="hidden" name="object" value="{{object.id}}">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete source</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="Source">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/source_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -5,7 +5,7 @@
 <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
 {% endif %}
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="Source">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="edit">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete mesh</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="Specfem3DGlobeMesh">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -41,7 +41,7 @@
         <tbody>
         {% for object in object_list %}
         <tr class="{% cycle odd,even %}" id="o{{object.id}}">
-            <td><a href="/specfem3dglobe/?class=Specfem3DGlobeMesh&object={{object.id}}">xxx</a></td>
+            <td><a href="{{root}}/?class=Specfem3DGlobeMesh&object={{object.id}}">xxx</a></td>
             <td class=int>{{ object.nchunks }}</td>
             <td class=int>{{ object.nproc_eta }}</td>
             <td class=int>{{ object.nproc_xi }}</td>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete specfem 3d globe parameters</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="Specfem3DGlobeParameters">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -2,7 +2,7 @@
 <h2>{{ object }}</h2>
 
 <dl class=parameters>
-    <dt>mesh</dt><dd><a href="/specfem3dglobe/?class=Specfem3DGlobeMesh&object={{object.mesh.id}}">{{ object.mesh }}</a></dd>
+    <dt>mesh</dt><dd><a href="{{root}}/?class=Specfem3DGlobeMesh&object={{object.mesh.id}}">{{ object.mesh }}</a></dd>
     <dt>model</dt><dd>{{ object.get_model_display }}</dd>
     <dt>oceans</dt><dd>{{ object.oceans }}</dd>
     <dt>gravity</dt><dd>{{ object.gravity }}</dd>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,14 @@
 
 <h2>{% if object %}edit{% else %}new{% endif %} Specfem 3D Globe parameters</h2>
 
-<form method="post" action="{{ action }}">
+<form method="post" action="{{action}}">
+    <input type="hidden" name="class" value="Specfem3DGlobeParameters">
+    {% if object %}
+    <input type="hidden" name="object" value="{{object.id}}">
+    <input type="hidden" name="action" value="edit">
+    {% else %}
+    <input type="hidden" name="action" value="new">
+    {% endif %}
 
     {% if form.has_errors %}
     <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
@@ -35,7 +42,7 @@
         {{ form.model }}
         {% if form.model.errors %}<span class=error>{{ form.model.errors|join:", " }}</span>{% endif %}
 
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt>
         <dd class="collapsibleContent">
         <dl>
             <dt>crust2.0+prem</dt><dd>This model has CRUST2.0 [Bassin et al., 2000] on top of a transversely isotropic PREM. We first extrapolate PREM mantle velocity up to the surface, then overwrite the model with CRUST2.0.</dd>
@@ -57,35 +64,35 @@
         {{ form.oceans }}
         <label for="id_oceans" class=after>oceans</label>
         {% if form.oceans.errors %}<span class=error>{{ form.oceans.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>oceans</dt><dd>If selected, the effect of the oceans on seismic wave propagation will be incorporated based upon the approximate treatment discussed in Komatitsch and Tromp [2002b]. This feature is inexpensive from a numerical perspective, both in terms of memory requirements and CPU time. This approximation is accurate at periods of roughly 20s and longer. At shorter periods the effect of water phases/reverberations is not taken into account, even when the flag is on.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>oceans</dt><dd>If selected, the effect of the oceans on seismic wave propagation will be incorporated based upon the approximate treatment discussed in Komatitsch and Tromp [2002b]. This feature is inexpensive from a numerical perspective, both in terms of memory requirements and CPU time. This approximation is accurate at periods of roughly 20s and longer. At shorter periods the effect of water phases/reverberations is not taken into account, even when the flag is on.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.gravity }}
         <label for="id_gravity" class=after>gravity</label>
         {% if form.gravity.errors %}<span class=error>{{ form.gravity.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>gravity</dt><dd>If selected, self-gravitation will be incorporated in the Cowling approximation [Komatitsch and Tromp, 2002b, Dahlen and Tromp, 1998]. Turning this feature on is relatively inexpensive, both from the perspective of memory requirements as well as in terms of computational speed.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>gravity</dt><dd>If selected, self-gravitation will be incorporated in the Cowling approximation [Komatitsch and Tromp, 2002b, Dahlen and Tromp, 1998]. Turning this feature on is relatively inexpensive, both from the perspective of memory requirements as well as in terms of computational speed.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.attenuation }}
         <label for="id_attenuation" class=after>attenuation</label>
         {% if form.attenuation.errors %}<span class=error>{{ form.attenuation.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>attenuation</dt><dd>If selected, attenuation will be incorporated. Turning this feature on increases the memory requirements significantly (roughly by a factor of 1.5), and is numerically fairly expensive. Of course for realistic simulations this flag should be turned on. See Komatitsch and Tromp [1999, 2002a] for a discussion on the implementation of attenuation based upon standard linear solids.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>attenuation</dt><dd>If selected, attenuation will be incorporated. Turning this feature on increases the memory requirements significantly (roughly by a factor of 1.5), and is numerically fairly expensive. Of course for realistic simulations this flag should be turned on. See Komatitsch and Tromp [1999, 2002a] for a discussion on the implementation of attenuation based upon standard linear solids.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.topography }}
         <label for="id_topography" class=after>topography</label>
         {% if form.topography.errors %}<span class=error>{{ form.topography.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>topography</dt><dd>If selected, topography and bathymetry will be incorporated based upon model ETOPO5 [NOAA, 1988]. This feature adds no cost to the simulation.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>topography</dt><dd>If selected, topography and bathymetry will be incorporated based upon model ETOPO5 [NOAA, 1988]. This feature adds no cost to the simulation.</dd></dl></dd></dl>
     </div>
 
     <div class=checkbox>
         {{ form.rotation }}
         <label for="id_rotation" class=after>rotation</label>
         {% if form.rotation.errors %}<span class=error>{{ form.rotation.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>rotation</dt><dd>If selected, the Coriolis effect will be incorporated. Turning this feature on is relatively cheap 
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>rotation</dt><dd>If selected, the Coriolis effect will be incorporated. Turning this feature on is relatively cheap 
 numerically.</dd></dl></dd></dl>
     </div>
 
@@ -93,7 +100,7 @@
         {{ form.ellipticity }}
         <label for="id_ellipticity" class=after>ellipticity</label>
         {% if form.ellipticity.errors %}<span class=error>{{ form.ellipticity.errors|join:", " }}</span>{% endif %}
-        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>ellipticity</dt><dd>If selected, the mesh will make the Earth model elliptical in shape according to Clairaut's equation [Dahlen and Tromp, 1998]. This feature adds no cost to the simulation.</dd></dl></dd></dl>
+        <dl class="help inline collapsible collapsedOnLoad"><dt class="collapsibleHeader"><img src="{{root}}/images/help-small.gif"></dt><dd class="collapsibleContent"><dl><dt>ellipticity</dt><dd>If selected, the mesh will make the Earth model elliptical in shape according to Clairaut's equation [Dahlen and Tromp, 1998]. This feature adds no cost to the simulation.</dd></dl></dd></dl>
     </div>
 
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -18,16 +18,16 @@
         <tbody>
         {% for object in object_list %}
         <tr class="{% cycle odd,even %}" id="o{{object.id}}">
-            <td><a href="/specfem3dglobe/?class=Specfem3DGlobeParameters&object={{object.id}}">xxx</a></td>
+            <td><a href="{{root}}/?class=Specfem3DGlobeParameters&object={{object.id}}">xxx</a></td>
             <td>{{ object.mesh }}<br>
                 <span class=inlineInfo>shortest period &cong; {{ object.mesh.shortestPeriod|stringformat:".0f" }}s</span></td>
             <td>{{ object.get_model_display }}</td>
-            <td><img src="/specfem3dglobe/pics/icon-{% if object.oceans %}yes{% else %}no{% endif %}.gif" alt="{{ object.oceans }}"></td>
-            <td><img src="/specfem3dglobe/pics/icon-{% if object.gravity %}yes{% else %}no{% endif %}.gif" alt="{{ object.gravity }}"></td>
-            <td><img src="/specfem3dglobe/pics/icon-{% if object.attenuation %}yes{% else %}no{% endif %}.gif" alt="{{ object.attenuation }}"></td>
-            <td><img src="/specfem3dglobe/pics/icon-{% if object.topography %}yes{% else %}no{% endif %}.gif" alt="{{ object.topography }}"></td>
-            <td><img src="/specfem3dglobe/pics/icon-{% if object.rotation %}yes{% else %}no{% endif %}.gif" alt="{{ object.rotation }}"></td>
-            <td><img src="/specfem3dglobe/pics/icon-{% if object.ellipticity %}yes{% else %}no{% endif %}.gif" alt="{{ object.ellipticity }}"></td>
+            <td><img src="{{root}}/pics/icon-{% if object.oceans %}yes{% else %}no{% endif %}.gif" alt="{{ object.oceans }}"></td>
+            <td><img src="{{root}}/pics/icon-{% if object.gravity %}yes{% else %}no{% endif %}.gif" alt="{{ object.gravity }}"></td>
+            <td><img src="{{root}}/pics/icon-{% if object.attenuation %}yes{% else %}no{% endif %}.gif" alt="{{ object.attenuation }}"></td>
+            <td><img src="{{root}}/pics/icon-{% if object.topography %}yes{% else %}no{% endif %}.gif" alt="{{ object.topography }}"></td>
+            <td><img src="{{root}}/pics/icon-{% if object.rotation %}yes{% else %}no{% endif %}.gif" alt="{{ object.rotation }}"></td>
+            <td><img src="{{root}}/pics/icon-{% if object.ellipticity %}yes{% else %}no{% endif %}.gif" alt="{{ object.ellipticity }}"></td>
         </tr>
         {% endfor %}
         </tbody>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/splash.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/splash.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/splash.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -22,23 +22,15 @@
     <p>Are you a new user? If so, please <a href="registration/">register</a>.<br>
        If you need help, <a href="mailto:portal at geodynamics.org">contact us</a>.
 
-    <p><img src="/specfem3dglobe/pics/specfem3dg.jpg" width=393 height=374>
+    <p><img src="{{root}}/pics/specfem3dg.jpg" width=393 height=374>
 
-<!--
-    <ul class=links>
-        <li><a href="about.html">about</a>
-        <li><a href="science.html">science</a>
-        <li class=last><a href="links.html">links</a>
-    </ul>
--->
-
     <p id=sponsored>Sponsored by:</p>
     <ul class=sponsors>
-        <li><a href="http://www.geodynamics.org/"><img src="/specfem3dglobe/pics/cig-logo_small-initials.gif"></a>
-        <li><a href="http://www.caltech.edu/"><img src="/specfem3dglobe/pics/citlogo.gif"></a>
-        <li><a href="http://www.seismolab.caltech.edu/"><img src="/specfem3dglobe/pics/seismolab_logo.gif"></a>
-        <li><a href="http://www.nsf.gov/"><img src="/specfem3dglobe/pics/nsf_logo.jpg"></a>
-        <li><a href="http://www.teragrid.org/"><img src="/specfem3dglobe/pics/tg_logo.gif"></a>
+        <li><a href="http://www.geodynamics.org/"><img src="{{root}}/pics/cig-logo_small-initials.gif"></a>
+        <li><a href="http://www.caltech.edu/"><img src="{{root}}/pics/citlogo.gif"></a>
+        <li><a href="http://www.seismolab.caltech.edu/"><img src="{{root}}/pics/seismolab_logo.gif"></a>
+        <li><a href="http://www.nsf.gov/"><img src="{{root}}/pics/nsf_logo.jpg"></a>
+        <li><a href="http://www.teragrid.org/"><img src="{{root}}/pics/tg_logo.gif"></a>
     </ul>
 
 </div> <!-- splash -->

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_confirm_delete.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_confirm_delete.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,7 @@
 
 <h2>delete station list</h2>
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="StationList">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="delete">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -5,7 +5,7 @@
 <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
 {% endif %}
 
-<form method="post" action="/specfem3dglobe/">
+<form method="post" action="{{action}}">
     <input type="hidden" name="class" value="StationList">
     <input type="hidden" name="object" value="{{object.id}}">
     <input type="hidden" name="action" value="edit">

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_list.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_list.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -11,7 +11,7 @@
         <tbody>
         {% for object in object_list %}
         <tr class="{% cycle odd,even %}" id="o{{object.id}}">
-            <td><a href="/specfem3dglobe/?class=StationList&object={{object.id}}">{{ object.name }}</a></td>
+            <td><a href="{{root}}/?class=StationList&object={{object.id}}">{{ object.name }}</a></td>
             <td>{{ object.station_set.count }}</td>
         </tr>
         {% endfor %}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stationlist_upload.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,7 +1,9 @@
 
 <h2>upload station list</h2>
 
-<form action="/specfem3dglobe/?class=StationList&action=upload" method="POST" enctype="multipart/form-data">
+<form action="{{action}}" method="POST" enctype="multipart/form-data">
+    <input type="hidden" name="class" value="StationList">
+    <input type="hidden" name="action" value="upload">
 
     {% if form.has_errors %}
     <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
@@ -26,7 +28,7 @@
 </form>
 
 <dl class="help collapsible collapsedOnLoad">
-<dt class="collapsibleHeader"><img src="/specfem3dglobe/images/help-large.gif"> Help</dt>
+<dt class="collapsibleHeader"><img src="{{root}}/images/help-large.gif"> Help</dt>
 <dd class="collapsibleContent">
 
 <h3><code>STATIONS</code> file format</h3>
@@ -37,7 +39,7 @@
 <code>STATIONS</code> file, which looks like this:</p>
 
 <div class=illustration id=stations>
-    <img src="/specfem3dglobe/pics/stations.gif" width=576 height=322>
+    <img src="{{root}}/pics/stations.gif" width=576 height=322>
     <p class=caption>Sample <code>STATIONS</code> file.</p>
 </div>
 
@@ -61,7 +63,7 @@
 <code>STATIONS</code> file.  Instead, station elevation is computed
 based upon topography data.</p>
 
-<p><a href="/specfem3dglobe/samples/STATIONS.txt">Click here</a> to
+<p><a href="{{root}}/samples/STATIONS.txt">Click here</a> to
 download a sample <code>STATIONS</code> file.</p>
 
 </dd>

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/style.css (from rev 11962, cs/portal/trunk/northridge/SeismoWebPortal/static/style.css)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/style.css	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/style.css	2008-05-17 02:43:29 UTC (rev 11980)
@@ -0,0 +1,428 @@
+
+body {
+    font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+    color: black;
+    background-color: white;
+}
+
+img {
+    border-width: 0;
+}
+
+h1 {
+    font-size: medium;
+}
+
+h1 img {
+    vertical-align: middle;
+}
+
+
+#header {
+    width: 100%;
+    margin-bottom: 1em;
+}
+
+#login {
+    font-size: small;
+}
+
+#login img {
+    vertical-align: bottom;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  buttons
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#buttonbar {
+    border-style: solid;
+    border-width: 1px;
+    border-color: #8cacbb;
+    background-color: #dee7ec;
+    font-size: small;
+    width: 100%;
+}
+
+td.separator {
+    border-left: 1px dotted #8cacbb;
+}
+
+#buttonbar a {
+    text-decoration: none;
+    color: black;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  buttons/menus
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#menubar {
+    border-bottom: 1px solid #8cacbb;
+    font-size: small;
+}
+
+#viewbar {
+    border-bottom: 1px solid #8cacbb;
+    font-size: small;
+}
+
+.actionMenu {
+    position: relative;
+    margin: 0;
+    padding: 0;
+}
+
+.actionMenu img {
+    vertical-align: middle;
+}
+
+.actionMenu a {
+    text-decoration: none;
+    color: black;
+}
+
+.actionMenu .actionMenuHeader {
+    border: 1px solid black;
+}
+
+.actionMenu .actionMenuHeader a {
+    padding-left: 1ex;
+    padding-right: 1ex;
+}
+
+.actionMenu.deactivated .actionMenuHeader a:hover {
+    background-color: #cde2a7;
+}
+
+.actionMenu .actionMenuContent {
+    display: none;
+    position: absolute;
+    background-color: white;
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+
+.actionMenu .actionMenuContent ul {
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+
+.actionMenu .actionMenuContent li {
+    list-style: none;
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+
+.actionMenu.activated .actionMenuHeader {
+    color: white;
+    background-color: black;
+}
+
+.actionMenu.activated .actionMenuHeader a {
+    color: white;
+}
+
+.actionMenu.activated .actionMenuContent {
+    display: block;
+    border: 1px solid black;
+}
+
+.actionMenu .actionMenuContent li {
+    white-space: nowrap;
+}
+
+.actionMenu .actionMenuContent li a {
+    display: block;
+    padding-left: 1ex;
+    padding-right: 1ex;
+}
+
+.actionMenu .actionMenuContent li a:hover {
+    color: white;
+    background-color: black;
+}
+
+.actionMenuItem {
+    display: block;
+    padding-left: 1ex;
+    padding-right: 1ex;
+}
+
+.actionButton {
+    border: 1px solid black;
+    padding-left: 1ex;
+    padding-right: 1ex;
+    text-decoration: none;
+    color: black;
+}
+
+a.actionButton:hover {
+    color: white;
+    background-color: black;
+}
+
+.disabled {
+    color: silver;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  radio
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+a.radio {
+    color: black;
+    text-decoration: none;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  tables
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+.content table {
+    border: 1px solid black;
+    width: 100%;
+}
+
+.content thead {
+    border-bottom: 1px solid black;
+}
+
+tr.even {
+    background-color: #eef;
+}
+
+tr:target {
+    background-color: #ff9;
+}
+
+.content th {
+    text-align: left;
+    padding-left: 1ex;
+    padding-right: 1ex;
+}
+
+.content th.colgroup {
+    text-align: center;
+}
+
+.content td {
+    padding-left: 1ex;
+    padding-right: 1ex;
+}
+
+.float {
+    text-align: right;
+}
+
+.int {
+    text-align: right;
+}
+
+.notApplicable {
+    color: gray;
+    text-align: center;
+}
+
+.inlineInfo {
+    font-size: small;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  forms
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+fieldset {
+    margin: 1em;
+    padding: 1em;
+    clear: both;
+}
+
+form fieldset legend {
+    font-size: x-large;
+}
+
+fieldset fieldset {
+    float: left;
+}
+
+fieldset fieldset legend {
+    font-size: large;
+}
+
+form div {
+    padding-top: .2em;
+    padding-bottom: .2em;
+    clear: both;
+}
+
+form p {
+    clear: both;
+}
+
+.error {
+    font-weight: bold;
+    color: red;
+}
+
+form span.error {
+    margin: 0em .2em 1em 1em;
+    padding: .2em .2em .2em .2em;
+}
+
+.computed {
+    font-weight: bold;
+    background-color: #fcc;
+    border: thin solid red;
+}
+
+label.before {
+    font-weight: bold;
+    float: left;
+    text-align: right;
+    margin-right: 1ex;
+}
+
+.tab30ex label.before {
+    width: 30ex;
+}
+
+.tab30ex fieldset label.before {
+    /* account for the fieldset margin & padding */
+    width: 26ex;
+}
+
+.tab30ex label.after {
+    /*float: left;*/
+}
+
+.tab30ex .checkbox { margin-left: 30ex; }
+.tab30ex .radio { margin-left: 30ex; }
+
+.tab30ex fieldset .checkbox {
+    /* account for the fieldset margin & padding */
+    margin-left: 26ex;
+}
+
+.tab30ex fieldset .radio {
+    /* account for the fieldset margin & padding */
+    margin-left: 26ex;
+}
+
+.tab30ex fieldset fieldset .checkbox { margin-left: 0; }
+.tab30ex fieldset fieldset .radio { margin-left: 0; }
+
+.radio ul {
+    list-style: none;
+}
+
+label.before:after {
+    content: ":";
+}
+
+.tab30ex input.vIntegerField {
+    float: left;
+}
+
+.tab30ex input.vFloatField {
+    float: left;
+}
+
+.tab30ex input.vCheckboxField {
+    float: left;
+}
+
+.tab30ex select.vSelectField {
+    float: left;
+    margin-bottom: 1em;
+}
+
+input.reset {
+    float: right;
+}
+
+input.submit {
+    margin-top: 2em;
+    margin-bottom: 2em;
+}
+
+.tab30ex input.submit {
+    margin-left: 30ex;
+}
+
+input {
+    font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
+    border: 1px solid #8cacbb;
+    background: White url({{root}}/images/input_background.gif) repeat-x;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  collapsible help
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+.help.collapsedInlineCollapsible {
+    display: inline;
+}
+
+.help.collapsedInlineCollapsible .collapsibleHeader {
+    display: inline;
+}
+
+.help.collapsedOnLoad .collapsibleContent,
+.help.collapsedInlineCollapsible .collapsibleContent,
+.help.collapsedBlockCollapsible .collapsibleContent {
+    display: none;
+}
+
+.collapsibleHeader {
+    cursor: pointer;
+    color: #00f;
+}
+
+.collapsibleHeader img {
+    vertical-align: middle;
+}
+
+.help.expandedInlineCollapsible {
+    display: block;
+}
+
+.help.expandedInlineCollapsible .collapsibleContent,
+.help.expandedBlockCollapsible .collapsibleContent {
+    display: block;
+    border-style: double;
+    border-color: black;
+    background-color: #ffc;
+    padding: 1em;
+    margin-left: 16px;
+}
+
+.help .collapsibleContent dt {
+    font-weight: bold;
+}
+
+.help div.illustration {
+    border: 1px solid black;
+    padding: 1em 1em 1em 1em;
+    background-color: white;
+}
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  misc.
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+pre {
+    border: 1px solid black;
+    padding: 1em;
+    background-color: #eee;
+}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/userinfo_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/userinfo_form.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/userinfo_form.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -7,11 +7,25 @@
 
 <div class=tabs>
     <ul>
-        <li class="selected first"><a href="/specfem3dglobe/registration/">registration</a>
-        <li><a href="/specfem3dglobe/registration/password/">password</a>
+        <li class="selected first"><a href="{{root}}/registration/">registration</a>
+        <li><a href="{{root}}/registration/password/">password</a>
     </ul>
 </div>
 
-{% include "SeismoWebPortal/registration_form.html" %}
+{% if form.has_errors %}
+<p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
+{% endif %}
 
+<form method="post" action="{{action}}">
+
+    <div class=tab30ex>
+
+    {% include "SeismoWebPortal/contact_info.html" %}
+
+    <div><input class=submit type="submit" value="Save"/></div>
+
+    </div> <!-- tab30ex -->
+
+</form>
+
 {% endblock %}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/login.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/login.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/login.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -3,7 +3,7 @@
 
 {% block body %}
 
-<p><a href="/specfem3dglobe/"><img id=logo src="/specfem3dglobe/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
+<p><a href="{{root}}/"><img id=logo src="{{root}}/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
 
 <h1 class=titlebar>login</h1>
 
@@ -22,7 +22,7 @@
 </dl>
 {% endif %}
 
-<form method="post" action="/specfem3dglobe/login/">
+<form method="post" action="{{action}}">
 
     <div class=tab30ex>
 
@@ -41,16 +41,16 @@
     {% if next %}
     <input type="hidden" name="next" value="{{ next }}" />
     {% else %}
-    <input type="hidden" name="next" value="/specfem3dglobe/" />
+    <input type="hidden" name="next" value="{{root}}/" />
     {% endif %}
 
     </div> <!-- tab30ex -->
 
 </form>
 
-<p>Are you a new user? If so, please <a href="/specfem3dglobe/registration/">register</a>.
+<p>Are you a new user? If so, please <a href="{{root}}/registration/">register</a>.
 
-<p>If you've forgotten your username and/or password, try <a href="/specfem3dglobe/pwreset/">resetting your password</a>.
+<p>If you've forgotten your username and/or password, try <a href="{{root}}/pwreset/">resetting your password</a>.
 
 <p>If you need help, <a href="mailto:portal at geodynamics.org">contact us</a>.
 

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -3,13 +3,13 @@
 
 {% block body %}
 
-<p><a href="/specfem3dglobe/"><img id=logo src="/specfem3dglobe/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
+<p><a href="{{root}}/"><img id=logo src="{{root}}/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
 
 <h1 class=titlebar>password reset</h1>
 
 <p>Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you.</p>
 
-<form action="/specfem3dglobe/pwreset/" method="post">
+<form action="{{action}}" method="post">
 
     {% if form.has_errors %}
     <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset_done.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset_done.html	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/registration/pwreset_done.html	2008-05-17 02:43:29 UTC (rev 11980)
@@ -3,12 +3,12 @@
 
 {% block body %}
 
-<p><a href="/specfem3dglobe/"><img id=logo src="/specfem3dglobe/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
+<p><a href="{{root}}/"><img id=logo src="{{root}}/pics/specfem3dg_logo.jpg" width=99 height=94>Home</a>
 
 <h1 class=titlebar>password reset</h1>
 
 <p><b>Success!</b> We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly.</p>
 
-<p><a href="/specfem3dglobe/login/">Login</a></p>
+<p><a href="{{root}}/login/">Login</a></p>
 
 {% endblock %}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/urls.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/urls.py	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/urls.py	2008-05-17 02:43:29 UTC (rev 11980)
@@ -10,14 +10,16 @@
 urlpatterns = patterns('',
     (r'^$', 'SeismoWebPortal.views.root'),
 
-    (r'^login/$', 'SeismoWebPortal.views.login_view'),
-    (r'^logout/$', 'SeismoWebPortal.views.logout_view'),
-    (r'^pwreset/$', 'SeismoWebPortal.views.password_reset'),
-    (r'^pwreset/done/$', 'django.views.generic.simple.direct_to_template', dict(template = 'registration/pwreset_done.html')),
+    (r'^(?P<pathname>login/)$', 'SeismoWebPortal.views.login_view'),
+    (r'^(?P<pathname>logout/)$', 'SeismoWebPortal.views.logout_view'),
+    (r'^(?P<pathname>pwreset/)$', 'SeismoWebPortal.views.password_reset'),
+    (r'^(?P<pathname>pwreset/done/)$', 'SeismoWebPortal.views.directToTemplate', dict(template = 'registration/pwreset_done.html')),
     
-    (r'^registration/$', 'SeismoWebPortal.views.registration'),
-    (r'^registration/password/$', 'SeismoWebPortal.views.password_change', dict(template_name = 'SeismoWebPortal/password_change_form.html')),
+    (r'^(?P<pathname>registration/)$', 'SeismoWebPortal.views.registration'),
+    (r'^(?P<pathname>registration/password/)$', 'SeismoWebPortal.views.password_change', dict(template_name = 'SeismoWebPortal/password_change_form.html')),
 
+    (r'^(?P<pathname>style.css)$', 'SeismoWebPortal.views.directToTemplate', dict(template = 'SeismoWebPortal/style.css', mimetype='text/css')),
+
     # input files downloaded by daemon
     (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/par_file\.txt$', 'SeismoWebPortal.views.par_file'),
     (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/parameters\.pml$', 'SeismoWebPortal.views.parameters_pml'),

Modified: cs/portal/trunk/northridge/SeismoWebPortal/views.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/views.py	2008-05-16 21:14:36 UTC (rev 11979)
+++ cs/portal/trunk/northridge/SeismoWebPortal/views.py	2008-05-17 02:43:29 UTC (rev 11980)
@@ -1,14 +1,12 @@
-# Create your views here.
 
 from django import forms
 from django.conf import settings
 from django.contrib.auth import login, logout
-from django.contrib.auth.decorators import user_passes_test
 from django.core import validators
 from django.http import HttpResponse, HttpResponseRedirect, Http404
 from django.shortcuts import render_to_response, get_object_or_404
+from django.template import loader, Context
 from django.template.context import RequestContext
-from django.views.generic import create_update
 
 import cmt
 import models
@@ -17,22 +15,20 @@
 import os, os.path
 
 
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# Meshes, Models, Simulations
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-
 OUTPUT_ROOT = os.path.join(settings.MEDIA_ROOT, 'SeismoWebPortal', 'output')
 
 
-# Create our own version of 'login_required' which redirects to our login page.
-login_required = user_passes_test(lambda u: not u.is_anonymous(), "/specfem3dglobe/login")
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# the main do-everything view
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+def root(request):
+    root = rootURL(request, "")
+    request.root = root
 
-def root(request):
-    from django.template import loader, Context
-    
     if request.user.is_anonymous():
+        if request.GET:
+            return login_redirect(request, root)
         return render_to_response('SeismoWebPortal/splash.html', {},
                                   RequestContext(request, {}))
 
@@ -119,63 +115,36 @@
         downloadableAsText = downloadableAsText,
         downloadableAsKML = downloadableAsKML,
         duplicatable = duplicatable,
+        root = root,
         ))
     response.write(t.render(c))
     return response
 
 
-def commentOnly():
-    # Brainstorm: fixed-target action buttons/menus
-    #     * create/new
-    #     * update/edit/(rename)
-    #     * duplicate
-    #     * delete
-    #     * upload
-    #     * search
-    #     * download {text/kml/pdf/ps}
-    #     * maps?
-    #   --- these depend upon implementation strategy ---
-    #     * save [live edit?]
-    #     * undo [trash?]
-    #     * help [probably css collapsable]
-    return
+def rootURL(request, pathname):
+    if pathname:
+        x = request.path.find("/" + pathname)
+        root = request.path[0:x]
+    else:
+        root = request.path[0:-1]
+    return root
 
 
-def par_file(request, sim_id):
-    from django.template import loader, Context
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# authentication
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    response = HttpResponse(mimetype='text/plain')
-    #response['Content-Disposition'] = 'attachment; filename=parameters.xml'
+def login_redirect(request, root):
+    from django.contrib.auth import REDIRECT_FIELD_NAME
+    from urllib import quote
+    return HttpResponseRedirect('%s/login/?%s=%s' % (root, REDIRECT_FIELD_NAME, quote(request.get_full_path())))
 
-    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
-
-    t = loader.get_template('SeismoWebPortal/par_file.txt')
-    c = Context({
-        'simulation': simulation,
-    })
-    response.write(t.render(c))
-    return response
-
-def parameters_pml(request, sim_id):
-    from django.template import loader, Context
-
-    response = HttpResponse(mimetype='text/xml')
-    #response['Content-Disposition'] = 'attachment; filename=parameters.xml'
-
-    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
-
-    t = loader.get_template('SeismoWebPortal/parameters.pml')
-    c = Context({
-        'simulation': simulation,
-    })
-    response.write(t.render(c))
-    return response
-
-def login_view(request, template_name='registration/login.html'):
+def login_view(request, pathname, template_name='registration/login.html'):
     "Displays the login form and handles the login action."
     from django.contrib.auth.forms import AuthenticationForm
-    from django.contrib.auth import LOGIN_URL, REDIRECT_FIELD_NAME
+    from django.contrib.auth import REDIRECT_FIELD_NAME
     from django.contrib.sites.models import Site
+    root = rootURL(request, pathname)
     manipulator = AuthenticationForm(request)
     redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, '')
     if request.POST:
@@ -196,14 +165,18 @@
         'form': forms.FormWrapper(manipulator, request.POST, errors),
         REDIRECT_FIELD_NAME: redirect_to,
         'site_name': Site.objects.get_current().name,
+        'action': request.path,
+        'root': root,
     }, context_instance=RequestContext(request))
 
-def logout_view(request):
+def logout_view(request, pathname):
     logout(request)
-    return HttpResponseRedirect('/specfem3dglobe/login/')
+    root = rootURL(request, pathname)
+    return HttpResponseRedirect('%s/login/' % root)
 
-def password_reset(request):
+def password_reset(request, pathname):
     from django.contrib.auth.forms import PasswordResetForm
+    root = rootURL(request, pathname)
     new_data, errors = {}, {}
     form = PasswordResetForm()
     if request.POST:
@@ -213,46 +186,37 @@
             form.save(email_template_name='registration/pwreset_email.txt',
                       domain_override="the SPECFEM 3D GLOBE Web Portal")
             return HttpResponseRedirect('%sdone/' % request.path)
-    return render_to_response('registration/pwreset.html', {'form': forms.FormWrapper(form, new_data, errors)},
-                              context_instance=RequestContext(request))
+    return render_to_response('registration/pwreset.html', dict(
+        form = forms.FormWrapper(form, new_data, errors),
+        action = request.path,
+        root = root,
+        ), context_instance=RequestContext(request))
 
-def events_txt(request, sim_id):
+def password_change(request, pathname, template_name='registration/password_change_form.html'):
+    from django.contrib.auth.forms import PasswordResetForm, PasswordChangeForm
+    root = rootURL(request, pathname)
+    if request.user.is_anonymous():
+        return login_redirect(request, root)
+    new_data, errors = {}, {}
+    form = PasswordChangeForm(request.user)
+    if request.POST:
+        new_data = request.POST.copy()
+        errors = form.get_validation_errors(new_data)
+        if not errors:
+            form.save(new_data)
+            request.user.message_set.create(message="Your password has been changed.")
+            return HttpResponseRedirect("%s/" % root)
+    return render_to_response(template_name, dict(
+        form = forms.FormWrapper(form, new_data, errors),
+        action = request.path,
+        root = root,
+        ), context_instance=RequestContext(request))
 
-    response = HttpResponse(mimetype='text/plain')
 
-    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# daemon interface
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    count = simulation.events.source_set.count()
-    for event in simulation.events.source_set.all():
-        cmtSolution = cmt.CMTSolution.createFromDBModel(event)
-
-        # NYI: Specfem requires this to be zero for one
-        # source, and positive for others.  Set it to zero for
-        # single-source events.  For multi-source kinematic
-        # ruptures, for now we assume the user uploaded a
-        # proper CMTSOLUTION file.
-        if count == 1:
-            cmtSolution.timeShift = 0.0
-
-        if simulation.zero_half_duration:
-            cmtSolution.halfDuration = 0.0
-        
-        response.write(str(cmtSolution))
-
-    return response
-
-
-def stations_txt(request, sim_id):
-    response = HttpResponse(mimetype='text/plain')
-
-    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
-    stations = simulation.stations.station_set.all()
-
-    write_stations(stations, response)
-
-    return response
-
-
 def update_run_status(request, object_id):
     from forms import RunStatusManipulator
     import datetime
@@ -296,7 +260,7 @@
     new_data = {'status': run.status}
     form = forms.FormWrapper(manipulator, new_data, errors)
     return render_to_response('SeismoWebPortal/run_status.html',
-                              {'form': form},
+                              {'form': form, 'action': request.path},
                               RequestContext(request, {}))
 
 
@@ -381,108 +345,81 @@
                               {'form': form, 'action': request.path},
                               RequestContext(request, {}))
 
-def registration(request):
-    from forms import RegistrationAddManipulator, RegistrationChangeManipulator
-    
-    isNewUser = request.user.is_anonymous()
-    if isNewUser:
-        manipulator = RegistrationAddManipulator(request)
-        template = 'SeismoWebPortal/register.html'
-    else:
-        manipulator = RegistrationChangeManipulator(request.user)
-        template = 'SeismoWebPortal/userinfo_form.html'
 
-    if request.method == 'POST':
-        new_data = request.POST.copy()
-        errors = manipulator.get_validation_errors(new_data)
-        if not errors:
-            manipulator.do_html2python(new_data)
-            user, errors = manipulator.save(new_data)
-            if not errors:
-                if isNewUser:
-                    request.session.delete_test_cookie()
-                    notify_managers_of_new_user(request, user)
-                    user.message_set.create(message="Welcome to the SPECFEM 3D GLOBE web portal!")
-                else:
-                    user.message_set.create(message="Your contact information has been saved.")
-                return HttpResponseRedirect('/specfem3dglobe/')
-    else:
-        # Populate new_data with a 'flattened' version of the current data.
-        new_data = manipulator.flatten_data()
-        errors = {}
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# daemon interface -- Specfem 3D Globe input file downloads
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    if isNewUser:
-        request.session.set_test_cookie()
-    
-    # Populate the FormWrapper.
-    form = forms.FormWrapper(manipulator, new_data, errors, edit_inline = True)
-    
-    return render_to_response(template, { 'form': form }, RequestContext(request, {}))
+def par_file(request, sim_id):
+    response = HttpResponse(mimetype='text/plain')
+    #response['Content-Disposition'] = 'attachment; filename=parameters.xml'
 
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
-def notify_managers_of_new_user(request, user):
-    from django.core.mail import mail_managers
+    t = loader.get_template('SeismoWebPortal/par_file.txt')
+    c = Context({
+        'simulation': simulation,
+    })
+    response.write(t.render(c))
+    return response
 
-    userInfo = user.userinfo
-    invite = userInfo.invite
-    
-    subject = 'new user %s (%s)' % (user.username, invite or "UNINVITED")
-    message = ["A new user has registered.",
-               ""]
-    if not invite:
-        message.extend([
-            """NOTE: Before this new user can run simulations, you must approve them by selecting the "approved" checkbox on the following page:""",
-            "",
-            "https://crust.geodynamics.org/admin/SeismoWebPortal/userinfo/%d/" % userInfo._get_pk_val(),
-            "",
-            ])
-    message.extend([
-        "username:" + user.username,
-        "first name: " + user.first_name,
-        "last name: " + user.last_name,
-        "e-mail: " + user.email,
-        "institution: " + userInfo.institution,
-        "address1: " + userInfo.address1,
-        "address2: " + userInfo.address2,
-        "address3: " + userInfo.address3,
-        "phone: " + userInfo.phone,
-        "invitation: " + str(invite),
-        "",
-        ])
-    message = "\n".join(message)
-    
-    mail_managers(subject, message, fail_silently=True)
-    
-    return
 
+def parameters_pml(request, sim_id):
+    response = HttpResponse(mimetype='text/xml')
+    #response['Content-Disposition'] = 'attachment; filename=parameters.xml'
 
-def password_change(request, template_name='registration/password_change_form.html'):
-    from django.contrib.auth.forms import PasswordResetForm, PasswordChangeForm
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
-    new_data, errors = {}, {}
-    form = PasswordChangeForm(request.user)
-    if request.POST:
-        new_data = request.POST.copy()
-        errors = form.get_validation_errors(new_data)
-        if not errors:
-            form.save(new_data)
-            request.user.message_set.create(message="Your password has been changed.")
-            return HttpResponseRedirect('/specfem3dglobe/')
-    return render_to_response(template_name, {'form': forms.FormWrapper(form, new_data, errors)},
-        context_instance=RequestContext(request))
+    t = loader.get_template('SeismoWebPortal/parameters.pml')
+    c = Context({
+        'simulation': simulation,
+    })
+    response.write(t.render(c))
+    return response
 
-password_change = login_required(password_change)
 
+def events_txt(request, sim_id):
 
+    response = HttpResponse(mimetype='text/plain')
 
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
+    count = simulation.events.source_set.count()
+    for event in simulation.events.source_set.all():
+        cmtSolution = cmt.CMTSolution.createFromDBModel(event)
+
+        # NYI: Specfem requires this to be zero for one
+        # source, and positive for others.  Set it to zero for
+        # single-source events.  For multi-source kinematic
+        # ruptures, for now we assume the user uploaded a
+        # proper CMTSOLUTION file.
+        if count == 1:
+            cmtSolution.timeShift = 0.0
+
+        if simulation.zero_half_duration:
+            cmtSolution.halfDuration = 0.0
+        
+        response.write(str(cmtSolution))
+
+    return response
+
+
+def stations_txt(request, sim_id):
+    response = HttpResponse(mimetype='text/plain')
+
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
+    stations = simulation.stations.station_set.all()
+
+    write_stations(stations, response)
+
+    return response
+
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# Mineos
+# daemon interface -- Mineos input file downloads
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 def mineos_parameters_pml(request, sim_id):
-    from django.template import loader, Context
-
     response = HttpResponse(mimetype='text/xml')
 
     simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
@@ -578,4 +515,102 @@
     return response
 
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# registration
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+def registration(request, pathname):
+    from forms import RegistrationAddManipulator, RegistrationChangeManipulator
+
+    root = rootURL(request, pathname)
+    
+    isNewUser = request.user.is_anonymous()
+    if isNewUser:
+        manipulator = RegistrationAddManipulator(request, root)
+        template = 'SeismoWebPortal/register.html'
+    else:
+        manipulator = RegistrationChangeManipulator(request.user)
+        template = 'SeismoWebPortal/userinfo_form.html'
+
+    if request.method == 'POST':
+        new_data = request.POST.copy()
+        errors = manipulator.get_validation_errors(new_data)
+        if not errors:
+            manipulator.do_html2python(new_data)
+            user, errors = manipulator.save(new_data)
+            if not errors:
+                if isNewUser:
+                    request.session.delete_test_cookie()
+                    notify_managers_of_new_user(request, user)
+                    user.message_set.create(message="Welcome to the SPECFEM 3D GLOBE web portal!")
+                else:
+                    user.message_set.create(message="Your contact information has been saved.")
+                return HttpResponseRedirect("%s/" % root)
+    else:
+        # Populate new_data with a 'flattened' version of the current data.
+        new_data = manipulator.flatten_data()
+        errors = {}
+
+    if isNewUser:
+        request.session.set_test_cookie()
+    
+    # Populate the FormWrapper.
+    form = forms.FormWrapper(manipulator, new_data, errors, edit_inline = True)
+    
+    return render_to_response(template, dict(
+        form = form,
+        action = request.path,
+        root = root,
+        ), RequestContext(request, {}))
+
+
+def notify_managers_of_new_user(request, user):
+    from django.core.mail import mail_managers
+
+    userInfo = user.userinfo
+    invite = userInfo.invite
+    
+    subject = 'new user %s (%s)' % (user.username, invite or "UNINVITED")
+    message = ["A new user has registered.",
+               ""]
+    if not invite:
+        message.extend([
+            """NOTE: Before this new user can run simulations, you must approve them by selecting the "approved" checkbox on the following page:""",
+            "",
+            "https://crust.geodynamics.org/admin/SeismoWebPortal/userinfo/%d/" % userInfo._get_pk_val(),
+            "",
+            ])
+    message.extend([
+        "username:" + user.username,
+        "first name: " + user.first_name,
+        "last name: " + user.last_name,
+        "e-mail: " + user.email,
+        "institution: " + userInfo.institution,
+        "address1: " + userInfo.address1,
+        "address2: " + userInfo.address2,
+        "address3: " + userInfo.address3,
+        "phone: " + userInfo.phone,
+        "invitation: " + str(invite),
+        "",
+        ])
+    message = "\n".join(message)
+    
+    mail_managers(subject, message, fail_silently=True)
+    
+    return
+
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# misc.
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+def directToTemplate(request, pathname, template, mimetype='text/html'):
+    root = rootURL(request, pathname)
+    response = HttpResponse(mimetype=mimetype)
+    t = loader.get_template(template)
+    c = Context(dict(root = root))
+    response.write(t.render(c))
+    return response
+
+
 # end of file



More information about the cig-commits mailing list