From ac5fe4910ae442f539c9f8b50b43470aeb97c4bd Mon Sep 17 00:00:00 2001 From: Christopher Bartling Date: Thu, 26 Apr 2012 23:42:12 -0500 Subject: [PATCH] Applying Bootstrap styling to profile view. --- .../grails-app/conf/UrlMappings.groovy | 2 +- .../controllers/ProfileController.groovy | 3 + .../grails-app/views/index.gsp | 37 +---------- .../grails-app/views/layouts/main.gsp | 42 ++++++------ .../grails-app/views/profile/index.gsp | 64 +++++++++++++++++++ 5 files changed, 91 insertions(+), 57 deletions(-) create mode 100644 backbone-photo-gallery/grails-app/views/profile/index.gsp diff --git a/backbone-photo-gallery/grails-app/conf/UrlMappings.groovy b/backbone-photo-gallery/grails-app/conf/UrlMappings.groovy index 71863e4..26606f7 100644 --- a/backbone-photo-gallery/grails-app/conf/UrlMappings.groovy +++ b/backbone-photo-gallery/grails-app/conf/UrlMappings.groovy @@ -2,7 +2,7 @@ class UrlMappings { static mappings = { - "/profiles"(controller: 'profile', action: 'index', parseRequest: false) + "/profiles"(controller: 'profile', action: 'list', parseRequest: false) "/profiles/$id"(controller: "profile", parseRequest: true) { action = [GET: "show", PUT: "update", DELETE: "delete", POST: "save"] diff --git a/backbone-photo-gallery/grails-app/controllers/cebartling/backbone/photogallery/controllers/ProfileController.groovy b/backbone-photo-gallery/grails-app/controllers/cebartling/backbone/photogallery/controllers/ProfileController.groovy index 7ace7f5..0fbaf34 100644 --- a/backbone-photo-gallery/grails-app/controllers/cebartling/backbone/photogallery/controllers/ProfileController.groovy +++ b/backbone-photo-gallery/grails-app/controllers/cebartling/backbone/photogallery/controllers/ProfileController.groovy @@ -6,6 +6,9 @@ import grails.converters.JSON class ProfileController { def index() { + } + + def list() { log.info "Retrieving list of profiles..." def profiles = Profile.list() withFormat { diff --git a/backbone-photo-gallery/grails-app/views/index.gsp b/backbone-photo-gallery/grails-app/views/index.gsp index 5c42f75..a8cf9da 100644 --- a/backbone-photo-gallery/grails-app/views/index.gsp +++ b/backbone-photo-gallery/grails-app/views/index.gsp @@ -1,24 +1,7 @@ - - - - - - - + @@ -32,23 +15,5 @@ -
- -
- -
- -%{----}% -%{--
--}% -%{--×--}% -%{--Oh snap!--}% -%{--  --}% -%{--There seems to be some things amiss in the form below. Please correct the following issues and resubmit the form.--}% -%{--
--}% -%{--
--}% -%{----}% -%{--
--}% -%{--
--}% - diff --git a/backbone-photo-gallery/grails-app/views/layouts/main.gsp b/backbone-photo-gallery/grails-app/views/layouts/main.gsp index ae9fb13..19978ca 100644 --- a/backbone-photo-gallery/grails-app/views/layouts/main.gsp +++ b/backbone-photo-gallery/grails-app/views/layouts/main.gsp @@ -35,26 +35,28 @@ Photo Gallery - %{----}% - %{--
--}% - %{----}% - %{-- --}% - %{----}% - %{----}% - %{----}% - %{--
--}% + + + %{--
--}% + %{----}% + %{-- --}% + %{----}% + %{----}% + %{----}% + %{--
--}% diff --git a/backbone-photo-gallery/grails-app/views/profile/index.gsp b/backbone-photo-gallery/grails-app/views/profile/index.gsp new file mode 100644 index 0000000..e30adcd --- /dev/null +++ b/backbone-photo-gallery/grails-app/views/profile/index.gsp @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + +

Profiles

+ +
+
+ +
+
+ + +