Changeset 44 for trunk/src/grails-app
- Timestamp:
- Jan 31, 2009, 10:33:34 AM (16 years ago)
- Location:
- trunk/src/grails-app
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/grails-app/conf/BootStrap.groovy
r40 r44 43 43 44 44 //Person 45 new Person(personGroup:PersonGroup.get( 1),45 new Person(personGroup:PersonGroup.get(3), 46 46 firstName:"Admin", 47 47 lastName:"Powers", … … 49 49 password:"pass").save() 50 50 new Person(personGroup:PersonGroup.get(1), 51 firstName:" User",52 lastName:" Tester",51 firstName:"Demo", 52 lastName:"Danza", 53 53 userId:"user", 54 54 password:"pass").save() -
trunk/src/grails-app/controllers/PersonController.groovy
r40 r44 92 92 if (person) { 93 93 session.userId = person.userId 94 def greeting = "Hi "+person.firstName+" "+person.lastName 94 95 def redirectParams = 95 96 session.originalRequestParams ? 96 97 session.originalRequestParams : [controller:'task'] 98 flash['message'] = "${greeting}" 97 99 redirect(redirectParams) 98 100 } -
trunk/src/grails-app/views/_adminmenubar.gsp
r40 r44 1 1 <g:if test="${session.userId}"> 2 <span class="appControlButton"> 3 <g:link controller="task" action="list"> 4 Task 5 </g:link> 6 </span> 7 <span class="appControlButton"> 8 <g:link controller="person" action="admin"> 2 <g:if test="${session.userId == 'admin'}"> 3 <span class="appControlButton"> 4 <g:link controller="person" action="admin"> 9 5 Admin 10 </g:link> 11 </span> 6 </g:link> 7 </span> 8 </g:if> 12 9 <span class="appControlButton"> 13 10 <g:link controller="person" action="logout"> 14 Log out11 Log out 15 12 </g:link> 16 13 </span> -
trunk/src/grails-app/views/layouts/main.gsp
r41 r44 5 5 <link rel="shortcut icon" href="${createLinkTo(dir:'images',file:'gnuMimsIcon.ico')}" type="image/x-icon" /> 6 6 <g:layoutHead /> 7 <g:javascript library="application" /> 7 <g:javascript library="application" /> 8 8 </head> 9 9 <body> 10 10 <div id="wrapper" style="height: 100%;"> 11 <div id="top"> 12 </div> 11 13 <div id="content" align="center"> 12 14 <div id="spinner" class="spinner" style="display:none;"> -
trunk/src/grails-app/views/person/login.gsp
r40 r44 7 7 </head> 8 8 <body> 9 <div class="nav"> 10 <span class="menuButton"> 11 <!-- <a class="home" href="${createLinkTo(dir:'')}">Home</a> --> 12 </span> 13 </div> 9 14 10 <div class="body"> 15 11 <h1>Please log in</h1> … … 17 13 <div class="message">${flash.message}</div> 18 14 </g:if> 15 The demo users are "admin" and "user" both having password "pass" 19 16 <g:hasErrors bean="${person}"> 20 17 <div class="errors">
Note: See TracChangeset
for help on using the changeset viewer.