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

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 17 15:23:30 EST 2008


Author: erickson
Date: 2008-01-17 14:57:48 -0500 (Thu, 17 Jan 2008)
New Revision: 8407

Added:
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/search.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
Removed:
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/rdetails.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html
Modified:
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/bib.py
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css
Log:

Starting with new picklist interfaces, using new middleware code
Took this chance to create an acq namespace in the controllers directory,
since there will be quite a few acq-related controllers in the long run
Created a picklist management class for fetching picklists, entries, etc.
Created picklist view interface




Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py	2008-01-17 19:57:48 UTC (rev 8407)
@@ -0,0 +1,34 @@
+from oilsweb.lib.context import Context, SubContext, ContextItem
+import oilsweb.lib.acq.search
+import oilsweb.lib.acq.picklist
+
+# ----------------------------------------------------------------
+# Define the CGI params for this application 
+# ----------------------------------------------------------------
+
+class AcqContext(SubContext):
+    def __init__(self):
+        self.query = ContextItem(cgi_name='acq.q')
+        self.search_class = ContextItem(cgi_name='acq.sc', multi=True)
+        self.search_source = ContextItem(cgi_name='acq.ss', multi=True)
+        self.picked_records = ContextItem(cgi_name='acq.sr', multi=True)
+        self.search_cache_key = ContextItem(cgi_name='acq.sk')
+        self.record_id = ContextItem(cgi_name='acq.ri')
+        self.record = ContextItem(cgi_name='acq.r')
+        self.picklist_item = ContextItem(cgi_name='acq.pi', multi=True)
+        self.prefix = ContextItem()
+        self.z39_sources = ContextItem()
+        self.search_classes = ContextItem()
+        self.search_classes_sorted = ContextItem()
+        self.picklist_id = ContextItem(cgi_name='acq.pl')
+        self.picklist = ContextItem()
+        self.offset = ContextItem(cgi_name='acq.os')
+        self.limit = ContextItem(cgi_name='acq.li')
+
+        self.extract_bib_field = ContextItem(default_value=oilsweb.lib.acq.search.extract_bib_field)
+        self.find_entry_attr = ContextItem(default_value=oilsweb.lib.acq.picklist.PicklistMgr.find_entry_attr)
+
+    def postinit(self):
+        self.prefix = "%s/acq" % Context.getContext().core.prefix
+
+Context.applySubContext('acq', AcqContext)

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/base.py	2008-01-17 19:57:48 UTC (rev 8407)
@@ -0,0 +1,6 @@
+from oilsweb.lib.base import *
+from oilsweb.lib.request import RequestMgr
+
+class BaseController(BaseController):
+    def index(self):
+        return RequestMgr().render('acq/index.html')

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py	2008-01-17 19:57:48 UTC (rev 8407)
@@ -0,0 +1,110 @@
+from oilsweb.lib.base import *
+from oilsweb.lib.request import RequestMgr
+import logging, pylons
+import oilsweb.lib.context, oilsweb.lib.util
+import oilsweb.lib.bib, oilsweb.lib.acq.search, oilsweb.lib.acq.picklist
+import osrf.cache, osrf.json, osrf.ses
+import oils.const, oils.utils.utils, oils.event
+
+
+class PicklistController(BaseController):
+
+    def view(self, **kwargs):
+        r = RequestMgr()
+        pl_manager = oilsweb.lib.acq.picklist.PicklistMgr(r, picklist_id=kwargs['id'])
+        pl_manager.retrieve()
+        pl_manager.retrieve_entries()
+        r.ctx.acq.picklist = pl_manager.picklist
+        return r.render('acq/picklist/view.html')
+
+
+    '''
+    def search(self):
+        r = RequestMgr()
+        r.ctx.acq.z39_sources = oilsweb.lib.acq.search.fetch_z39_sources(r.ctx)
+
+        sc = {}
+        for data in r.ctx.acq.z39_sources.values():
+            for key, val in data['attrs'].iteritems():
+                sc[key] = val.get('label') or key
+        r.ctx.acq.search_classes = sc
+        keys = sc.keys()
+        keys.sort()
+        r.ctx.acq.search_classes_sorted = keys
+        log.debug("keys = %s" % unicode(r.ctx.acq.z39_sources))
+            
+        return r.render('acq/picklist/search.html')
+
+    def pl_builder(self):
+        r = RequestMgr()
+        # add logic to see where we are fetching bib data from
+        # XXX fix
+        if r.ctx.acq.search_source:
+            c.oils_acq_records, r.ctx.acq.search_cache_key = self._build_z39_search(r.ctx)
+
+        return r.render('acq/picklist/pl_builder.html')
+
+
+    def _build_z39_search(self, ctx):
+
+        search = {
+            'service' : [],
+            'username' : [],
+            'password' : [],
+            'search' : {}
+        }
+
+        # collect the sources and credentials
+        for src in ctx.acq.search_source:
+            search['service'].append(src)
+            search['username'].append("") # XXX config values? in-db?
+            search['password'].append("") # XXX config values? in-db?
+
+        # collect the search classes
+        for cls in ctx.acq.search_class:
+            if request.params[cls]:
+                search['search'][cls] = request.params[cls]
+
+        return oilsweb.lib.acq.search.multi_search(ctx, search)
+
+    def rdetails(self):
+        r = RequestMgr()
+        rec_id = r.ctx.acq.record_id
+        cache_key = r.ctx.acq.search_cache_key
+
+        results = osrf.cache.CacheClient().get(cache_key)
+        rec = self._find_cached_record(results, rec_id)
+        if rec:
+            r.ctx.acq.record = rec
+            r.ctx.acq.record_html = oilsweb.lib.bib.marc_to_html(rec['marcxml'])
+            return r.render('acq/picklist/rdetails.html')
+        return 'exception -> no record'
+
+
+    def view_picklist(self):
+        r = RequestMgr()
+        ses = osrf.ses.ClientSession(oils.const.OILS_APP_ACQ)
+        picklist = osrf
+
+        
+    def create_picklist(self):  
+        r = RequestMgr()
+        if not isinstance(r.ctx.acq.picklist_item, list):
+            r.ctx.acq.picklist_item = [r.ctx.acq.picklist_item]
+
+        results = osrf.cache.CacheClient().get(r.ctx.acq.search_cache_key)
+
+        records = []
+        for cache_id in r.ctx.acq.picklist_item:
+            rec = self._find_cached_record(results, cache_id)
+            records.append(rec)
+
+        c.oils_acq_records = records # XXX
+        return r.render('acq/picklist/view.html')
+
+    def _find_cached_record(self, results, cache_id):
+        for res in results:
+            for rec in res['records']:
+                if str(rec['cache_id']) == str(cache_id):
+                    return rec
+'''

Deleted: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq.py	2008-01-17 19:57:48 UTC (rev 8407)
@@ -1,125 +0,0 @@
-from oilsweb.lib.base import *
-from oilsweb.lib.request import RequestMgr
-
-import logging, pylons
-import oilsweb.lib.context
-import oilsweb.lib.util
-import oilsweb.lib.acq.search
-import oilsweb.lib.bib
-import osrf.cache, osrf.json
-from oilsweb.lib.context import Context, SubContext, ContextItem
-
-log = logging.getLogger(__name__)
-
-class AcqContext(SubContext):
-    ''' Define the CGI params for this application '''
-    def __init__(self):
-        self.query = ContextItem(cgi_name='acq.q')
-        self.search_class = ContextItem(cgi_name='acq.sc', multi=True)
-        self.search_source = ContextItem(cgi_name='acq.ss', multi=True)
-        self.picked_records = ContextItem(cgi_name='acq.sr', multi=True)
-        self.search_cache_key = ContextItem(cgi_name='acq.sk')
-        self.record_id = ContextItem(cgi_name='acq.r')
-        self.record = ContextItem(cgi_name='acq.r')
-        self.picklist_item = ContextItem(cgi_name='acq.pi', multi=True)
-        self.extract_bib_field = ContextItem(default_value=oilsweb.lib.acq.search.extract_bib_field)
-        self.prefix = ContextItem()
-        self.z39_sources = ContextItem()
-        self.search_classes = ContextItem()
-        self.search_classes_sorted = ContextItem()
-
-    def postinit(self):
-        self.prefix = "%s/acq" % Context.getContext().core.prefix
-
-Context.applySubContext('acq', AcqContext)
-
-
-class AcqController(BaseController):
-
-    def index(self):
-        return RequestMgr().render('acq/index.html')
-
-    def search(self):
-        r = RequestMgr()
-        r.ctx.acq.z39_sources = oilsweb.lib.acq.search.fetch_z39_sources(r.ctx)
-
-        sc = {}
-        for data in r.ctx.acq.z39_sources.values():
-            for key, val in data['attrs'].iteritems():
-                sc[key] = val.get('label') or key
-        r.ctx.acq.search_classes = sc
-        keys = sc.keys()
-        keys.sort()
-        r.ctx.acq.search_classes_sorted = keys
-        log.debug("keys = %s" % unicode(r.ctx.acq.z39_sources))
-            
-        return r.render('acq/search.html')
-        
-
-    def pl_builder(self):
-        r = RequestMgr()
-        # add logic to see where we are fetching bib data from
-        # XXX fix
-        if r.ctx.acq.search_source:
-            c.oils_acq_records, r.ctx.acq.search_cache_key = self._build_z39_search(r.ctx)
-
-        return r.render('acq/pl_builder.html')
-
-
-    def _build_z39_search(self, ctx):
-
-        search = {
-            'service' : [],
-            'username' : [],
-            'password' : [],
-            'search' : {}
-        }
-
-        # collect the sources and credentials
-        for src in ctx.acq.search_source:
-            search['service'].append(src)
-            search['username'].append("") # XXX config values? in-db?
-            search['password'].append("") # XXX config values? in-db?
-
-        # collect the search classes
-        for cls in ctx.acq.search_class:
-            if request.params[cls]:
-                search['search'][cls] = request.params[cls]
-
-        return oilsweb.lib.acq.search.multi_search(ctx, search)
-
-    def rdetails(self):
-        r = RequestMgr()
-        rec_id = r.ctx.acq.record_id
-        cache_key = r.ctx.acq.search_cache_key
-
-        results = osrf.cache.CacheClient().get(cache_key)
-        rec = self._find_cached_record(results, rec_id)
-        if rec:
-            r.ctx.acq.record = rec
-            r.ctx.acq.record_html = oilsweb.lib.bib.marc_to_html(rec['marcxml'])
-            return r.render('acq/rdetails.html')
-        return 'exception -> no record'
-
-        
-    def create_picklist(self):  
-        r = RequestMgr()
-        if not isinstance(r.ctx.acq.picklist_item, list):
-            r.ctx.acq.picklist_item = [r.ctx.acq.picklist_item]
-
-        results = osrf.cache.CacheClient().get(r.ctx.acq.search_cache_key)
-
-        records = []
-        for cache_id in r.ctx.acq.picklist_item:
-            rec = self._find_cached_record(results, cache_id)
-            records.append(rec)
-
-        c.oils_acq_records = records # XXX
-        return r.render('acq/picklist.html')
-
-    def _find_cached_record(self, results, cache_id):
-        for res in results:
-            for rec in res['records']:
-                if str(rec['cache_id']) == str(cache_id):
-                    return rec
-

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py	2008-01-17 19:57:48 UTC (rev 8407)
@@ -0,0 +1,50 @@
+import osrf.cache, osrf.json, osrf.ses
+import oils.const, oils.utils.utils, oils.event
+
+class PicklistMgr(object):
+    def __init__(self, request_mgr, **kwargs):
+        self.request_mgr = request_mgr
+        self.id = kwargs.get('picklist_id')
+        self.picklist = kwargs.get('picklist')
+        self.ses = osrf.ses.ClientSession(oils.const.OILS_APP_ACQ)
+
+    def retrieve(self):
+
+        picklist = self.ses.request(
+            'open-ils.acq.picklist.retrieve', 
+            self.request_mgr.ctx.core.authtoken, self.id).recv().content()
+
+        oils.event.Event.parse_and_raise(picklist)
+        self.picklist = picklist
+
+    def retrieve_entries(self, **kwargs):
+        # grab the picklist entries
+        entries = self.ses.request(
+            'open-ils.acq.picklist_entry.picklist.retrieve',
+            self.request_mgr.ctx.core.authtoken, 
+            self.picklist.id(),
+            {
+                "offset" : kwargs.get('offset'),
+                "limit" : kwargs.get('limit'),
+                "flesh" : 1,
+                "clear_marc" : 1
+            }
+        ).recv().content()
+
+        self.picklist.entries(entries)
+
+    def retrieve_entry(self, entry_id):
+        entry = self.ses.request(
+            'open-ils.acq.picklist_entry.retrieve',
+            self.request_mgr.ctx.core.auththoken, entry_id).recv.content()
+        oils.event.Event.parse_and_raise(entry)
+        return entry
+
+    @staticmethod
+    def find_entry_attr(entry, attr_name, attr_type='picklist_marc_attr_definition'):
+        for entry_attr in entry.attributes():
+            if entry_attr.attr_type() == attr_type and entry_attr.attr_name() == attr_name:
+                return entry_attr.attr_value()
+        return ''
+
+            

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/bib.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/bib.py	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/bib.py	2008-01-17 19:57:48 UTC (rev 8407)
@@ -12,7 +12,7 @@
 
 def scrub_isbn(isbn):
     ''' removes trailing data from an ISBN '''
-    if not isbn: return isbn
+    if not isbn: return ''
     return re.sub('\s.*','', isbn)
 
     

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css	2008-01-17 19:57:48 UTC (rev 8407)
@@ -25,12 +25,12 @@
 
 /* bib search results / picklist builder interface */
 #oils-acq-pl_builder-table { width: 100%; }
-.oils-acq-record_list-records-jacket-td { width: 46px; }
-.oils-acq-record_list-records-jacket { width: 42px; height: 54px; padding-left: 0px; }
-.oils-acq-record_list-records-title-row {}
-.oils-acq-record_list-records-author-row td { padding-left: 30px; }
-.oils-acq-record_list-records-phys_desc-row td { padding-left: 30px; }
-.oils-acq-record_list-records-phys_desc-row {}
+.oils-acq-picklist-records-jacket-td { width: 46px; }
+.oils-acq-picklist-records-jacket { width: 42px; height: 54px; padding-left: 0px; }
+.oils-acq-picklist-records-title-row {}
+.oils-acq-picklist-records-author-row td { padding-left: 30px; }
+.oils-acq-picklist-records-phys_desc-row td { padding-left: 30px; }
+.oils-acq-picklist-records-phys_desc-row {}
 
 #oils-acq-rdetail-marc-block { margin-top: 0px; padding: 6px; }
 #oils-acq-rdetail-summary-block { margin-top: 0px; padding: 6px; }

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css	2008-01-17 19:57:48 UTC (rev 8407)
@@ -13,9 +13,9 @@
 
 #oils-acq-pl_builder-table thead td { font-weight: bold; }
 /* #oils-acq-pl_builder-table tr { border-bottom: 1px solid #808080;} */
-.oils-acq-record_list-records-phys_desc-row { border-bottom: 1px solid #6BA160; }
-.oils-acq-record_list-picklist-td { border-style: solid; border-color: #A1A1A1; border-width: 0px 1px 0px 1px; } 
-.oils-acq-record_list-records-service-td { font-size: 85%; }
+.oils-acq-picklist-records-phys_desc-row { border-bottom: 1px solid #6BA160; }
+.oils-acq-picklist-picklist-td { border-style: solid; border-color: #A1A1A1; border-width: 0px 1px 0px 1px; } 
+.oils-acq-picklist-records-service-td { font-size: 85%; }
 #oils-acq-pl_builder-picklist-submit { text-align: right; }
 
 

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/search.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/search.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/search.html	2008-01-17 19:57:48 UTC (rev 8407)
@@ -0,0 +1,50 @@
+<%inherit file='base.html'/>
+<%def name="page_title()">${_('Evergreen Acquisitions Search')}</%def>
+
+<%def name="block_content()">
+    <form method='GET' action='pl_builder'>
+        <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>
+                <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.acq.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'>
+                <div id='oils-acq-search-fields-label'>${_('Search Fields')}</div>
+                <table id='oils-acq-search-fields-table'>
+                % for cls in c.oils.acq.search_classes_sorted:
+                <tr class='oils-acq-search-form-row'>
+                    <td class='oils-acq-search-form-label'>${c.oils.acq.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}'/>
+                    </td>
+                </tr>
+                % endfor
+                </table>
+                <div id='oils-acq-search-fields-submit-block'>
+                    <input type='submit' value='${_("Submit")}'/>
+                </div>
+            </div>
+        </div>
+    </form>
+</%def>
+

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html	2008-01-17 19:57:48 UTC (rev 8407)
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+<%inherit file='../base.html'/>
+<%def name="page_title()">${_('Evergreen ACQ Picklist')}</%def>
+<%def name="block_content()">
+<table id='oils-acq-picklist-table'>
+    % for entry in c.oils.acq.picklist.entries():
+    <tr class='oils-acq-picklist-records-title-row'>
+        <td rowspan='3'>
+            <img class='oils-acq-picklist-records-jacket'
+                src='${c.oils.core.ac_prefix}/jacket/small/${c.oils.util.scrub_isbn(c.oils.acq.find_entry_attr(entry, "isbn"))}'/>
+        </td>
+        <td>
+            <a href='../view_entry/${entry.id()}'>${c.oils.acq.find_entry_attr(entry, "title")}</a>
+        </td>
+        <td class='oils-acq-picklist-records-service-td'>${entry.provider()}</td>
+    </tr>
+
+    </tr>
+    <tr class='oils-acq-picklist-records-author-row'>
+        <td colspan='4'>${c.oils.acq.find_entry_attr(entry, "author")}
+    </tr>
+    <tr class='oils-acq-picklist-records-phys_desc-row'>
+        <td colspan='4'>
+            ${c.oils.acq.find_entry_attr(entry, "isbn")} |
+            ${c.oils.acq.find_entry_attr(entry, "pubdate")} |
+            ${c.oils.acq.find_entry_attr(entry, "pagination")}
+        </td>
+    </tr>
+    % endfor
+</table>
+</%def>

Deleted: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist.html	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist.html	2008-01-17 19:57:48 UTC (rev 8407)
@@ -1,30 +0,0 @@
-<%inherit file='base.html'/>
-<%def name="page_title()">${_('Evergreen ACQ Picklist')}</%def>
-<%def name="block_content()">
-<table id='oils-acq-picklist-table'>
-    % for rec in c.oils_acq_records:
-    <tr class='oils-acq-record_list-records-title-row'>
-        <td rowspan='3'>
-            <img class='oils-acq-record_list-records-jacket'
-                src='${c.oils.core.ac_prefix}/jacket/small/${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec,"isbns.isbn"))}'/>
-        </td>
-        <td>
-            <a href='rdetails?${c.oils.make_query_string()}&${c.oils.acq.record_id_.cgi_name}=${rec["cache_id"]}&${c.oils.acq.search_cache_key_.cgi_name}=${c.oils.acq.search_cache_key}'>${c.oils.acq.extract_bib_field(rec, 'title')}</a>
-        </td>
-        <td class='oils-acq-record_list-records-service-td'>--source info--</td>
-    </tr>
-
-    </tr>
-    <tr class='oils-acq-record_list-records-author-row'>
-        <td colspan='4'>${c.oils.acq.extract_bib_field(rec, 'author')}</td>
-    </tr>
-    <tr class='oils-acq-record_list-records-phys_desc-row'>
-        <td colspan='4'>
-            ${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec, 'isbns.isbn'))} |
-            ${c.oils.acq.extract_bib_field(rec, 'pubdate')} |
-            ${c.oils.acq.extract_bib_field(rec, 'physicalSize')}
-        </td>
-    </tr>
-    % endfor
-</table>
-</%def>

Deleted: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/pl_builder.html	2008-01-17 19:57:48 UTC (rev 8407)
@@ -1,46 +0,0 @@
-<%inherit file='base.html'/>
-<%def name="page_title()">${_('Evergreen Acquisitions Results')}</%def>
-<%def name="block_content()">
-    <form action='create_picklist' method='GET'>
-    <input type='hidden' name='${c.oils.acq.search_cache_key_.cgi_name}' value='${c.oils.acq.search_cache_key}'/>
-    <table id='oils-acq-pl_builder-table'>
-        <tbody>
-        % for res in c.oils_acq_records:
-            % for rec in res['records']:
-                <tr class='oils-acq-record_list-records-title-row'>
-                    <td class='oils-acq-record_list-records-jacket-td' rowspan='3'>
-                        <img class='oils-acq-record_list-records-jacket'
-                            src='${c.oils.core.ac_prefix}/jacket/small/${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec,"isbns.isbn"))}'/>
-                    </td>
-                    <td>
-                        <a href='rdetails?${c.oils.make_query_string()}&${c.oils.acq.record_id_.cgi_name}=${rec["cache_id"]}&${c.oils.acq.search_cache_key_.cgi_name}=${c.oils.acq.search_cache_key}'>${c.oils.acq.extract_bib_field(rec, 'title')}</a>
-                    </td>
-                    <td rowspan='3' class='oils-acq-record_list-records-service-td'>${res['service']}</td>
-                    <td rowspan='3' class='oils-acq-record_list-picklist-td' >
-                        <input type='checkbox' 
-                            name='${c.oils.acq.picklist_item_.cgi_name}' 
-                            value='${rec["cache_id"]}'/>
-                </tr>
-
-                </tr>
-                <tr class='oils-acq-record_list-records-author-row'>
-                    <td colspan='4'>${c.oils.acq.extract_bib_field(rec, 'author')}</td>
-                </tr>
-                <tr class='oils-acq-record_list-records-phys_desc-row'>
-                    <td colspan='4'>
-                        ${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec, 'isbns.isbn'))} |
-                        ${c.oils.acq.extract_bib_field(rec, 'pubdate')} |
-                        ${c.oils.acq.extract_bib_field(rec, 'physicalSize')}
-                    </td>
-                </tr>
-            % endfor
-        % endfor
-            <tr>
-                <td colspan='4' id='oils-acq-pl_builder-picklist-submit'>
-                    <input type='submit' value='${_("Add to Picklist")}'/>
-                </td>
-            </tr>
-        </tbody>
-    </table>
-    </form>
-</%def>

Deleted: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/rdetails.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/rdetails.html	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/rdetails.html	2008-01-17 19:57:48 UTC (rev 8407)
@@ -1,22 +0,0 @@
-<%inherit file='base.html'/>
-<%def name="page_title()">${_('Evergreen ACQ Details')}</%def>
-<%def name="block_content()">
-    <div class='label'>Summary</div>
-    <div id='oils-acq-rdetail-summary-block'>
-        <table>
-            % for key,val in c.oils.acq.record['extracts'].iteritems():
-                <tr>
-                <td>${key}</td>
-                <td>${val}</td>
-                </tr>
-            % endfor
-        </table>
-    </div>
-    <div class='label'>MARC Record</div>
-    <div id='oils-acq-rdetail-marc-block'>
-        <div id='oils-acq-rdetail-marc'>
-            ${unicode(c.oils.acq.record_html, 'utf-8')} 
-        </div>
-    </div>
-</%def>
-

Deleted: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.html	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/record_list.html	2008-01-17 19:57:48 UTC (rev 8407)
@@ -1,31 +0,0 @@
-% for res in c.oils_acq_records:
-    % for rec in res['records']:
-        <tr class='oils-acq-record_list-records-title-row'>
-            <td class='oils-acq-record_list-records-jacket-td' rowspan='3'>
-                <img class='oils-acq-record_list-records-jacket'
-                    src='${c.oils.core.ac_prefix}/jacket/small/${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec,"isbns.isbn"))}'/>
-            </td>
-            <td>
-                <a href='rdetails?${c.oils.make_query_string()}&${c.oils.acq.record_id_.cgi_name}=${rec["cache_id"]}&${c.oils.acq.search_cache_key_.cgi_name}=${c.oils.acq.search_cache_key}'>${c.oils.acq.extract_bib_field(rec, 'title')}</a>
-            </td>
-            <td class='oils-acq-record_list-records-service-td'>${res['service']}</td>
-            <td rowspan='3' class='oils-acq-record_list-picklist-td' >
-                <input type='checkbox' 
-                    name='${c.oils.acq.picklist_item_.cgi_name}' 
-                    value='${rec["cache_id"]}'/>
-        </tr>
-
-        </tr>
-        <tr class='oils-acq-record_list-records-author-row'>
-            <td colspan='4'>${c.oils.acq.extract_bib_field(rec, 'author')}</td>
-        </tr>
-        <tr class='oils-acq-record_list-records-phys_desc-row'>
-            <td colspan='4'>
-                ${c.oils.util.scrub_isbn(c.oils.acq.extract_bib_field(rec, 'isbns.isbn'))} |
-                ${c.oils.acq.extract_bib_field(rec, 'pubdate')} |
-                ${c.oils.acq.extract_bib_field(rec, 'physicalSize')}
-            </td>
-        </tr>
-    % endfor
-% endfor
-

Deleted: 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	2008-01-17 19:46:30 UTC (rev 8406)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/search.html	2008-01-17 19:57:48 UTC (rev 8407)
@@ -1,50 +0,0 @@
-<%inherit file='base.html'/>
-<%def name="page_title()">${_('Evergreen Acquisitions Search')}</%def>
-
-<%def name="block_content()">
-    <form method='GET' action='pl_builder'>
-        <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>
-                <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.acq.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'>
-                <div id='oils-acq-search-fields-label'>${_('Search Fields')}</div>
-                <table id='oils-acq-search-fields-table'>
-                % for cls in c.oils.acq.search_classes_sorted:
-                <tr class='oils-acq-search-form-row'>
-                    <td class='oils-acq-search-form-label'>${c.oils.acq.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}'/>
-                    </td>
-                </tr>
-                % endfor
-                </table>
-                <div id='oils-acq-search-fields-submit-block'>
-                    <input type='submit' value='${_("Submit")}'/>
-                </div>
-            </div>
-        </div>
-    </form>
-</%def>
-



More information about the open-ils-commits mailing list