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

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Feb 19 11:48:17 EST 2008


Author: djfiander
Date: 2008-02-19 11:18:00 -0500 (Tue, 19 Feb 2008)
New Revision: 8776

Added:
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html
Modified:
   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/public/oils/media/css/skin/default/acq.css
   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/financial/list_fund_sources.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html
Log:
Add ability to view all picklists, not just mine.

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/controllers/acq/picklist.py	2008-02-19 16:18:00 UTC (rev 8776)
@@ -52,6 +52,11 @@
         r.ctx.acq.picklist_list.value = pl_manager.retrieve_list()
         return r.render('acq/picklist/view_list.html')
          
+    def listall(self):
+        r = RequestMgr()
+        pl_manager = oilsweb.lib.acq.picklist.PicklistMgr(r)
+        r.ctx.acq.picklist_list.value = pl_manager.retrieve_list(all=True)
+        return r.render('acq/picklist/view_listall.html')
 
     def search(self):
         r = RequestMgr()

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/acq/picklist.py	2008-02-19 16:18:00 UTC (rev 8776)
@@ -70,11 +70,16 @@
 
         self.picklist.entries(entries)
 
-    def retrieve_list(self):
+    def retrieve_list(self, all=False):
         ''' Returns my list of picklist objects '''
-        list = self.ses.request(
-            'open-ils.acq.picklist.user.retrieve', 
-            self.request_mgr.ctx.core.authtoken.value, {'flesh_entry_count':1}).recv().content()
+        if (all):
+            request = 'open-ils.acq.picklist.user.all.retrieve.atomic'
+        else:
+            request = 'open-ils.acq.picklist.user.retrieve'
+
+        list = self.ses.request(request,
+                                self.request_mgr.ctx.core.authtoken.value,
+                                {'flesh_entry_count':1, 'flesh_username':1}).recv().content()
         oils.event.Event.parse_and_raise(list)
 
         usermgr = oilsweb.lib.user.User(self.request_mgr.ctx.core)

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-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/skin/default/acq.css	2008-02-19 16:18:00 UTC (rev 8776)
@@ -43,7 +43,7 @@
 
 #oils-acq-list-header { margin: 10px; width: 98%;}
 #oils-acq-list-header-label { float: left; }
-#oils-acq-list-header-create { float: right; }
+#oils-acq-list-header-actions { float: right; }
 
 /* picklist entry page */
 #oils-acq-picklist-entry-header { padding: 4px; margin-bottom: 20px; }

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-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/public/oils/media/css/theme/default/acq.css	2008-02-19 16:18:00 UTC (rev 8776)
@@ -30,7 +30,7 @@
 
 #oils-acq-list-header {border-bottom: 1px solid #6BA160;}
 #oils-acq-list-header-label { font-weight: bold; font-size: 110%; }
-#oils-acq-list-header-create { font-weight: bold; }
+#oils-acq-list-header-actions { font-weight: bold; }
 
 
 /* entry display */

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_fund_sources.html	2008-02-19 16:18:00 UTC (rev 8776)
@@ -6,7 +6,7 @@
 
 <div id='oils-acq-list-header' class='container'>
     <div id='oils-acq-list-header-label'>${_('Funding Sources')}</div>
-    <div id='oils-acq-list-header-create'>
+    <div id='oils-acq-list-header-actions'>
         <a href='${c.oils.acq.prefix.value}/fund_source/create'>${_('New Funding Source')}</a>
     </div>
 </div>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_funds.html	2008-02-19 16:18:00 UTC (rev 8776)
@@ -6,7 +6,7 @@
 
 <div id='oils-acq-list-header' class='container'>
     <div id='oils-acq-list-header-label'>${_('Funds')}</div>
-    <div id='oils-acq-list-header-create'>
+    <div id='oils-acq-list-header-actions'>
         <a href='${c.oils.acq.prefix.value}/fund/create'>${_('New Fund')}</a>
     </div>
 </div>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/list_providers.html	2008-02-19 16:18:00 UTC (rev 8776)
@@ -6,7 +6,7 @@
 
 <div id='oils-acq-list-header' class='container'>
     <div id='oils-acq-list-header-label'>${_('Providers')}</div>
-    <div id='oils-acq-list-header-create'>
+    <div id='oils-acq-list-header-actions'>
         <a href='${c.oils.acq.prefix.value}/provider/create'>${_('New Provider')}</a>
     </div>
 </div>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund.html	2008-02-19 16:18:00 UTC (rev 8776)
@@ -8,7 +8,7 @@
 
 <div id='oils-acq-list-header' class='container'>
     <div id='oils-acq-list-header-label'>${fund.name()}</div>
-    <div id='oils-acq-list-header-create'>
+    <div id='oils-acq-list-header-actions'>
         <a href='${c.oils.acq.prefix.value}/fund/allocate?${c.oils.acq.fund_id.cgi_name}=${fund.id()}'>${_('Allocate Money')}</a>
     </div>
 </div>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/financial/view_fund_source.html	2008-02-19 16:18:00 UTC (rev 8776)
@@ -8,7 +8,7 @@
 
 <div id='oils-acq-list-header' class='container'>
     <div id='oils-acq-list-header-label'>${source.name()}</div>
-    <div id='oils-acq-list-header-create'>
+    <div id='oils-acq-list-header-actions'>
         <a href='${c.oils.acq.prefix.value}/fund_source/create_credit?${c.oils.acq.fund_source_id.cgi_name}=${source.id()}'>${_('Add Credit')}</a>
     </div>
 </div>

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html	2008-02-19 16:12:55 UTC (rev 8775)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_list.html	2008-02-19 16:18:00 UTC (rev 8776)
@@ -5,7 +5,8 @@
 
 <div id='oils-acq-list-header' class='container'>
     <div id='oils-acq-list-header-label'>${_('My Picklists')}</div>
-    <div id='oils-acq-list-header-create'>
+    <div id='oils-acq-list-header-actions'>
+        <a href="${c.oils.acq.prefix.value}/picklist/listall">${_('View All Picklists')}</a>
         <a href='${c.oils.acq.prefix.value}/picklist/create'>${_('New Picklist')}</a>
     </div>
 </div>

Added: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html	                        (rev 0)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/templates/oils/default/acq/picklist/view_listall.html	2008-02-19 16:18:00 UTC (rev 8776)
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+<%inherit file='../base.html'/>
+<%def name="page_title()">${_('Evergreen All Picklists')}</%def>
+<%def name="block_content()">
+
+<div id='oils-acq-list-header' class='container'>
+    <div id='oils-acq-list-header-label'>${_('All Picklists')}</div>
+    <div id='oils-acq-list-header-actions'>
+        <a href="${c.oils.acq.prefix.value}/picklist/list">${_('View My Picklists')}</a>
+        <a href='${c.oils.acq.prefix.value}/picklist/create'>${_('New Picklist')}</a>
+    </div>
+</div>
+
+<table id='oils-acq-picklist-list-table'>
+    <thead>
+        <tr>
+            <td>${_('Name')}</td>
+	    <td>${_('Owner')}</td>
+            <td>${_('Creation Date')}</td>
+            <td>${_('Edit Date')}</td>
+            <td>${_('Number of Entries')}</td>
+            <td/>
+            <td/>
+        </tr>
+    </thead>
+    <tbody>
+    % for picklist in c.oils.acq.picklist_list.value:
+    <tr>
+        <td><a href='${c.oils.acq.prefix.value}/picklist/view/${picklist.id()}'>${picklist.name()}</a></td>
+	<td>${picklist.owner()}</td>
+        <td>${picklist.create_time()}</td>
+        <td>${picklist.edit_time()}</td>
+        <td>${picklist.entry_count()}</td>
+        <td><a href='${c.oils.acq.prefix.value}/picklist/delete/${picklist.id()}'>${_('Delete')}</a></td>
+    </tr>
+    % endfor
+    </tbody>
+</table>
+</%def>



More information about the open-ils-commits mailing list