[open-ils-commits] r591 - in servres/trunk/conifer: . templates/item (artunit)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jul 17 23:09:48 EDT 2009


Author: artunit
Date: 2009-07-17 23:09:46 -0400 (Fri, 17 Jul 2009)
New Revision: 591

Modified:
   servres/trunk/conifer/settings.py
   servres/trunk/conifer/templates/item/item_add_cat_search.xhtml
Log:
minor changes

Modified: servres/trunk/conifer/settings.py
===================================================================
--- servres/trunk/conifer/settings.py	2009-07-18 01:14:47 UTC (rev 590)
+++ servres/trunk/conifer/settings.py	2009-07-18 03:09:46 UTC (rev 591)
@@ -1,121 +1,121 @@
-# Django settings for conifer project.
-
-import os
-
-os.environ['PYTHON_EGG_CACHE'] = '/tmp/eggs'
-
-BASE_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
-HERE = lambda s: os.path.join(BASE_DIRECTORY, s)
-
-DEBUG = True
-TEMPLATE_DEBUG = DEBUG
-
-ADMINS = (
-    # ('Your Name', 'your_email at domain.com'),
-)
-
-MANAGERS = ADMINS
-
-DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-DATABASE_NAME = HERE('syrup.sqlite') # Or path to database file if using sqlite3.
-DATABASE_USER = ''             # Not used with sqlite3.
-DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
-
-# Local time zone for this installation. Choices can be found here:
-# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
-# although not all choices may be available on all operating systems.
-# If running in a Windows environment this must be set to the same as your
-# system time zone.
-TIME_ZONE = 'America/Detroit'
-
-# Language code for this installation. All choices can be found here:
-# http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = 'en_US'
-
-# Please only include languages here for which we have a locale in our
-# locale/ directory.
-LANGUAGES = [("en-us", "English"),
-             ("fr-ca", "Canadian French"),
-             ]
-
-SITE_ID = 1
-
-# If you set this to False, Django will make some optimizations so as not
-# to load the internationalization machinery.
-USE_I18N = True
-
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = HERE('static')
-
-# URL that handles the media served from MEDIA_ROOT. Make sure to use a
-# trailing slash if there is a path component (optional in other cases).
-# Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = ''
-
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/syrup/djmedia/'
-
-# Make this unique, and don't share it with anybody.
-SECRET_KEY = 'j$dnxqbi3iih+(@il3m at vv(tuvt2+yu2r-$dxs$s7=iqjz_s!&'
-
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
-#     'django.template.loaders.eggs.load_template_source',
-)
-
-MIDDLEWARE_CLASSES = (
-    'django.middleware.common.CommonMiddleware',
-    'django.contrib.sessions.middleware.SessionMiddleware',
-    'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'conifer.middleware.genshi_locals.ThreadLocals',
-    'django.middleware.locale.LocaleMiddleware',
-    'babeldjango.middleware.LocaleMiddleware',
-    # TransactionMiddleware should be last...
-    'django.middleware.transaction.TransactionMiddleware',
-)
-
-ROOT_URLCONF = 'conifer.urls'
-
-TEMPLATE_DIRS = []
-
-INSTALLED_APPS = (
-    'django.contrib.auth',
-    'django.contrib.contenttypes',
-    'django.contrib.sessions',
-    'django.contrib.sites',
-    'django.contrib.admin',
-    'conifer.syrup',
-)
-
-AUTH_PROFILE_MODULE = 'syrup.UserProfile'
-
-
-AUTHENTICATION_BACKENDS = (
-    'django.contrib.auth.backends.ModelBackend',
-    # uncomment for EG authentication:
-    #'conifer.custom.auth_evergreen.EvergreenAuthBackend',
-)
-
-
-EVERGREEN_GATEWAY_SERVER = 'www.concat.ca'
-Z3950_CONFIG = ('zed.concat.ca:210', 'OWA')  #OWA,OSUL,CONIFER
-SIP_HOST = ('dwarf.cs.uoguelph.ca', 8080)
-
-try:
-    from private_local_settings import SIP_CREDENTIALS
-except:
-    # stuff that I really ought not check into svn...
-    #SIP_CREDENTIALS = ('userid', 'password', 'location')
-    pass
-
-
-#CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
-#CACHE_BACKEND = 'db://test_cache_table'
-#CACHE_BACKEND = 'locmem:///'
+# Django settings for conifer project.
+
+import os
+
+os.environ['PYTHON_EGG_CACHE'] = '/tmp/eggs'
+
+BASE_DIRECTORY = os.path.abspath(os.path.dirname(__file__))
+HERE = lambda s: os.path.join(BASE_DIRECTORY, s)
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+    # ('Your Name', 'your_email at domain.com'),
+)
+
+MANAGERS = ADMINS
+
+DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+DATABASE_NAME = HERE('syrup.sqlite') # Or path to database file if using sqlite3.
+DATABASE_USER = ''             # Not used with sqlite3.
+DATABASE_PASSWORD = ''         # Not used with sqlite3.
+DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
+DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'America/Detroit'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = 'en_US'
+
+# Please only include languages here for which we have a locale in our
+# locale/ directory.
+LANGUAGES = [("en-us", "English"),
+             ("fr-ca", "Canadian French"),
+             ]
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = HERE('static')
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash if there is a path component (optional in other cases).
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
+MEDIA_URL = ''
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/syrup/djmedia/'
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = 'j$dnxqbi3iih+(@il3m at vv(tuvt2+yu2r-$dxs$s7=iqjz_s!&'
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+    'django.template.loaders.filesystem.load_template_source',
+    'django.template.loaders.app_directories.load_template_source',
+#     'django.template.loaders.eggs.load_template_source',
+)
+
+MIDDLEWARE_CLASSES = (
+    'django.middleware.common.CommonMiddleware',
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'conifer.middleware.genshi_locals.ThreadLocals',
+    'django.middleware.locale.LocaleMiddleware',
+    'babeldjango.middleware.LocaleMiddleware',
+    # TransactionMiddleware should be last...
+    'django.middleware.transaction.TransactionMiddleware',
+)
+
+ROOT_URLCONF = 'conifer.urls'
+
+TEMPLATE_DIRS = []
+
+INSTALLED_APPS = (
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.sites',
+    'django.contrib.admin',
+    'conifer.syrup',
+)
+
+AUTH_PROFILE_MODULE = 'syrup.UserProfile'
+
+
+AUTHENTICATION_BACKENDS = (
+    'django.contrib.auth.backends.ModelBackend',
+    # uncomment for EG authentication:
+    #'conifer.custom.auth_evergreen.EvergreenAuthBackend',
+)
+
+
+EVERGREEN_GATEWAY_SERVER = 'www.concat.ca'
+Z3950_CONFIG = ('zed.concat.ca:210', 'OWA')  #OWA,OSUL,CONIFER
+SIP_HOST = ('comet.cs.uoguelph.ca', 8080)
+
+try:
+    from private_local_settings import SIP_CREDENTIALS
+except:
+    # stuff that I really ought not check into svn...
+    #SIP_CREDENTIALS = ('userid', 'password', 'location')
+    pass
+
+
+#CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
+#CACHE_BACKEND = 'db://test_cache_table'
+#CACHE_BACKEND = 'locmem:///'

Modified: servres/trunk/conifer/templates/item/item_add_cat_search.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_add_cat_search.xhtml	2009-07-18 01:14:47 UTC (rev 590)
+++ servres/trunk/conifer/templates/item/item_add_cat_search.xhtml	2009-07-18 03:09:46 UTC (rev 591)
@@ -1,84 +1,88 @@
-<?python
-from django.utils.simplejson import dumps
-from conifer.libsystems.z3950.marcxml import marcxml_dictionary_to_dc as to_dublin
-title = _('Add physical or electronic item, by catalogue search')
-dc_keys = ['dc:title', 'dc:creator', 'dc:publisher', 'dc:date']
-?>
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:xi="http://www.w3.org/2001/XInclude"
-      xmlns:py="http://genshi.edgewall.org/">
-<xi:include href="../master.xhtml"/>
-<xi:include href="../paginate.xhtml"/>
-<xi:include href="../components/course.xhtml"/>
-<head>
-  <title>${title}</title>
-  <script type="text/javascript">
-    <!-- !This ought to be in paginate.xhtml, not here. how to do? -->
-    $(function() { $('.pagetable').tablesorter(); });
-  </script>
-  <script py:if="not 'query' in request.GET">		       <!-- !focus on query box if nothing to scroll. -->
-    $(function() { $('#query').focus(); });
-  </script>
-</head>
-<body>
-    ${course_banner(course)}
-    ${nested_title(parent_item)}
-    <h2>${title}</h2>
-    <form method="GET" action=".">
-      <input type="text" id="query" name="query" value="${query}" 
-	     style="font-size: larger; width: 600px;"/>
-      <input type="submit" value="Search"/>
-	${go_back_link()}
-
-    </form>
-    <div py:def="page_control" py:if="results">
-      <p>
-	${start}&ndash;${min(numhits, start+limit-1)} of ${numhits} results.
-	<span py:if="start-limit&gt;0">
-	  <a href=".?query=${query}&amp;start=${start-limit}&amp;limit=${limit}">Previous ${limit}</a>
-	  &bull;
-	</span>
-	<span py:if="start+limit&lt;numhits">
-	  <a href=".?query=${query}&amp;start=${start+limit}&amp;limit=${limit}">Next ${limit}</a>
-	</span>
-      </p>
-    </div>
-    ${page_control()}
-    <table class="pagetable" py:if="'query' in request.GET">
-      <thead>
-	<tr><th>#</th><th>Title</th><th>Author</th><th>Publisher</th><th>PubDate</th></tr>
-      </thead>
-      <tbody py:for="resultnum, res in enumerate(results)"
-	     py:with="dc=to_dublin(res)">
-	<tr>
-	  <td>${resultnum+start}.</td>
-	  <td>
-	    ${dc.get('dc:title', '???')}
-	    <a href="javascript:$('#full_${resultnum}').toggle(); void(0);">details</a>
-	    <p py:if="res.get('8569')" style="margin: 8px 0; font-size: 90%; color: darkred;">
-	      Electronic resource. <a href="${res.get('856u')}">view</a>
-	    </p>
-	  </td>
-	  <td py:for="k in dc_keys[1:]">${dc.get(k) or '&mdash;'}</td>
-	  <td>
-	    <form action="." method="POST">
-	      <input type="hidden" name="pickitem" value="${dumps(res)}"/>
-	      <input type="submit" value="Pick this item"/>
-	    </form>
-	  </td>
-	</tr>
-	<tr id="full_${resultnum}" style="display: none;">
-	  <td colspan="4" style="padding-left: 36;">
-	    <table class="metadata_table">
-	      <?python allkeys = res.keys(); allkeys.sort(); ?>
-	      <tr py:for="k in allkeys">
-		<th>${k}</th><td>${res[k]}</td>
-	      </tr>
-	    </table>
-	  </td>
-	</tr>
-      </tbody>
-    </table>
-    ${page_control()}
- </body>
-</html>
+<?python
+from django.utils.simplejson import dumps
+from conifer.libsystems.z3950.marcxml import marcxml_dictionary_to_dc as to_dublin
+title = _('Add physical or electronic item, by catalogue search')
+dc_keys = ['dc:title', 'dc:creator', 'dc:publisher', 'dc:date']
+?>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:xi="http://www.w3.org/2001/XInclude"
+      xmlns:py="http://genshi.edgewall.org/">
+<xi:include href="../master.xhtml"/>
+<xi:include href="../paginate.xhtml"/>
+<xi:include href="../components/course.xhtml"/>
+<head>
+  <title>${title}</title>
+  <script type="text/javascript">
+    <!-- !This ought to be in paginate.xhtml, not here. how to do? -->
+    $(function() { $('.pagetable').tablesorter(); });
+  </script>
+  <script py:if="not 'query' in request.GET">		       <!-- !focus on query box if nothing to scroll. -->
+    $(function() { $('#query').focus(); });
+  </script>
+</head>
+<body>
+    ${course_banner(course)}
+    ${nested_title(parent_item)}
+    <!-- ugly hack so art can go away next week -->
+    <i>Sorry, catalogue searching is not enabled yet</i>
+    <h2>${title}</h2>
+    <!--
+    <form method="GET" action=".">
+      <input type="text" id="query" name="query" value="${query}" 
+	     style="font-size: larger; width: 600px;"/>
+      <input type="submit" value="Search"/>
+	${go_back_link()}
+
+    </form>
+    -->
+    <div py:def="page_control" py:if="results">
+      <p>
+	${start}&ndash;${min(numhits, start+limit-1)} of ${numhits} results.
+	<span py:if="start-limit&gt;0">
+	  <a href=".?query=${query}&amp;start=${start-limit}&amp;limit=${limit}">Previous ${limit}</a>
+	  &bull;
+	</span>
+	<span py:if="start+limit&lt;numhits">
+	  <a href=".?query=${query}&amp;start=${start+limit}&amp;limit=${limit}">Next ${limit}</a>
+	</span>
+      </p>
+    </div>
+    ${page_control()}
+    <table class="pagetable" py:if="'query' in request.GET">
+      <thead>
+	<tr><th>#</th><th>Title</th><th>Author</th><th>Publisher</th><th>PubDate</th></tr>
+      </thead>
+      <tbody py:for="resultnum, res in enumerate(results)"
+	     py:with="dc=to_dublin(res)">
+	<tr>
+	  <td>${resultnum+start}.</td>
+	  <td>
+	    ${dc.get('dc:title', '???')}
+	    <a href="javascript:$('#full_${resultnum}').toggle(); void(0);">details</a>
+	    <p py:if="res.get('8569')" style="margin: 8px 0; font-size: 90%; color: darkred;">
+	      Electronic resource. <a href="${res.get('856u')}">view</a>
+	    </p>
+	  </td>
+	  <td py:for="k in dc_keys[1:]">${dc.get(k) or '&mdash;'}</td>
+	  <td>
+	    <form action="." method="POST">
+	      <input type="hidden" name="pickitem" value="${dumps(res)}"/>
+	      <input type="submit" value="Pick this item"/>
+	    </form>
+	  </td>
+	</tr>
+	<tr id="full_${resultnum}" style="display: none;">
+	  <td colspan="4" style="padding-left: 36;">
+	    <table class="metadata_table">
+	      <?python allkeys = res.keys(); allkeys.sort(); ?>
+	      <tr py:for="k in allkeys">
+		<th>${k}</th><td>${res[k]}</td>
+	      </tr>
+	    </table>
+	  </td>
+	</tr>
+      </tbody>
+    </table>
+    ${page_control()}
+ </body>
+</html>



More information about the open-ils-commits mailing list