Changeset 155 for trunk/grails-app
- Timestamp:
- Oct 17, 2009, 1:41:59 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 1 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/Config.groovy
r149 r155 86 86 [order:20, controller:'taskDetailed', title:'tasks', action:'search', 87 87 subItems: [ 88 [order:10, controller:'taskDetailed', title:'Search', action:'search', isVisible: { params.action != ' advancedSearch'}],89 [order:11, controller:'taskDetailed', title:' Advanced Search', action:'advancedSearch', isVisible: { params.action == 'advancedSearch' }],88 [order:10, controller:'taskDetailed', title:'Search', action:'search', isVisible: { params.action != 'searchCalendar'}], 89 [order:11, controller:'taskDetailed', title:'Calendar', action:'searchCalendar', isVisible: { params.action == 'searchCalendar' }], 90 90 [order:20, controller:'taskDetailed', title:'Create', action:'create', isVisible: { true }], 91 91 [order:90, controller:'taskDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], -
trunk/grails-app/controllers/TaskDetailedController.groovy
r147 r155 22 22 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100 ) 23 23 24 // Search urls:24 // Quick Search: 25 25 if(!params.filter) 26 26 { … … 28 28 def personInstance = Person.get(authenticateService.userDomain().id) 29 29 30 if(params. searchMyTodays) {30 if(params.quickSearch == "searchMyTodays") { 31 31 taskInstanceList = taskSearchService.getMyTodays(params) 32 32 if(taskInstanceList.totalCount > 0) { params.message = "Today's tasks for ${personInstance.firstName} ${personInstance.lastName}." } 33 33 else { params.message = "No tasks found for today." } 34 34 } 35 else if(params. searchInTheLastWeek) {35 else if(params.quickSearch == "searchInTheLastWeek") { 36 36 taskInstanceList = taskSearchService.getInTheLastWeek(params) 37 37 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week." } 38 38 else { params.message = "No tasks found for today." } 39 39 } 40 else if(params. searchMyInTheLastWeek) {40 else if(params.quickSearch == "searchMyInTheLastWeek") { 41 41 taskInstanceList = taskSearchService.getMyInTheLastWeek(params) 42 42 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week for ${personInstance.firstName} ${personInstance.lastName}." } … … 48 48 if(taskInstanceList.totalCount > 0) { params.message = "Today's tasks." } 49 49 else { params.message = "No tasks found for today." } 50 }51 52 return[ taskInstanceList: taskInstanceList, taskInstanceTotal: taskInstanceList.totalCount]50 params.quickSearch = "searchTodays" 51 } 52 return[taskInstanceList: taskInstanceList, taskInstanceTotal: taskInstanceList.totalCount, filterParams: params] 53 53 } 54 54 // filterPane: … … 59 59 } 60 60 61 def advancedSearch = { 62 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100 ) 63 64 if(!params._action_advancedSearch) 61 def searchCalendar = { 62 // println params 63 params.max = 30 64 65 // Quick Search: 66 if(!params.filter) 65 67 { 66 // Default: 67 def taskInstanceActivesList = Task.findAllByIsActive(true, params) 68 def taskInstanceActivesTotal = Task.countByIsActive(true) 69 return [taskInstanceList: taskInstanceActivesList, taskInstanceTotal: taskInstanceActivesTotal] 70 } 71 render( view:'advancedSearch', 72 model:[ taskInstanceList: filterService.filter( params, Task ), 73 taskInstanceTotal: filterService.count( params, Task ), 74 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params), 75 params:params ] ) 76 } 77 78 // def searchTodays = { 79 // def taskInstanceList = taskSearchService.getTodays(params) 80 // 81 // if(taskInstanceList.totalCount > 0) 82 // { 83 // flash.message = "Today's tasks" 84 // } 85 // else { flash.message = "No tasks found for today" } 86 // 87 // render( view:'search', 88 // model:[ taskInstanceList: taskInstanceList, 89 // taskInstanceTotal: taskInstanceList.totalCount]) 90 // } 91 92 // def searchMyTodays = { 93 // params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 94 // 95 // def taskInstanceList = Task.createCriteria().list() { 96 // eq("leadPerson", Person.get(authenticateService.userDomain().id)) 97 // ge("targetStartDate", dateUtilService.getToday()) 98 // eq("isActive", true) 99 // } 100 // 101 // def taskInstanceTotal = Task.createCriteria().count() { 102 // eq("leadPerson", Person.get(authenticateService.userDomain().id)) 103 // ge("targetStartDate", dateUtilService.getToday()) 104 // eq("isActive", true) 105 // } 106 // 107 // if(taskInstanceTotal > 0) 108 // { 109 // flash.message = "Today's tasks" 110 // } 111 // else { flash.message = "No tasks found for today" } 112 // 113 // render( view:'search', 114 // model:[ taskInstanceList: taskInstanceList, 115 // taskInstanceTotal: taskInstanceTotal]) 116 // } 117 118 def searchInTheLastWeek = { 119 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 120 121 def taskInstanceList = Task.createCriteria().list() { 122 ge("targetStartDate", dateUtilService.getToday()-7) 123 eq("isActive", true) 124 } 125 126 def taskInstanceTotal = Task.createCriteria().count() { 127 ge("targetStartDate", dateUtilService.getToday()-7) 128 eq("isActive", true) 129 } 130 131 if(taskInstanceTotal > 0) 132 { 133 flash.message = "Tasks with target start date in the last week." 134 } 135 136 else {flash.message = "No tasks found with target start date in the last week." } 137 138 render( view:'search', 139 model:[ taskInstanceList: taskInstanceList, 140 taskInstanceTotal: taskInstanceTotal]) 141 } 142 143 def searchMyInTheLastWeek = { 144 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 145 146 def taskInstanceList = Task.createCriteria().list() { 147 eq("leadPerson", Person.get(authenticateService.userDomain().id)) 148 ge("targetStartDate", dateUtilService.getToday()-7) 149 eq("isActive", true) 150 } 151 152 def taskInstanceTotal = Task.createCriteria().count() { 153 eq("leadPerson", Person.get(authenticateService.userDomain().id)) 154 ge("targetStartDate", dateUtilService.getToday()-7) 155 eq("isActive", true) 156 } 157 158 if(taskInstanceTotal > 0) 159 { 160 flash.message = "Tasks with target start date in the last week." 161 } 162 else { flash.message = "No tasks found with target start date in the last week." } 163 164 render( view:'search', 165 model:[ taskInstanceList: taskInstanceList, 166 taskInstanceTotal: taskInstanceTotal]) 167 } 168 169 // def search = { 170 // params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) 171 // 172 // if(!params.order) { 173 // params.sort = "id" 174 // params.order = "desc" 175 // } 176 // 177 // if(params.search == "ShowAll") 178 // { 179 // def taskInstanceActivesList = Task.findAllByIsActive(true, params) 180 // def taskInstanceActivesTotal = Task.countByIsActive(true) 181 // return [taskInstanceList: taskInstanceActivesList, taskInstanceTotal: taskInstanceActivesTotal] 182 // } 183 // if(params.search == "ShowDeleted") 184 // { 185 // def taskInstanceActivesList = Task.findAllByIsActive(false, params) 186 // def taskInstanceActivesTotal = Task.countByIsActive(false) 187 // return [taskInstanceList: taskInstanceActivesList, taskInstanceTotal: taskInstanceActivesTotal] 188 // } 189 // // Default: 190 // def taskInstanceActivesList = Task.findAllByIsActive(true, params) 191 // def taskInstanceActivesTotal = Task.countByIsActive(true) 192 // [taskInstanceList: taskInstanceActivesList, taskInstanceTotal: taskInstanceActivesTotal] 193 // } 194 195 def searchShowAll = { 196 redirect(action:'search', params:[search:"ShowAll"]) 197 } 198 199 def searchShowDeleted = { 200 redirect(action:'search', params:[search:"ShowDeleted"]) 68 def taskInstanceList = [] 69 def personInstance = Person.get(authenticateService.userDomain().id) 70 71 if(params.quickSearch == "searchMyTodays") { 72 taskInstanceList = taskSearchService.getMyTodays(params) 73 if(taskInstanceList.totalCount > 0) { params.message = "Today's tasks for ${personInstance.firstName} ${personInstance.lastName}." } 74 else { params.message = "No tasks found for today." } 75 if(taskInstanceList.totalCount > params.max) { params.message = "Too many results, only the first ${params.max} shown" } 76 } 77 else if(params.quickSearch == "searchInTheLastWeek") { 78 taskInstanceList = taskSearchService.getInTheLastWeek(params) 79 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week." } 80 else { params.message = "No tasks found for today." } 81 if(taskInstanceList.totalCount > params.max) { params.message = "Too many results, only the first ${params.max} shown" } 82 } 83 else if(params.quickSearch == "searchMyInTheLastWeek") { 84 taskInstanceList = taskSearchService.getMyInTheLastWeek(params) 85 if(taskInstanceList.totalCount > 0) { params.message = "Tasks with Target Start Date in the last week for ${personInstance.firstName} ${personInstance.lastName}." } 86 else { params.message = "No tasks found for today." } 87 if(taskInstanceList.totalCount > params.max) { params.message = "Too many results, only the first ${params.max} shown" } 88 } 89 else { 90 //Default: 91 taskInstanceList = taskSearchService.getTodays(params) 92 if(taskInstanceList.totalCount > 0) { params.message = "Today's tasks." } 93 else { params.message = "No tasks found for today." } 94 if(taskInstanceList.totalCount > params.max) { params.message = "Too many results, only the first ${params.max} shown" } 95 params.quickSearch = "searchTodays" 96 } 97 return[taskInstanceList: taskInstanceList, taskInstanceTotal: taskInstanceList.totalCount, filterParams: params] 98 } 99 // filterPane: 100 def taskInstanceTotal = filterService.count( params, Task ) 101 if(taskInstanceTotal > params.max) { params.message = "Too many results, only the first ${params.max} shown" } 102 return[ taskInstanceList: filterService.filter( params, Task ), 103 taskInstanceTotal: taskInstanceTotal, 104 filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params), 105 params:params ] 201 106 } 202 107 -
trunk/grails-app/controllers/TaskProcedureDetailedController.groovy
r147 r155 2 2 3 3 class TaskProcedureDetailedController extends BaseController { 4 5 def filterService 4 6 5 7 def index = { redirect(action:list,params:params) } … … 113 115 } else { 114 116 flash.message = "Please select a task, then the Procedure tab.'" 115 redirect(controller:"taskDetailed", action:" list")117 redirect(controller:"taskDetailed", action:"search") 116 118 } 117 119 } -
trunk/grails-app/i18n/messages.properties
r147 r155 46 46 default.paginate.next=Next 47 47 48 # Rich UI plugin - Calendar 49 default.time=Time 50 default.week=Week 51 default.monday=Mon 52 default.tuesday=Tues 53 default.wednesday=Wed 54 default.thursday=Thu 55 default.friday=Fri 56 default.saturday=Sat 57 default.sunday=Sun 58 48 59 # Data binding errors. Use "typeMismatch.$className.$propertyName to customize (eg typeMismatch.Book.author) 49 60 typeMismatch.java.net.URL=Property {0} must be a valid URL -
trunk/grails-app/views/appCore/start.gsp
r147 r155 1 1 <html> 2 2 <head> 3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>4 <meta name="layout" content="main" />5 <title>Start</title>6 <nav:resources override="true"/>7 <resource:tabView skin="tabviewCustom" />3 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 4 <meta name="layout" content="main" /> 5 <title>Start</title> 6 <nav:resources override="true"/> 7 <resource:tabView skin="tabviewCustom" /> 8 8 </head> 9 9 <body> … … 39 39 <table> 40 40 <tbody> 41 41 42 42 <tr class="prop"> 43 43 <td valign="top" class="name"> … … 45 45 </td> 46 46 <td valign="top" class="value"> 47 <g:link controller="taskDetailed" 47 <g:link controller="taskDetailed" 48 48 action="search" 49 params="[ searchMyTodays:'true']">49 params="[quickSearch: 'searchMyTodays']"> 50 50 Today's 51 51 </g:link> … … 53 53 <g:link controller="taskDetailed" 54 54 action="search" 55 params="[ searchMyInTheLastWeek:'true']">55 params="[quickSearch: 'searchMyInTheLastWeek']"> 56 56 In the last week 57 57 </g:link> 58 58 </td> 59 59 </tr> 60 60 61 61 <tr class="prop"> 62 62 <td valign="top" class="name"> … … 65 65 <td valign="top" class="value"> 66 66 <g:link controller="taskDetailed" 67 action="search"> 68 Today's 69 </g:link> 70 <br /> 71 <g:link controller="taskDetailed" 72 action="search" 73 params="[searchInTheLastWeek:'true']"> 74 In the last week 67 action="searchCalendar" 68 params="[quickSearch: 'searchInTheLastWeek']"> 69 Calendar 75 70 </g:link> 76 71 </td> 77 72 </tr> 78 73 74 <!-- More Quick Links: 75 Open Tasks 76 Closed Tasks 77 Tasks I lead. 78 Week calender 79 Recent 80 Today's Entries 81 My Entries. 82 Date ranges--> 83 79 84 </tbody> 80 85 </table> 81 </div> 82 <br /> 83 <br /> 86 </div> <!--End dialog--> 84 87 </richui:tabContent> 85 88 <!-- End Tasks tab --> … … 143 146 </richui:tabContents> 144 147 </richui:tabView> 145 146 </div> 148 149 </div> <!--End body--> 147 150 </body> 148 151 </html> -
trunk/grails-app/views/person/list.gsp
r151 r155 22 22 removeImgFile="bullet_delete.png" 23 23 title="Search"/> 24 25 <div class="paginateButtons"> 26 <filterpane:filterButton text="Search" appliedText="Change Search" /> 27 Results:${personTotal} 28 </div> 29 24 30 <div class="list"> 25 31 <table> … … 56 62 <div class="paginateButtons"> 57 63 <g:paginate total="${personTotal}" params="${filterParams}" /> 58 <filterpane:filterButton text="Search" appliedText="Change Search" />59 Results:${personTotal}60 64 </div> 61 65 … … 63 67 title="Search" 64 68 action="list" 69 class="overlayPane" 65 70 excludeProperties="password, sessionTimeout, emailShow" 66 71 associatedProperties="authorities.authority, personGroups.name" -
trunk/grails-app/views/taskDetailed/search.gsp
r151 r155 5 5 <title>Task Search</title> 6 6 <filterpane:includes /> 7 <g:javascript src="overlayPane.js" /> 7 8 <nav:resources override="true"/> 8 9 </head> … … 29 30 removeImgDir="images" 30 31 removeImgFile="bullet_delete.png" 31 title="Quick Search"/> 32 title="Advanced Search"/> 33 34 <div class="paginateButtons"> 35 <a href='' onclick="showElement('searchPane'); return false;">Quick</a> 36 Results:${taskInstanceTotal} 37 <filterpane:filterButton text="Advanced" appliedText="Advanced" /> 38 </div> 32 39 33 40 <div class="list"> … … 81 88 <div class="paginateButtons"> 82 89 <g:paginate total="${taskInstanceTotal}" params="${filterParams}" /> 83 <filterpane:filterButton text="Search" appliedText="Change Search" />84 Results:${taskInstanceTotal}85 <g:link action="advancedSearch">Goto: Advanced Search</g:link>86 90 </div> 87 91 88 92 <filterpane:filterPane domainBean="Task" 89 title=" QuickSearch"93 title="Advanced Search" 90 94 action="search" 95 class="overlayPane" 91 96 additionalProperties="id" 92 excludeProperties="isActive, comment, targetCompletionDate" 93 associatedProperties="leadPerson.lastName, taskPriority.name" 97 associatedProperties="leadPerson.lastName, taskGroup.name, taskPriority.name" 94 98 filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()], 95 99 'leadPerson.lastName':[values:Person.executeQuery('select t.lastName from Person t')], 100 'taskGroup.name':[values:TaskGroup.list()], 101 targetCompletionDate:[years:2020..2000,precision:'day'], 96 102 targetStartDate:[years:2020..2000,precision:'day']]}"/> 97 </div> <!-- end body div --> 103 </div> <!-- end body --> 104 105 <!-- Start Search Pane --> 106 <div class="overlayPane" id="searchPane" style="display:none;"> 107 <h2>Quick Search</h2> 108 <g:form method="post" id="searchForm" name="searchForm" > 109 <table> 110 <tbody> 111 112 <tr class="prop"> 113 <td valign="top" class="name"> 114 <label>My Tasks:</label> 115 </td> 116 <td valign="top" class="value"> 117 <g:link controller="taskDetailed" 118 action="search" 119 params="[quickSearch: 'searchMyTodays']"> 120 Today's 121 </g:link> 122 <br /> 123 <g:link controller="taskDetailed" 124 action="search" 125 params="[quickSearch: 'searchMyInTheLastWeek']"> 126 In the last week 127 </g:link> 128 </td> 129 </tr> 130 131 <tr class="prop"> 132 <td valign="top" class="name"> 133 <label>Tasks:</label> 134 </td> 135 <td valign="top" class="value"> 136 <g:link controller="taskDetailed" 137 action="search" 138 params="[quickSearch: 'searchTodays']"> 139 Today's 140 </g:link> 141 <br /> 142 <g:link controller="taskDetailed" 143 action="search" 144 params="[quickSearch: 'searchInTheLastWeek']"> 145 In the last week 146 </g:link> 147 </td> 148 </tr> 149 150 </tbody> 151 </table> 152 <div class="buttons"> 153 <span class="button"> 154 <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> 155 </span> 156 <!-- <span class="button"> 157 <input type="button" value="${g.message(code:'fp.tag.filterPane.button.clear.text', default:'Clear')}" onclick="return clearFilterPane('searchForm');" /> 158 </span> 159 <span class="button"> 160 <g:actionSubmit class="search" value="Search" /> 161 </span>--> 162 </div> 163 </g:form> 164 </div> <!-- end search pane --> 165 98 166 </body> 99 167 </html> -
trunk/grails-app/views/taskProcedureDetailed/list.gsp
r151 r155 17 17 <div class="message">${flash.message}</div> 18 18 </g:if> 19 <filterpane:currentCriteria domainBean="TaskProcedure Detailed"19 <filterpane:currentCriteria domainBean="TaskProcedure" 20 20 action="list" 21 21 dateFormat="${'EEE, dd-MMM-yyyy'}" … … 23 23 removeImgFile="bullet_delete.png" 24 24 title="Search"/> 25 26 <div class="paginateButtons"> 27 <filterpane:filterButton text="Search" appliedText="Change Search" /> 28 Results:${taskProcedureInstanceTotal} 29 </div> 30 25 31 <div class="list"> 26 32 <table> … … 66 72 <div class="paginateButtons"> 67 73 <g:paginate total="${taskProcedureInstanceTotal}" params="${filterParams}" /> 68 <filterpane:filterButton text="Search" appliedText="Change Search" />69 Results:${askProcedureInstanceTotal}70 74 </div> 71 75 … … 73 77 title="Search" 74 78 action="list" 79 class="overlayPane" 75 80 excludeProperties="" /> 76 81 </div>
Note: See TracChangeset
for help on using the changeset viewer.