Index: /branches/features/purchaseOrders/.idea/README.txt
===================================================================
--- /branches/features/purchaseOrders/.idea/README.txt (revision 942)
+++ /branches/features/purchaseOrders/.idea/README.txt (revision 942)
@@ -0,0 +1,15 @@
+
+IntelliJ IDEA
+
+- Create new project.
+- Import from Grails sources.
+- Overwrite .idea -> yes (should not destroy runConfigurations).
+- Don't commit any other IDEA project files (they can all be generated).
+
+#### runConfigurations.
+The "module" is set to a path variable "$grailsAppModuleName$".
+Set the value in IDEA settings not in runConfigurations dialogue.
+Once the path variable is set, change it with all projects closed when switching branches.
+
+Do not commit changes to "$grailsAppModuleName$".
+If accidentally changed with the runConfigurations dialogue then please revert.
Index: /branches/features/purchaseOrders/.idea/runConfigurations/AllUnitTestSuite.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/AllUnitTestSuite.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/AllUnitTestSuite.xml (revision 942)
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_clean.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_clean.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_clean.xml (revision 942)
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_console.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_console.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_console.xml (revision 942)
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_interactive.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_interactive.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_interactive.xml (revision 942)
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_runApp.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_runApp.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_runApp.xml (revision 942)
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_testApp.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_testApp.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_testApp.xml (revision 942)
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_functional.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_functional.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_functional.xml (revision 942)
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_integration.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_integration.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_integration.xml (revision 942)
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_unit.xml
===================================================================
--- /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_unit.xml (revision 942)
+++ /branches/features/purchaseOrders/.idea/runConfigurations/Grails_tests_unit.xml (revision 942)
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /branches/features/purchaseOrders/gnuMims-config.groovy
===================================================================
--- /branches/features/purchaseOrders/gnuMims-config.groovy (revision 942)
+++ /branches/features/purchaseOrders/gnuMims-config.groovy (revision 942)
@@ -0,0 +1,91 @@
+/**
+ * External application config file.
+ * This is a full Groovy ConfigSlurper file but don't let that scare you :-)
+ * Normally just set your database settings in the Required Settings section.
+ * Usage:
+ * This file must be placed on the classpath, for example in ONE of the following:
+ * $CATALINA_BASE/lib/
+ * $CATALINA_HOME/lib/
+ * /var/lib/tomcat5.5/common/lib/ (Debian Tomcat5.5)
+ * /var/lib/tomcat6/common/classes/ (Debian Tomcat6)
+ * or in the root of a grails application (development).
+ * More:
+ * Grails user guide - 3.3 The DataSource and 3.4 Externalized Configuration
+ * http://grails.org/doc/latest/guide/
+ * http://groovy.codehaus.org/ConfigSlurper
+ */
+
+/*******************
+Init, please ignore.
+*******************/
+def appName = grails.util.Metadata.current.'app.name'
+println "EXT($appName): External config start."
+
+/***********************************
+Required Settings, please set these.
+************************************/
+
+environments {
+ production {
+ println "EXT($appName): Configure production datasource."
+
+ // Enable ONE dataSource with your database settings.
+ // Delete dbCreate line after setup!
+ dataSource {
+ /** HSQLDB - In memory */
+// driverClassName = "org.hsqldb.jdbcDriver"
+// username = "sa"
+// password = ""
+// dbCreate = "create-drop"
+// url = "jdbc:hsqldb:mem:devDb"
+ /** HSQLDB - In file */
+// driverClassName = "org.hsqldb.jdbcDriver"
+// username = "sa"
+// password = ""
+// dbCreate = "update"
+// url = "jdbc:hsqldb:file:prodDb;shutdown=true"
+ /** MSSQL */
+ //For more info see the docs that you downloaded with the driver.
+// dialect = org.hibernate.dialect.SQLServerDialect // MSSQL 2000+2005 Useful with `grails schema-export`
+// driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+// username = "gnumimsadmin"
+// password = "gnumimsadmin"
+// dbCreate = "update"
+// url = "jdbc:sqlserver://gnumimssql01:1433;databaseName=gnumims_prod"
+ /** MySQL */
+ dialect = org.hibernate.dialect.MySQL5InnoDBDialect
+ driverClassName = "com.mysql.jdbc.Driver"
+ username = "gnumimsadmin"
+ password = "gnumimsadmin"
+ dbCreate = "update"
+ url = "jdbc:mysql://gnumimssql01:3306/gnumims_prod?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
+ }
+ }
+}
+
+// It is highly recommended to limit the currencyList to the ONE that the site uses e.g:
+// 'EUR', 'XCD', 'USD', 'XOF', 'NOK', 'AUD', 'XAF', 'TRL'
+// 'NZD', 'MAD', 'DKK', 'GBP', 'CHF', 'XPF', 'ILS', 'ROL'
+currencyList = ['AUD']
+
+/*******************
+Optional Settings.
+*******************/
+
+// Set true to enable demo mode and create demo data.
+demoMode.enabled = false
+
+// Task generation interval, increase value to reduce system load.
+taskRecurringScheduleJob.repeatInterval = 10
+
+/*******************
+Exit Functions.
+*******************/
+
+if(demoMode.enabled) {
+ println "EXT($appName): Demo mode enabled."
+ currencyList = ['EUR', 'XCD', 'USD', 'XOF', 'NOK', 'AUD', 'XAF', 'TRL',
+ 'NZD', 'MAD', 'DKK', 'GBP', 'CHF', 'XPF', 'ILS', 'ROL']
+}
+
+println "EXT($appName): External config end."
Index: /branches/features/purchaseOrders/grails-app/conf/BootStrap.groovy
===================================================================
--- /branches/features/purchaseOrders/grails-app/conf/BootStrap.groovy (revision 941)
+++ /branches/features/purchaseOrders/grails-app/conf/BootStrap.groovy (revision 942)
@@ -1,2 +1,4 @@
+import org.codehaus.groovy.grails.commons.ConfigurationHolder as CH
+
class BootStrap
{
@@ -15,4 +17,5 @@
createDataService.ensureSystemAndAdminAccess()
createDataService.createBaseData()
+ CH.config.demoMode.enabled = true
createDataService.createDemoData()
createDataService.startSearchableIndex()
@@ -28,4 +31,5 @@
createDataService.ensureSystemAndAdminAccess()
createDataService.createBaseData()
+ if(CH.config.demoMode.enabled) createDataService.createDemoData()
createDataService.startSearchableIndex()
}
Index: /branches/features/purchaseOrders/grails-app/conf/BuildConfig.groovy
===================================================================
--- /branches/features/purchaseOrders/grails-app/conf/BuildConfig.groovy (revision 941)
+++ /branches/features/purchaseOrders/grails-app/conf/BuildConfig.groovy (revision 942)
@@ -2,19 +2,6 @@
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
-
-def env = System.getProperty('grails.env')
-
-switch (env) {
- case "production":
- //grails.project.war.file = "target/${appName}-${appVersion}.war"
- grails.project.war.file = "target/${appName}Live.war"
- break
- case "development":
- grails.project.war.file = "target/${appName}Dev.war"
- break
- default:
- grails.project.war.file = "target/${appName}.war"
- break
-}
+//grails.project.war.file = "target/${appName}-${appVersion}.war"
+grails.project.war.file = "target/${appName}.war"
grails.war.resources = { stagingDir, args ->
Index: /branches/features/purchaseOrders/grails-app/conf/Config.groovy
===================================================================
--- /branches/features/purchaseOrders/grails-app/conf/Config.groovy (revision 941)
+++ /branches/features/purchaseOrders/grails-app/conf/Config.groovy (revision 942)
@@ -10,4 +10,10 @@
// grails.config.locations << "file:" + System.properties["${appName}.config.location"]
// }
+
+// Local config file (development) otherwise try the classpath (production).
+if(new File("${appName}-config.groovy").exists())
+ grails.config.locations = [ "file:${appName}-config.groovy" ]
+else
+ grails.config.locations = [ "classpath:${appName}-config.groovy" ]
// Set false due to acegi security issue.
@@ -81,5 +87,4 @@
* Basic log levels are ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF
*/
-
log4j = {
appenders {
@@ -404,11 +409,2 @@
]
]
-
-/**
- * Custom application global settings.
- * @todo: externalise these settings to a config file (along with the database settings) or have them configurable via the web interface+database.
- */
-taskRecurringScheduleJob.repeatInterval=10
-// It is recommended to limit the currencyList to the one that the site uses e.g: currencyList = ['AUD']
-currencyList = ['EUR', 'XCD', 'USD', 'XOF', 'NOK', 'AUD', 'XAF', 'NZD', 'MAD', 'DKK', 'GBP', 'CHF', 'XPF', 'ILS', 'ROL', 'TRL']
-
Index: /branches/features/purchaseOrders/grails-app/conf/DataSource.groovy
===================================================================
--- /branches/features/purchaseOrders/grails-app/conf/DataSource.groovy (revision 941)
+++ /branches/features/purchaseOrders/grails-app/conf/DataSource.groovy (revision 942)
@@ -16,4 +16,5 @@
// Environment specific settings.
+// All production config is in external config.
environments {
development {
@@ -51,36 +52,3 @@
}
}
- production {
- dataSource {
- /* Delete dbCreate line after setup! */
- /** HSQLDB - In memory */
-// driverClassName = "org.hsqldb.jdbcDriver"
-// username = "sa"
-// password = ""
-// dbCreate = "create-drop"
-// url = "jdbc:hsqldb:mem:devDb"
- /** HSQLDB - In file */
-// driverClassName = "org.hsqldb.jdbcDriver"
-// username = "sa"
-// password = ""
-// dbCreate = "update"
-// url = "jdbc:hsqldb:file:prodDb;shutdown=true"
- /** MSSQL */
- //For more info see the docs that you downloaded with the driver.
-// dialect = org.hibernate.dialect.SQLServerDialect // MSSQL 2000+2005 Useful with `grails schema-export`
-// driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
-// username = "gnumimsadmin"
-// password = "gnumimsadmin"
-// dbCreate = "update"
-// url = "jdbc:sqlserver://gnumimssql01:1433;databaseName=gnumims_prod"
- /** MySQL */
- dialect = org.hibernate.dialect.MySQL5InnoDBDialect
- driverClassName = "com.mysql.jdbc.Driver"
- username = "gnumimsadmin"
- password = "gnumimsadmin"
- dbCreate = "update"
- url = "jdbc:mysql://gnumimssql01:3306/gnumims_prod?autoReconnect=true&sessionVariables=storage_engine=InnoDB"
- }
-
- }
}
Index: /branches/features/purchaseOrders/grails-app/controllers/TaskDetailedController.groovy
===================================================================
--- /branches/features/purchaseOrders/grails-app/controllers/TaskDetailedController.groovy (revision 941)
+++ /branches/features/purchaseOrders/grails-app/controllers/TaskDetailedController.groovy (revision 942)
@@ -888,4 +888,5 @@
@Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_TaskManager', 'ROLE_TaskUser'])
def workLoad= {
+ def filterParams = [:]
def result = taskSearchService.getWorkLoad(params, RCU.getLocale(request))
@@ -900,5 +901,6 @@
workLoadGroups: result.workLoadGroups,
totalHours: result.totalHours,
- totalMinutes: result.totalMinutes]
+ totalMinutes: result.totalMinutes,
+ filterParams: filterParams]
} // workLoad
Index: /branches/features/purchaseOrders/grails-app/taglib/CustomTagLib.groovy
===================================================================
--- /branches/features/purchaseOrders/grails-app/taglib/CustomTagLib.groovy (revision 941)
+++ /branches/features/purchaseOrders/grails-app/taglib/CustomTagLib.groovy (revision 942)
@@ -174,5 +174,5 @@
// def messageSource = grailsAttributes.getApplicationContext().getBean("messageSource")
// def locale = RCU.getLocale(request)
-//
+//
// title = messageSource.getMessage(titleKey, null, title, locale)
// }
@@ -374,4 +374,15 @@
/**
+ * Returns the correct headerId for the main header div.
+ */
+ def headerId = { attrs, body ->
+ def headerId = ''
+ if(grails.util.Environment.isDevelopmentMode()) headerId = 'HeaderDev'
+ else if(grailsApplication.config.demoMode.enabled) headerId = 'HeaderDemo'
+ else headerId = 'Header'
+ out << headerId
+ }
+
+ /**
* Determine if a supplied string is considered a url or not.
* The scheme/protocol can be adjusted, file:// has been excluded here.
Index: /branches/features/purchaseOrders/grails-app/views/_about.gsp
===================================================================
--- /branches/features/purchaseOrders/grails-app/views/_about.gsp (revision 941)
+++ /branches/features/purchaseOrders/grails-app/views/_about.gsp (revision 942)
@@ -191,10 +191,16 @@
-
-
- Plugins: ${plugins}
- |
-
-
-
-
+
+
+ Plugins: ${plugins}
+ |
+
+
+
+ Java version: ${System.getProperty('java.version').encodeAsHTML()} (As supplied by host JVM)
+ Groovy version: ${org.codehaus.groovy.runtime.InvokerHelper.getVersion()} (As supplied with Grails)
+ |
+
+
+
+
Index: /branches/features/purchaseOrders/grails-app/views/layouts/main.gsp
===================================================================
--- /branches/features/purchaseOrders/grails-app/views/layouts/main.gsp (revision 941)
+++ /branches/features/purchaseOrders/grails-app/views/layouts/main.gsp (revision 942)
@@ -34,14 +34,7 @@
-
-
-
-
-
-
+
Index: /branches/features/purchaseOrders/grails-app/views/login/auth.gsp
===================================================================
--- /branches/features/purchaseOrders/grails-app/views/login/auth.gsp (revision 941)
+++ /branches/features/purchaseOrders/grails-app/views/login/auth.gsp (revision 942)
@@ -72,5 +72,5 @@
Welcome to gnuMims please log in
-
+
The demo users are user, manager and admin all having the password: pass
@@ -85,9 +85,9 @@
-
-
+
+
-
+
@@ -96,9 +96,9 @@
-
-
+
+
-
+
Index: /branches/features/purchaseOrders/web-app/css/main.css
===================================================================
--- /branches/features/purchaseOrders/web-app/css/main.css (revision 941)
+++ /branches/features/purchaseOrders/web-app/css/main.css (revision 942)
@@ -76,4 +76,9 @@
height: 136px;
}
+#HeaderDemo {
+ background: transparent url("../images/logoOnlineDemo.png") no-repeat scroll center;
+ width: 980px;
+ height: 136px;
+}
#HeaderLink{
display: block;
@@ -693,5 +698,5 @@
.subnavigation li a:hover {
/*color: red;*/
- /*border-color: black;*/
+ /*border-color: black;*/
border-width: 1px 0;
}