[open-ils-commits] SPAM: r8277 - in branches/acq-experiment/Open-ILS/web/oilsweb: . oilsweb/config oilsweb/controllers oilsweb/lib oilsweb/public/oils/media/css/skin oilsweb/public/oils/media/css/theme oilsweb/templates/oils/default oilsweb/templates/oils/default/acq

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Dec 26 11:57:19 EST 2007


Author: erickson
Date: 2007-12-26 11:34:43 -0500 (Wed, 26 Dec 2007)
New Revision: 8277

Modified:
   branches/acq-experiment/Open-ILS/web/oilsweb/development.ini
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html
Log:


added a config variable for local template path
removed some unused config variables
sorting search field labels before display
added some basic style to prevent eye bleeding
changed sources from a multiselect to a set of checkboxes for easier styling




Modified: branches/acq-experiment/Open-ILS/web/oilsweb/development.ini
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/development.ini	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/development.ini	2007-12-26 16:34:43 UTC (rev 8277)
@@ -23,16 +23,21 @@
 beaker.session.key = oilsweb
 beaker.session.secret = somesecret
 
+# ----------------------------------------------------------
 osrf_config = /openils/conf/opensrf_core.xml
 osrf_config_ctxt = config.opensrf
 oils_prefix = /oils
+# media_prefix can be a path or full URL
 oils_media_prefix = /oils/media
+# added_content_prefix can be a path or full URL
 oils_added_content_prefix = http://dev.gapines.org/opac/extras/ac
-oils_username = admin
-oils_password = open-ils
+# URL relative to the app root where XSL files are found
 oils_xsl_prefix = oilsweb/public/oils/media/xsl
 oils_xsl_acq_bib = acq-bibdata-marc.xslt
 oils_xsl_marc2html = oilsMARC21slim2HTML.xsl
+# path to extra templates or overridden templates
+local_templates = /openils/var/web/oilsweb/oilsweb/local_templates
+# ----------------------------------------------------------
 
 
 # If you'd like to fine-tune the individual locations of the cache data dirs

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/config/environment.py	2007-12-26 16:34:43 UTC (rev 8277)
@@ -16,7 +16,7 @@
     paths = dict(root=root,
                  controllers=os.path.join(root, 'controllers'),
                  static_files=os.path.join(root, 'public'),
-                 templates=[os.path.join(root, 'templates')])
+                 templates=[app_conf.get('local_templates', ''), os.path.join(root, 'templates')])
 
     # Initialize config with the basic options
     config.init_app(global_conf, app_conf, package='oilsweb',

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py	2007-12-26 16:34:43 UTC (rev 8277)
@@ -40,6 +40,9 @@
             for key, val in data['attrs'].iteritems():
                 sc[key] = val.get('label') or key
         c.oils_search_classes = sc
+        keys = sc.keys()
+        keys.sort()
+        c.oils_search_classes_sorted = keys
             
         return render('oils/%s/acq/search.html' % c.oils.core.skin)
         
@@ -104,7 +107,6 @@
         for cache_id in ctx.acq.picklist_item:
             rec = self._find_cached_record(results, cache_id)
             records.append(rec)
-            log.debug('pi = ' + unicode(cache_id))
 
         c.oils_acq_records = records
         ctx.scrub_isbn = oilsweb.lib.bib.scrub_isbn  # XXX add more generically to the context object

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/__init__.py	2007-12-26 16:34:43 UTC (rev 8277)
@@ -23,13 +23,28 @@
 
         self.fetchUser()
 
+    _auth_cache = {}
     def fetchUser(self):
         ''' Grab the logged in user and their workstation '''
         if self.authtoken:
+
+            if self.authtoken in CoreContext._auth_cache:
+                self.user = CoreContext._auth_cache[self.authtoken]['user']
+                self.workstation = CoreContext._auth_cache[self.authtoken]['workstation']
+                return
+
             self.user = osrf.ses.AtomicRequest(
                 'open-ils.auth', 
                 'open-ils.auth.session.retrieve', self.authtoken)
             self.workstation = oils.utils.csedit.CSEditor().retrieve_actor_workstation(self.user.wsid())
+
+            # cache the auth data and destroy any old auth data
+            CoreContext._auth_cache = {
+                self.authtoken : {
+                    'user' : self.user, 
+                    'workstation' : self.workstation
+                }
+            }
         
 Context.applySubContext('core', CoreContext)
 

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/acq_default.css	2007-12-26 16:34:43 UTC (rev 8277)
@@ -1,14 +1,22 @@
 
 #oils-acq-index-block { font-weight:bold; }
 #oils-acq-search-container { width:100%; }
-#oils-acq-search-sources-block { width:29%; vertical-align: top; float: left; }
-#oils-acq-search-form-block { width:70%; vertical-align: top; float:right; }
+#oils-acq-search-sources-block { width:32%; vertical-align: top; float: left; margin-right: 10px;}
+#oils-acq-search-form-block { width:63%; vertical-align: top; float:right; }
 #oils-acq-search-sources-selector { padding: 2px; }
 #oils-acq-search-sources-selector option { margin-bottom: 2px; }
 .oils-acq-search-form-row { width: 100%; }
 .oils-acq-search-form-label {}
 .oils-acq-search-form-input {}
 
+#oils-acq-search-sources-list { padding: 1px; }
+#oils-acq-search-sources-list li { list-style-type: none; padding-left: 0px; }
+.oils-acq-search-sources-sublist { padding: 1px; list-style-type: none;}
+.oils-acq-search-sources-sublist li { margin-left: 10px; }
+.oils-acq-search-subsources-label { margin-top: 5px; }
+#oils-acq-search-sources-label { margin-bottom: 10px; }
+#oils-acq-search-fields-label { margin-bottom: 10px; }
+
 #oils-acq-pl_builder-table td {}
 .oils-acq-record_list-records-jacket { width: 42px; height: 54px; padding-left: 10px; }
 .oils-acq-record_list-records-title-row {}
@@ -16,3 +24,5 @@
 .oils-acq-record_list-records-phys_desc-row td { padding-left: 30px; }
 .oils-acq-record_list-records-phys_desc-row {}
 #oils-acq-rdetail-marc-block { margin-top: 10px; padding: 10px; }
+
+#oils-acq-search-fields-submit-block { margin: 5px; text-align: center;}

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default.css	2007-12-26 16:34:43 UTC (rev 8277)
@@ -14,8 +14,10 @@
 #oils-base-navigate-block { width: 15%; vertical-align: top; float:left;}
 #oils-base-content-block { width: 84%; vertical-align: top; float:right; padding-top: 8px;}
 #oils-base-sidebar-block { width: 15%; vertical-align: top; float:left;}
+#oils-base-navigate-table { width: 100%; }
+#oils-base-navigate-table td { width: 100%; }
 
-#oils-base-header-block { width: 84%; text-align: right; margin-top: 0px; float:right;}
+#oils-base-header-block { width: 100%; text-align: right; margin-top: 0px;}
 #oils-base-footer-block { width: 100%; text-align: center; vertical-align: bottom;}
 
 

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/acq_default.css	2007-12-26 16:34:43 UTC (rev 8277)
@@ -5,10 +5,13 @@
 #oils-acq-search-form-div { width:80%; float:right; }
 #oils-acq-search-z39-sources-table thead td { font-weight: bold; }
 #oils-acq-search-z39-sources-table tbody td { width: 33%; }
-#oils-acq-search-sources-label { font-weight: bold; }
+#oils-acq-search-sources-label { font-weight: bold; border-bottom: 1px solid #6BA160;}
+#oils-acq-search-fields-label { font-weight: bold; border-bottom: 1px solid #6BA160;}
+#oils-acq-search-subsources-label { font-weight: bold; }
 #oils-acq-pl_builder-table thead td { font-weight: bold; }
 #oils-acq-pl_builder-table td { border-bottom: 1px solid #808080;}
 #oils-acq-rdetail-marc-block { border-top: 1px solid #808080; }
 .oils-acq-record_list-picklist-td { background: #D0D0D0; } 
 .oils-acq-record_list-records-service-td { font-size: 85%; }
 #oils-acq-pl_builder-picklist-submit { text-align: right; }
+#oils-acq-search-fields-submit-block { border: 2px solid #A1A1A1; }

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default.css	2007-12-26 16:34:43 UTC (rev 8277)
@@ -1,15 +1,17 @@
 /* import the default css for the install applications */
 @import "acq_default.css";
 
-body { font-size: 85%; }
+body { font-size: 80%; }
 
 /* base default style */
 #oils-base-body-block {}
-#oils-base-navigate-block {border: 1px solid #808080;}
+#oils-base-navigate-block {border: 2px solid #85C777; background: #6BA160;}
+#oils-base-navigate-block a { color: #000000; }
+#oils-base-navigate-table td:hover { background: #85C777; }
 #oils-base-content-block {}
 #oils-base-sidebar-block {}
-#oils-base-footer-block {padding: 3px; margin-top: 20px; border: 1px solid #808080;}
-#oils-base-header-block {border-bottom: 1px solid #909090; }
+#oils-base-footer-block {padding: 3px; margin-top: 20px; border-top: 1px solid #5E5E5E;}
+#oils-base-header-block {border-bottom: 1px solid #5E5E5E; }
 
 
 

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html	2007-12-26 16:34:43 UTC (rev 8277)
@@ -7,20 +7,33 @@
         <div id='oils-acq-search-block' class='container'>
             <div id='oils-acq-search-sources-block'>
                 <div id='oils-acq-search-sources-label'>${_('Search Sources')}</div>
-                <select name='${c.oils.acq.search_source_.cgi_name}' multiple='multiple' id='oils-acq-search-sources-selector'>
-                    <option value='native-evergreen-catalog'>${_('Evergreen Catalog')}</option>
-                    <optgroup label='${_("Z39.50 Sources")}'>
-                        % for src,cfg in c.oils_z39_sources.iteritems():
-                        <option value='${src}'>${src} ${cfg["host"]}:${cfg["db"]}</option>
-                        % endfor
-                    </optgroup>
-                </select>
+                <ul id='oils-acq-search-sources-list'>
+                    <li><input type='checkbox' name='${c.oils.acq.search_source_.cgi_name}' 
+                        value='native-evergreen-catalog'>${_('Evergreen Catalog')}</input></li>
+                    <li>
+                        <div class='oils-acq-search-subsources-label'>${_("Z39.50 Sources")}</div>
+                        <ul class='oils-acq-search-sources-sublist'>
+                            % for src,cfg in c.oils_z39_sources.iteritems():
+                            <li>
+                                <input type='checkbox' name='${c.oils.acq.search_source_.cgi_name}' 
+                                    value='${src}'>
+                                    ${src} ${cfg["host"]}:${cfg["db"]}
+                                    % if cfg['auth'] == 't':
+                                        <span class='oils-acq-search-source-auth'>*</span>
+                                    % endif
+                                    </input>
+                            </li>
+                            % endfor
+                        </ul>
+                    </li>
+                </ul>
             </div>
             <div id='oils-acq-search-form-block'>
-                <table>
-                % for cls, lbl in c.oils_search_classes.iteritems():
+                <div id='oils-acq-search-fields-label'>${_('Search Fields')}</div>
+                <table id='oils-acq-search-fields-table'>
+                % for cls in c.oils_search_classes_sorted:
                 <tr class='oils-acq-search-form-row'>
-                    <td class='oils-acq-search-form-label'>${lbl}</td>
+                    <td class='oils-acq-search-form-label'>${c.oils_search_classes[cls]}</td>
                     <td class='oils-acq-search-form-input'>
                         <input name='${cls}' size='24'/>
                         <input type='hidden' name='${c.oils.acq.search_class_.cgi_name}' value='${cls}'/>
@@ -28,7 +41,9 @@
                 </tr>
                 % endfor
                 </table>
-                <input type='submit' value='${_("Submit")}'/>
+                <div id='oils-acq-search-fields-submit-block'>
+                    <input type='submit' value='${_("Submit")}'/>
+                </div>
             </div>
         </div>
     </form>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/base.html	2007-12-26 16:34:43 UTC (rev 8277)
@@ -2,13 +2,13 @@
 
 <%def name='block_body_content()'>
     <div id='oils-base-body-block'> 
+        <div id='oils-base-header-block'>
+            ${self.block_header()}
+        </div>
         <div id='oils-base-main-block' class='container'>
             <div id='oils-base-navigate-block'>
                 ${self.block_navigate()}
             </div>
-            <div id='oils-base-header-block'>
-                ${self.block_header()}
-            </div>
             <div id='oils-base-content-block'>
                 ${self.block_content()}
             </div>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html	2007-12-25 20:42:15 UTC (rev 8276)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/navigate.html	2007-12-26 16:34:43 UTC (rev 8277)
@@ -1,7 +1,7 @@
 <table id='oils-base-navigate-table'>
     <tbody>
         <tr><td><a href='index?${c.oils.make_query_string()}'>${_('Home')}</a></td></tr>
-        <tr><td><a href='search?${c.oils.make_query_string()}'>${_('Search')}</a></td></tr>
+        <tr><td><a href='search?${c.oils.make_query_string()}'>${_('Bib Search')}</a></td></tr>
     </tbody>
 </table>
 



More information about the open-ils-commits mailing list