source: trunk/grails-app/controllers/HomeController.groovy @ 1384

Last change on this file since 1384 was 1384, checked in by business@…, 10 years ago

added webtest plugin and first (working) webtest, renamed 'test' configuration to 'nmcdsptest' to avoid conflicts with grails default test environment

  • Property svn:keywords set to Author Date Rev
File size: 671 bytes
Line 
1import dbnp.studycapturing.Study
2import dbnp.studycapturing.Template
3import org.codehaus.groovy.grails.commons.GrailsApplication
4
5/**
6 * Home Controler
7 *
8 * My Description
9 *
10 * @author  Kees van Bochove
11 * @since   20091102
12 * @package studycapturing
13 *
14 * Revision information:
15 * $Rev: 1384 $
16 * $Author: business@keesvanbochove.nl $
17 * $Date: 2011-01-12 21:00:59 +0000 (wo, 12 jan 2011) $
18 */
19class HomeController {
20    def index = {
21            if (!Template.count() && grails.util.GrailsUtil.environment != GrailsApplication.ENV_TEST) {
22                    redirect(controller:'setup',action:'index')             
23            } else {
24                    [ studyCount: dbnp.studycapturing.Study.count(), userCount: dbnp.authentication.SecUser.count(), facebookLikeUrl: '/' ]
25            }
26    }
27   
28}
Note: See TracBrowser for help on using the repository browser.