diff --git a/grails-app/conf/BootStrap.groovy b/grails-app/conf/BootStrap.groovy index 0615b35..15175f2 100644 --- a/grails-app/conf/BootStrap.groovy +++ b/grails-app/conf/BootStrap.groovy @@ -2,6 +2,20 @@ import gum.* class BootStrap { def init = { servletContext -> + sponsors() + speakerTalks() + } + + private void sponsors() { + new Sponsor([title: 'Agile Orbit', type: 'Food Sponsor', url: 'http://objectpartners.com', file: "agileorbit-logo.jpg"]).save() + new Sponsor([title: 'FigJam', type: 'Beverage Sponsor', url: 'http://twitter.com/joshareed', file: "figjam-logo-800X225.png"]).save() + new Sponsor([title: 'Object Partners', type: 'Food Sponsor', url: 'http://objectpartners.com', file: "opi-logo-text.png"]).save() + new Sponsor([title: 'ReachLocal', type: 'Beverage Sponsor', url: 'http://reachlocal.com', file: "reachlocal.jpg"]).save() + new Sponsor([title: 'SmartThings', type: 'Space Sponsor', url: 'http://smartthings.com', file: "smart-things-logo-text.png"]).save() + new Sponsor([title: 'Surly Labs', type: 'Beverage Sponsor', url: 'http://surlylabs.com', file: "surly_logo_horizontal.jpg"]).save() + } + + private void speakerTalks() { def groovyMn = new Speaker([name: "GroovyMN", twitterId: "groovymn", githubId: "groovymn", company: "GroovyMN", about: "Groovy Users of Minnesota"]).save() def applegate = new Speaker([name: "Ryan Applegate", twitterId: "rappleg", githubId: "rappleg", company: "SmartThings"]).save() @@ -190,7 +204,7 @@ class BootStrap { // 20140211-cassandra-jeff-beck.jpg def _201402 = new Presentation([title: "Cassandra & Grails", slidesUrl: "htp://beckje01.github.io/gum-2014-cassandra-grails-talk", presentationDate: new Date("2014/02/11")]).save() - _201402.addToSpeakers(beck) + _201402.addToSpeakers(beck) beck.addToPresentations(_201402) } diff --git a/grails-app/controllers/gum/PagesController.groovy b/grails-app/controllers/gum/PagesController.groovy index 5d6698b..718f650 100644 --- a/grails-app/controllers/gum/PagesController.groovy +++ b/grails-app/controllers/gum/PagesController.groovy @@ -31,6 +31,15 @@ class PagesController { log.debug "params: $params" } + def home2() { + log.debug "params: $params" + def smartThings = Sponsor.findByTitle('SmartThings') + def reachLocal = Sponsor.findByTitle('ReachLocal') + def opi = Sponsor.findByTitle('Object Partners') + + render view: "/pages/home2", model: [space: smartThings, beverage: reachLocal, food: opi] + } + def location() { log.debug "params: $params" } diff --git a/grails-app/domain/gum/Sponsor.groovy b/grails-app/domain/gum/Sponsor.groovy new file mode 100644 index 0000000..81a4182 --- /dev/null +++ b/grails-app/domain/gum/Sponsor.groovy @@ -0,0 +1,23 @@ +package gum + +class Sponsor { + String type // TODO: Enum + String url + String title // TODO: or unique code? + String file + Date description + Byte photo + + static constraints = { + type(blank: false, nullable: false) // TODO: unique: true + url(url:true, blank: true, nullable: true) + title(blank: false, nullable: false, unique: true) + file(blank: false, nullable: false) + description(blank: true, nullable: true, maxSize: 1000) + photo(blank: true, nullable: true) + } + + String toString() { + return title + } +} \ No newline at end of file diff --git a/grails-app/views/_home2.gsp b/grails-app/views/_home2.gsp new file mode 100644 index 0000000..d3451a6 --- /dev/null +++ b/grails-app/views/_home2.gsp @@ -0,0 +1,16 @@ + +