[55] | 1 | // locations to search for config files that get merged into the main config |
---|
| 2 | // config files can either be Java properties files or ConfigSlurper scripts |
---|
| 3 | |
---|
| 4 | // grails.config.locations = [ "classpath:${appName}-config.properties", |
---|
| 5 | // "classpath:${appName}-config.groovy", |
---|
| 6 | // "file:${userHome}/.grails/${appName}-config.properties", |
---|
| 7 | // "file:${userHome}/.grails/${appName}-config.groovy"] |
---|
| 8 | |
---|
| 9 | // if(System.properties["${appName}.config.location"]) { |
---|
| 10 | // grails.config.locations << "file:" + System.properties["${appName}.config.location"] |
---|
| 11 | // } |
---|
| 12 | grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format |
---|
| 13 | grails.mime.types = [ html: ['text/html','application/xhtml+xml'], |
---|
| 14 | xml: ['text/xml', 'application/xml'], |
---|
| 15 | text: 'text-plain', |
---|
| 16 | js: 'text/javascript', |
---|
| 17 | rss: 'application/rss+xml', |
---|
| 18 | atom: 'application/atom+xml', |
---|
| 19 | css: 'text/css', |
---|
| 20 | csv: 'text/csv', |
---|
[165] | 21 | pdf: 'application/pdf', |
---|
| 22 | rtf: 'application/rtf', |
---|
| 23 | excel: 'application/vnd.ms-excel', |
---|
| 24 | ods: 'application/vnd.oasis.opendocument.spreadsheet', |
---|
[55] | 25 | all: '*/*', |
---|
| 26 | json: ['application/json','text/json'], |
---|
| 27 | form: 'application/x-www-form-urlencoded', |
---|
| 28 | multipartForm: 'multipart/form-data' |
---|
| 29 | ] |
---|
| 30 | // The default codec used to encode data with ${} |
---|
| 31 | grails.views.default.codec="none" // none, html, base64 |
---|
| 32 | grails.views.gsp.encoding="UTF-8" |
---|
| 33 | grails.converters.encoding="UTF-8" |
---|
| 34 | |
---|
| 35 | // enabled native2ascii conversion of i18n properties files |
---|
| 36 | grails.enable.native2ascii = true |
---|
| 37 | |
---|
| 38 | // set per-environment serverURL stem for creating absolute links |
---|
| 39 | environments { |
---|
| 40 | production { |
---|
| 41 | grails.serverURL = "http://www.changeme.com" |
---|
| 42 | } |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | // log4j configuration |
---|
| 46 | log4j { |
---|
| 47 | appender.stdout = "org.apache.log4j.ConsoleAppender" |
---|
| 48 | appender.'stdout.layout'="org.apache.log4j.PatternLayout" |
---|
| 49 | appender.'stdout.layout.ConversionPattern'='[%r] %c{2} %m%n' |
---|
| 50 | appender.stacktraceLog = "org.apache.log4j.FileAppender" |
---|
| 51 | appender.'stacktraceLog.layout'="org.apache.log4j.PatternLayout" |
---|
| 52 | appender.'stacktraceLog.layout.ConversionPattern'='[%r] %c{2} %m%n' |
---|
| 53 | appender.'stacktraceLog.File'="stacktrace.log" |
---|
| 54 | rootLogger="error,stdout" |
---|
| 55 | logger { |
---|
| 56 | grails="error" |
---|
| 57 | StackTrace="error,stacktraceLog" |
---|
| 58 | org { |
---|
| 59 | codehaus.groovy.grails.web.servlet="error" // controllers |
---|
| 60 | codehaus.groovy.grails.web.pages="error" // GSP |
---|
| 61 | codehaus.groovy.grails.web.sitemesh="error" // layouts |
---|
| 62 | codehaus.groovy.grails."web.mapping.filter"="error" // URL mapping |
---|
| 63 | codehaus.groovy.grails."web.mapping"="error" // URL mapping |
---|
| 64 | codehaus.groovy.grails.commons="info" // core / classloading |
---|
| 65 | codehaus.groovy.grails.plugins="error" // plugins |
---|
| 66 | codehaus.groovy.grails.orm.hibernate="error" // hibernate integration |
---|
| 67 | springframework="off" |
---|
| 68 | hibernate="off" |
---|
| 69 | } |
---|
| 70 | } |
---|
| 71 | additivity.StackTrace=false |
---|
| 72 | } |
---|
| 73 | |
---|
[139] | 74 | //log4j.logger.org.springframework.security='off,stdout' |
---|
[55] | 75 | |
---|
[139] | 76 | /** Navigation plugin menu. |
---|
| 77 | * The top level titles are taken from i18n message bundles. |
---|
| 78 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 79 | */ |
---|
| 80 | navigation.nav = [ |
---|
| 81 | [order:10, controller:'appCore', title:'home', action:'start', |
---|
| 82 | subItems: [ |
---|
| 83 | [order:10, controller:'appCore', title:'Start', action:'start', isVisible: { true }], |
---|
[149] | 84 | [order:20, controller:'appCore', title:'Manager', action:'manager', isVisible: { authenticateService.ifAnyGranted('ROLE_Manager,ROLE_AppAdmin') }], |
---|
[139] | 85 | [order:30, controller:'appCore', title:'Admin', action:'appAdmin', isVisible: { authenticateService.ifAllGranted('ROLE_AppAdmin') }], |
---|
| 86 | [order:90, controller:'appCore', title:'Timeout', action:'changeSessionTimeout', isVisible: { params.action == 'changeSessionTimeout' }], |
---|
| 87 | [order:91, controller:'appCore', title:'Password', action:'changePassword', isVisible: { params.action == 'changePassword' }], |
---|
| 88 | ] |
---|
| 89 | ], |
---|
| 90 | [order:20, controller:'taskDetailed', title:'tasks', action:'search', |
---|
| 91 | subItems: [ |
---|
[155] | 92 | [order:10, controller:'taskDetailed', title:'Search', action:'search', isVisible: { params.action != 'searchCalendar'}], |
---|
| 93 | [order:11, controller:'taskDetailed', title:'Calendar', action:'searchCalendar', isVisible: { params.action == 'searchCalendar' }], |
---|
[139] | 94 | [order:20, controller:'taskDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 95 | [order:90, controller:'taskDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 96 | [order:91, controller:'taskDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 97 | ] |
---|
| 98 | ], |
---|
| 99 | [order:30, controller:'inventoryItemDetailed', title:'inventory', action:'search', |
---|
| 100 | subItems: [ |
---|
| 101 | [order:10, controller:'inventoryItemDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
| 102 | [order:20, controller:'inventoryItemDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 103 | [order:90, controller:'inventoryItemDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 104 | [order:91, controller:'inventoryItemDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 105 | ] |
---|
| 106 | ], |
---|
| 107 | [order:40, controller:'assetDetailed', title:'assets', action:'search', |
---|
| 108 | subItems: [ |
---|
| 109 | [order:10, controller:'assetDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
| 110 | [order:20, controller:'assetDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 111 | [order:90, controller:'assetDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 112 | [order:91, controller:'assetDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 113 | ] |
---|
| 114 | ] |
---|
| 115 | ] |
---|
[58] | 116 | |
---|
[147] | 117 | /** Navigation plugin alternate menu. |
---|
| 118 | * The alternate top level titles are not displayed anywhere. |
---|
| 119 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 120 | */ |
---|
| 121 | navigation.navAlt = [ |
---|
| 122 | [order:10, controller:'person', title:'person', action:'list', |
---|
| 123 | subItems: [ |
---|
| 124 | [order:10, controller:'person', title:'Person List', action:'list', isVisible: { true }], |
---|
| 125 | [order:20, controller:'person', title:'Create', action:'create', isVisible: { true }], |
---|
| 126 | [order:90, controller:'person', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 127 | [order:91, controller:'person', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 128 | ] |
---|
| 129 | ], |
---|
| 130 | [order:20, controller:'taskProcedureDetailed', title:'task', action:'list', |
---|
| 131 | subItems: [ |
---|
| 132 | [order:10, controller:'taskProcedureDetailed', title:'Task Procedure List', action:'list', isVisible: { true }], |
---|
| 133 | [order:20, controller:'taskProcedureDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 134 | [order:90, controller:'taskProcedureDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 135 | [order:91, controller:'taskProcedureDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 136 | ] |
---|
| 137 | ] |
---|
| 138 | ] |
---|