[open-ils-commits] r8413 - in
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb:
controllers/acq public/oils/media/css/theme/default
templates/oils/default/acq/picklist
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 17 17:29:13 EST 2008
Author: erickson
Date: 2008-01-17 17:03:30 -0500 (Thu, 17 Jan 2008)
New Revision: 8413
Modified:
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css
branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html
Log:
added some intial paging
Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py 2008-01-17 21:37:34 UTC (rev 8412)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/__init__.py 2008-01-17 22:03:30 UTC (rev 8413)
@@ -13,17 +13,17 @@
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.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.offset = ContextItem(cgi_name='acq.os', default_value=0)
+ self.limit = ContextItem(cgi_name='acq.li', default_value=10)
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)
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 21:37:34 UTC (rev 8412)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css 2008-01-17 22:03:30 UTC (rev 8413)
@@ -11,6 +11,7 @@
#oils-acq-search-subsources-label { font-weight: bold; }
#oils-acq-search-fields-submit-block { border: 2px solid #A1A1A1; }
+#oils-acq-picklist-table thead tr { border: 1px solid #A1A1A1; }
#oils-acq-picklist-header {border: 1px solid #85C777;}
#oils-acq-picklist-name { font-weight: bold; font-style: italic; }
.oils-acq-picklist-attributes { font-size: 90%; margin-left: 15px;}
Modified: 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 2008-01-17 21:37:34 UTC (rev 8412)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view.html 2008-01-17 22:03:30 UTC (rev 8413)
@@ -16,6 +16,27 @@
</div>
<table id='oils-acq-picklist-table'>
+ <thead>
+ <tr>
+ <td colspan='4'>
+ <%
+ c.oils.acq.offset = int(c.oils.acq.offset)
+ c.oils.acq.limit = int(c.oils.acq.limit)
+ # set up the paging info
+ paging = _('Entries %(offset)s - %(limit)s') % {
+ 'offset': c.oils.acq.offset + 1,
+ 'limit': c.oils.acq.limit + c.oils.acq.offset
+ }
+ %>
+ ${paging}
+ % if c.oils.acq.offset > 0:
+ <a href='?${c.oils.acq.offset_.cgi_name}=${c.oils.acq.offset - c.oils.acq.limit}'>«</a>
+ % endif
+ <a href='?${c.oils.acq.offset_.cgi_name}=${c.oils.acq.offset + c.oils.acq.limit}'>»</a>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
% for entry in c.oils.acq.picklist.entries():
<tr class='oils-acq-picklist-records-title-row'>
<td rowspan='3'>
@@ -44,5 +65,6 @@
</td>
</tr>
% endfor
+ </tbody>
</table>
</%def>
More information about the open-ils-commits
mailing list