Changeset 156 for trunk/grails-app/controllers
- Timestamp:
- Oct 20, 2009, 5:55:50 PM (15 years ago)
- Location:
- trunk/grails-app/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AssetDetailedController.groovy
r139 r156 2 2 3 3 class AssetDetailedController extends BaseController { 4 4 5 def filterService 6 5 7 def index = { redirect(action:search,params:params) } 6 8 … … 15 17 def search = { 16 18 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 17 [ assetInstanceList: Asset.list( params ), assetInstanceTotal: Asset.count() ] 19 20 // Quick Search: 21 if(!params.filter) { 22 return [ assetInstanceList: Asset.list( params ), assetInstanceTotal: Asset.count() ] 23 } 24 // filterPane: 25 return[ assetInstanceList: filterService.filter( params, Asset ), 26 assetInstanceTotal: filterService.count( params, Asset ), 27 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params), 28 params:params ] 18 29 } 19 30 -
trunk/grails-app/controllers/InventoryItemDetailedController.groovy
r139 r156 2 2 3 3 class InventoryItemDetailedController extends BaseController { 4 4 5 def filterService 6 5 7 def index = { redirect(action:search, params:params) } 6 8 … … 15 17 def search = { 16 18 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 17 [ inventoryItemInstanceList: InventoryItem.list( params ), inventoryItemInstanceTotal: InventoryItem.count() ] 19 20 // Quick Search: 21 if(!params.filter) { 22 return[ inventoryItemInstanceList: InventoryItem.list( params ), inventoryItemInstanceTotal: InventoryItem.count() ] 23 } 24 // filterPane: 25 return[ inventoryItemInstanceList: filterService.filter( params, InventoryItem ), 26 inventoryItemInstanceTotal: filterService.count( params, InventoryItem ), 27 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params), 28 params:params ] 18 29 } 19 30
Note: See TracChangeset
for help on using the changeset viewer.