Ignore:
Timestamp:
Sep 28, 2009, 10:01:43 AM (15 years ago)
Author:
gav
Message:

Install Navigation plugin, work on navigation and hopefully fixed a few more IE vs Firefox CSS issues.
New skin for class-diagram plugin.
Adjust security config to suite.
Replace home.gsp with start.gsp, remove options.gsp and acknowledgements.gsp as they are now on start.gsp tabs.
Create search pages for Tasks, Assets and Inventory.
Change suggested login to manager.
Change all date formats to format="EEE, dd-MMM-yyyy".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/AssetDetailedController.groovy

    r124 r139  
    33class AssetDetailedController extends BaseController {
    44   
    5     def index = { redirect(action:list,params:params) }
     5    def index = { redirect(action:search,params:params) }
    66
    77    // the delete, save and update actions only accept POST requests
     
    1313    }
    1414
     15    def search = {
     16        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
     17        [ assetInstanceList: Asset.list( params ), assetInstanceTotal: Asset.count() ]
     18    }
     19
    1520    def show = {
     21       
     22        // In the case of an actionSubmit button, rewrite action name from 'index'.
     23        if(params._action_Show)
     24        { params.action='show' }
     25       
    1626        def assetInstance = Asset.get( params.id )
    1727
    1828        if(!assetInstance) {
    1929            flash.message = "Asset not found with id ${params.id}"
    20             redirect(action:list)
     30            redirect(action:search)
    2131        }
    2232        else { return [ assetInstance : assetInstance ] }
     
    2939                assetInstance.delete()
    3040                flash.message = "Asset ${params.id} deleted"
    31                 redirect(action:list)
     41                redirect(action:search)
    3242            }
    3343            catch(org.springframework.dao.DataIntegrityViolationException e) {
     
    3848        else {
    3949            flash.message = "Asset not found with id ${params.id}"
    40             redirect(action:list)
     50            redirect(action:search)
    4151        }
    4252    }
    4353
    4454    def edit = {
     55       
     56        // In the case of an actionSubmit button, rewrite action name from 'index'.
     57        if(params._action_Edit)
     58        { params.action='edit' }
     59       
    4560        def assetInstance = Asset.get( params.id )
    4661
    4762        if(!assetInstance) {
    4863            flash.message = "Asset not found with id ${params.id}"
    49             redirect(action:list)
     64            redirect(action:search)
    5065        }
    5166        else {
Note: See TracChangeset for help on using the changeset viewer.