Changeset 40
- Timestamp:
- Jan 29, 2009, 8:31:15 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 4 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/grails-app/conf/BootStrap.groovy
r39 r40 44 44 //Person 45 45 new Person(personGroup:PersonGroup.get(1), 46 firstName:"Craig", 47 lastName:"SuperTech").save() 46 firstName:"Admin", 47 lastName:"Powers", 48 userId:"admin", 49 password:"pass").save() 50 new Person(personGroup:PersonGroup.get(1), 51 firstName:"User", 52 lastName:"Tester", 53 userId:"user", 54 password:"pass").save() 55 new Person(personGroup:PersonGroup.get(1), 56 firstName:"Craig", 57 lastName:"SuperTech", 58 userId:"craig", 59 password:"pass").save() 48 60 new Person(personGroup:PersonGroup.get(2), 49 firstName:"Joe", 50 lastName:"Samples").save() 61 firstName:"Joe", 62 lastName:"Samples", 63 userId:"joe", 64 password:"pass").save() 51 65 new Person(personGroup:PersonGroup.get(1), 52 firstName:"Production", 53 lastName:"Mann").save() 66 firstName:"Production", 67 lastName:"Mann", 68 userId:"Mann", 69 password:"pass").save() 54 70 55 71 //TaskGroup … … 64 80 //Task 65 81 new Task(taskGroup:TaskGroup.findByName("Engineering"), 66 person:Person.get( 1),82 person:Person.get(3), 67 83 name:"Check specific level sensor", 68 84 description:"Has been noted as problematic, try recallibrating", … … 70 86 targetDate: new Date() ).save() 71 87 new Task(taskGroup:TaskGroup.findByName("Production"), 72 person:Person.get( 2),88 person:Person.get(5), 73 89 name:"Production Report", 74 90 description:"Production report for specific production run or shift", 91 scheduledDate: new Date(), 92 targetDate: new Date() ).save() 93 new Task(taskGroup:TaskGroup.findByName("NewProject(s)"), 94 person:Person.get(1), 95 name:"Make killer CMMS app", 96 description:"Use Grails and get a move on!", 75 97 scheduledDate: new Date(), 76 98 targetDate: new Date() ).save() -
trunk/src/grails-app/controllers/EntryController.groovy
r21 r40 1 class EntryController { 2 1 class EntryController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/EntryTypeController.groovy
r21 r40 1 class EntryTypeController { 2 1 class EntryTypeController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/ModificationController.groovy
r21 r40 1 class ModificationController { 2 1 class ModificationController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/ModificationTypeController.groovy
r21 r40 1 class ModificationTypeController { 2 1 class ModificationTypeController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/PersonController.groovy
r21 r40 1 class PersonController { 2 1 class PersonController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth,except:['login', 'logout']] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 … … 80 82 } 81 83 } 84 85 def login = { 86 if (request.method == "GET") { 87 session.userId = null 88 def person = new Person() 89 } 90 else { 91 def person = Person.findByUserIdAndPassword(params.userId,params.password) 92 if (person) { 93 session.userId = person.userId 94 def redirectParams = 95 session.originalRequestParams ? 96 session.originalRequestParams : [controller:'task'] 97 redirect(redirectParams) 98 } 99 else { 100 flash['message'] = 'Please enter a valid user ID and password' 101 } 102 } 103 } 104 105 def logout = { 106 session.userId = null 107 flash['message'] = 'Successfully logged out' 108 redirect(controller:'person', action:'login') 109 } 110 111 def admin = { 112 render(view:'admin') 113 } 114 82 115 } -
trunk/src/grails-app/controllers/PersonGroupController.groovy
r19 r40 1 class PersonGroupController { 2 1 class PersonGroupController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/PersonGroupTypeController.groovy
r21 r40 1 class PersonGroupTypeController { 2 1 class PersonGroupTypeController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/TaskController.groovy
r21 r40 1 class TaskController { 2 1 class TaskController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/TaskGroupController.groovy
r21 r40 1 class TaskGroupController { 2 1 class TaskGroupController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/domain/Person.groovy
r35 r40 2 2 String firstName 3 3 String lastName 4 String userId 5 String password 4 6 Integer employeeID 5 7 boolean isActive = true … … 17 19 firstName(maxSize:50,blank:false) 18 20 lastName(maxSize:50,blank:false) 21 userId(maxSize:8,unique:true) 22 password(maxSize:8) 19 23 employeeID(blank:true, nullable:true) 20 24 } -
trunk/src/grails-app/views/layouts/main.gsp
r38 r40 15 15 <!-- <div class="logo" style="text-align: center; width: 980px; height: 220px"> 16 16 <img src="${createLinkTo(dir:'images',file:'logo.png')}" 17 alt="gnuMims" /></div> --> 17 alt="gnuMims" /> 18 <g:render template="/adminmenubar" /> 19 20 </div> --> 18 21 <div id="Header"> 22 </div> 23 <div class="appControl"> 24 <g:render template="/adminmenubar" /> 19 25 </div> 20 26 <g:layoutBody /> -
trunk/src/grails-app/views/person/create.gsp
r35 r40 47 47 <tr class="prop"> 48 48 <td valign="top" class="name"> 49 <label for="userId">User Id:</label> 50 </td> 51 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'userId','errors')}"> 52 <input type="text" maxlength="8" id="userId" name="userId" value="${fieldValue(bean:personInstance,field:'userId')}"/> 53 </td> 54 </tr> 55 56 <tr class="prop"> 57 <td valign="top" class="name"> 58 <label for="password">Password:</label> 59 </td> 60 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'password','errors')}"> 61 <input type="text" maxlength="8" id="password" name="password" value="${fieldValue(bean:personInstance,field:'password')}"/> 62 </td> 63 </tr> 64 65 <tr class="prop"> 66 <td valign="top" class="name"> 49 67 <label for="employeeID">Employee ID:</label> 50 68 </td> -
trunk/src/grails-app/views/person/edit.gsp
r35 r40 44 44 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'lastName','errors')}"> 45 45 <input type="text" maxlength="50" id="lastName" name="lastName" value="${fieldValue(bean:personInstance,field:'lastName')}"/> 46 </td> 47 </tr> 48 49 <tr class="prop"> 50 <td valign="top" class="name"> 51 <label for="userId">User Id:</label> 52 </td> 53 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'userId','errors')}"> 54 <input type="text" maxlength="8" id="userId" name="userId" value="${fieldValue(bean:personInstance,field:'userId')}"/> 55 </td> 56 </tr> 57 58 <tr class="prop"> 59 <td valign="top" class="name"> 60 <label for="password">Password:</label> 61 </td> 62 <td valign="top" class="value ${hasErrors(bean:personInstance,field:'password','errors')}"> 63 <input type="text" maxlength="8" id="password" name="password" value="${fieldValue(bean:personInstance,field:'password')}"/> 46 64 </td> 47 65 </tr> -
trunk/src/grails-app/views/person/list.gsp
r35 r40 28 28 <g:sortableColumn property="lastName" title="Last Name" /> 29 29 30 <g:sortableColumn property="userId" title="User Id" /> 31 32 <g:sortableColumn property="password" title="Password" /> 33 30 34 <g:sortableColumn property="employeeID" title="Employee ID" /> 31 32 <g:sortableColumn property="isActive" title="Is Active" />33 35 34 36 </tr> … … 44 46 <td>${fieldValue(bean:personInstance, field:'lastName')}</td> 45 47 48 <td>${fieldValue(bean:personInstance, field:'userId')}</td> 49 50 <td>${fieldValue(bean:personInstance, field:'password')}</td> 51 46 52 <td>${fieldValue(bean:personInstance, field:'employeeID')}</td> 47 48 <td>${fieldValue(bean:personInstance, field:'isActive')}</td>49 53 50 54 </tr> -
trunk/src/grails-app/views/person/show.gsp
r35 r40 45 45 46 46 <tr class="prop"> 47 <td valign="top" class="name">User Id:</td> 48 49 <td valign="top" class="value">${fieldValue(bean:personInstance, field:'userId')}</td> 50 51 </tr> 52 53 <tr class="prop"> 54 <td valign="top" class="name">Password:</td> 55 56 <td valign="top" class="value">${fieldValue(bean:personInstance, field:'password')}</td> 57 58 </tr> 59 60 <tr class="prop"> 47 61 <td valign="top" class="name">Employee ID:</td> 48 62 … … 54 68 <td valign="top" class="name">Entries:</td> 55 69 56 <td valign="top" class="value">${fieldValue(bean:personInstance, field:'entries')}</td> 70 <td valign="top" style="text-align:left;" class="value"> 71 <ul> 72 <g:each var="e" in="${personInstance.entries}"> 73 <li><g:link controller="entry" action="show" id="${e.id}">${e?.encodeAsHTML()}</g:link></li> 74 </g:each> 75 </ul> 76 </td> 57 77 58 78 </tr> -
trunk/src/web-app/css/public.css
r38 r40 37 37 background: transparent url("../images/logo.png") no-repeat scroll center; 38 38 width: 980px; 39 height: 2 20px;39 height: 200px; 40 40 } 41 41 … … 95 95 } 96 96 97 .appcontrol { 98 text-align: right; 99 padding: 5px 160px 5px 5px 100 } 101 102 .appcontrolButton { 103 font-size: 10px; 104 padding: 5px 5px; 105 } 106 97 107 .nav a{ 98 108 background: url("../images/linkPanel.png") no-repeat top; -
trunk/src/web-app/index.gsp
r31 r40 1 <html> 2 <head> 3 <title>Welcome to gnuMims</title> 4 <meta name="layout" content="main" /> 5 </head> 6 <body> 7 <h1 style="margin-left:20px;">Welcome to gnuMims</h1> 8 <p style="margin-left:20px;width:80%"> 9 Home 10 </p> 11 <div class="dialog" style="margin-left:20px;width:60%;"> 12 <ul> 13 <g:each var="c" in="${grailsApplication.controllerClasses}"> 14 <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li> 15 </g:each> 16 </ul> 17 </div> 18 </body> 19 </html> 1 <%response.sendRedirect(request.getContextPath()+'/task/list')%>
Note: See TracChangeset
for help on using the changeset viewer.