| 1 | <html> |
|---|
| 2 | <head> |
|---|
| 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
|---|
| 4 | <meta name="layout" content="main" /> |
|---|
| 5 | <title>Task Search</title> |
|---|
| 6 | <filterpane:includes /> |
|---|
| 7 | <g:javascript src="overlayPane.js" /> |
|---|
| 8 | <nav:resources override="true"/> |
|---|
| 9 | <export:resource /> |
|---|
| 10 | </head> |
|---|
| 11 | <body> |
|---|
| 12 | <div class="nav"> |
|---|
| 13 | <nav:renderSubItems group="nav"/> |
|---|
| 14 | </div> |
|---|
| 15 | |
|---|
| 16 | <div class="body"> |
|---|
| 17 | <g:if test="${flash.message}"> |
|---|
| 18 | <div class="message">${flash.message}</div> |
|---|
| 19 | </g:if> |
|---|
| 20 | <g:if test="${params.message}"> |
|---|
| 21 | <div class="message">${params.message}</div> |
|---|
| 22 | </g:if> |
|---|
| 23 | <g:hasErrors bean="${appCore}"> |
|---|
| 24 | <div class="errors"> |
|---|
| 25 | <g:renderErrors bean="${appCore}" as="list" /> |
|---|
| 26 | </div> |
|---|
| 27 | </g:hasErrors> |
|---|
| 28 | <filterpane:currentCriteria domainBean="Task" |
|---|
| 29 | action="search" |
|---|
| 30 | dateFormat="${'EEE, dd-MMM-yyyy'}" |
|---|
| 31 | removeImgDir="images" |
|---|
| 32 | removeImgFile="bullet_delete.png" |
|---|
| 33 | title="Advanced Search"/> |
|---|
| 34 | |
|---|
| 35 | <div class="paginateButtons"> |
|---|
| 36 | <span class="searchButtons"> |
|---|
| 37 | <a href='' onclick="showElement('searchPane'); return false;">Quick</a> |
|---|
| 38 | </span> |
|---|
| 39 | Results: ${taskInstanceList.size()} / ${taskInstanceTotal} |
|---|
| 40 | <span class="searchButtons"> |
|---|
| 41 | <filterpane:filterButton text="Advanced" appliedText="Advanced" /> |
|---|
| 42 | </span> |
|---|
| 43 | </div> |
|---|
| 44 | |
|---|
| 45 | <jsUtil:toggleControl toggleId="options" |
|---|
| 46 | imageId="optionsImg" |
|---|
| 47 | closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" |
|---|
| 48 | openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" |
|---|
| 49 | text="${g.message(code: 'default.options.text')}" |
|---|
| 50 | /> |
|---|
| 51 | |
|---|
| 52 | <div id="options" style="display:none;"> |
|---|
| 53 | <g:form method="post" > |
|---|
| 54 | <g:hiddenField name="params" value="${filterParams}" /> |
|---|
| 55 | <div class="dialog"> |
|---|
| 56 | <table> |
|---|
| 57 | <tbody> |
|---|
| 58 | |
|---|
| 59 | <tr class="prop"> |
|---|
| 60 | <td valign="top" class="name"> |
|---|
| 61 | <label for="max">Results per page:</label> |
|---|
| 62 | </td> |
|---|
| 63 | <td valign="top" class="value"> |
|---|
| 64 | <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> |
|---|
| 65 | |
|---|
| 66 | <span class="buttons"> |
|---|
| 67 | <g:actionSubmit action="setTaskSearchParamsMax" class="go" value="Update" /> |
|---|
| 68 | </span> |
|---|
| 69 | </td> |
|---|
| 70 | </tr> |
|---|
| 71 | |
|---|
| 72 | </tbody> |
|---|
| 73 | </table> |
|---|
| 74 | </div> |
|---|
| 75 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
|---|
| 76 | </g:form> |
|---|
| 77 | </div> |
|---|
| 78 | |
|---|
| 79 | <br /> |
|---|
| 80 | |
|---|
| 81 | <g:if test="${taskInstanceList.size() > 10}"> |
|---|
| 82 | <div class="paginateButtons"> |
|---|
| 83 | <g:paginate total="${taskInstanceTotal}" params="${filterParams}" /> |
|---|
| 84 | </div> |
|---|
| 85 | </g:if> |
|---|
| 86 | |
|---|
| 87 | <div class="list"> |
|---|
| 88 | <table> |
|---|
| 89 | <thead> |
|---|
| 90 | <tr> |
|---|
| 91 | |
|---|
| 92 | <g:sortableColumn property="id" title="Id" params="${filterParams}" /> |
|---|
| 93 | |
|---|
| 94 | <g:sortableColumn property="targetStartDate" title="Target Start Date" params="${filterParams}" /> |
|---|
| 95 | |
|---|
| 96 | <g:sortableColumn property="description" title="Description" params="${filterParams}" /> |
|---|
| 97 | |
|---|
| 98 | <g:sortableColumn property="leadPerson" title="Lead Person" params="${filterParams}" /> |
|---|
| 99 | |
|---|
| 100 | <g:sortableColumn property="taskPriority" title="Task Priority" params="${filterParams}" /> |
|---|
| 101 | |
|---|
| 102 | <g:sortableColumn property="taskStatus" title="Task Status" params="${filterParams}" /> |
|---|
| 103 | |
|---|
| 104 | <th></th> |
|---|
| 105 | |
|---|
| 106 | </tr> |
|---|
| 107 | </thead> |
|---|
| 108 | <tbody> |
|---|
| 109 | <g:each in="${taskInstanceList}" status="i" var="taskInstance"> |
|---|
| 110 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/taskDetailed/show/${taskInstance.id}"'/> |
|---|
| 111 | |
|---|
| 112 | <td>${fieldValue(bean:taskInstance, field:'id')}</td> |
|---|
| 113 | |
|---|
| 114 | <td><g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td> |
|---|
| 115 | |
|---|
| 116 | <td>${fieldValue(bean:taskInstance, field:'description')}</td> |
|---|
| 117 | |
|---|
| 118 | <td>${fieldValue(bean:taskInstance, field:'leadPerson')}</td> |
|---|
| 119 | |
|---|
| 120 | <td>${fieldValue(bean:taskInstance, field:'taskPriority')}</td> |
|---|
| 121 | |
|---|
| 122 | <td>${fieldValue(bean:taskInstance, field:'taskStatus')}</td> |
|---|
| 123 | |
|---|
| 124 | <td> |
|---|
| 125 | <g:link action="show" id="${taskInstance.id}"> |
|---|
| 126 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
|---|
| 127 | </g:link> |
|---|
| 128 | </td> |
|---|
| 129 | |
|---|
| 130 | </tr> |
|---|
| 131 | </g:each> |
|---|
| 132 | </tbody> |
|---|
| 133 | </table> |
|---|
| 134 | </div> |
|---|
| 135 | <div class="paginateButtons"> |
|---|
| 136 | <g:paginate total="${taskInstanceTotal}" params="${filterParams}" /> |
|---|
| 137 | </div> |
|---|
| 138 | |
|---|
| 139 | <filterpane:filterPane domainBean="Task" |
|---|
| 140 | title="Advanced Search" |
|---|
| 141 | action="search" |
|---|
| 142 | class="overlayPane" |
|---|
| 143 | additionalProperties="id" |
|---|
| 144 | associatedProperties="taskPriority.name, |
|---|
| 145 | leadPerson.lastName, |
|---|
| 146 | leadPerson.firstName, |
|---|
| 147 | taskGroup.name, |
|---|
| 148 | associatedAssets.name, |
|---|
| 149 | primaryAsset.name, |
|---|
| 150 | taskStatus.name, |
|---|
| 151 | taskType.name" |
|---|
| 152 | filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()], |
|---|
| 153 | 'leadPerson.lastName':[values:Person.executeQuery('select distinct t.lastName from Person t')], |
|---|
| 154 | 'leadPerson.firstName':[values:Person.executeQuery('select distinct t.firstName from Person t')], |
|---|
| 155 | 'taskGroup.name':[values:TaskGroup.list()], |
|---|
| 156 | 'associatedAssets.name':[values:Asset.list()], |
|---|
| 157 | 'primaryAsset.name':[values:Asset.list()], |
|---|
| 158 | 'taskStatus.name':[values:TaskStatus.list()], |
|---|
| 159 | 'taskType.name':[values:TaskType.list()], |
|---|
| 160 | targetCompletionDate:[years:2020..2000,precision:'day'], |
|---|
| 161 | targetStartDate:[years:2020..2000,precision:'day'] |
|---|
| 162 | ]}"/> |
|---|
| 163 | </div> <!-- end body --> |
|---|
| 164 | |
|---|
| 165 | <!-- Start Search Pane --> |
|---|
| 166 | <div class="overlayPane" id="searchPane" style="display:none;"> |
|---|
| 167 | <h2>Quick Search</h2> |
|---|
| 168 | <g:form method="post" id="searchForm" name="searchForm" > |
|---|
| 169 | <table> |
|---|
| 170 | <tbody> |
|---|
| 171 | |
|---|
| 172 | <tr class="prop"> |
|---|
| 173 | <td valign="top" class="name"> |
|---|
| 174 | <label>My Tasks:</label> |
|---|
| 175 | </td> |
|---|
| 176 | <td valign="top" class="value"> |
|---|
| 177 | <g:link controller="taskDetailed" |
|---|
| 178 | action="search" |
|---|
| 179 | params="[quickSearch: 'searchMyTodays']"> |
|---|
| 180 | Today's |
|---|
| 181 | </g:link> |
|---|
| 182 | <br /> |
|---|
| 183 | <g:link controller="taskDetailed" |
|---|
| 184 | action="search" |
|---|
| 185 | params="[quickSearch: 'searchMyInTheLastWeek']"> |
|---|
| 186 | In the last week |
|---|
| 187 | </g:link> |
|---|
| 188 | </td> |
|---|
| 189 | </tr> |
|---|
| 190 | |
|---|
| 191 | <tr class="prop"> |
|---|
| 192 | <td valign="top" class="name"> |
|---|
| 193 | <label>Tasks:</label> |
|---|
| 194 | </td> |
|---|
| 195 | <td valign="top" class="value"> |
|---|
| 196 | <g:link controller="taskDetailed" |
|---|
| 197 | action="search" |
|---|
| 198 | params="[quickSearch: 'searchTodays']"> |
|---|
| 199 | Today's |
|---|
| 200 | </g:link> |
|---|
| 201 | <br /> |
|---|
| 202 | <g:link controller="taskDetailed" |
|---|
| 203 | action="search" |
|---|
| 204 | params="[quickSearch: 'searchInTheLastWeek']"> |
|---|
| 205 | In the last week |
|---|
| 206 | </g:link> |
|---|
| 207 | </td> |
|---|
| 208 | </tr> |
|---|
| 209 | |
|---|
| 210 | </tbody> |
|---|
| 211 | </table> |
|---|
| 212 | <div class="buttons"> |
|---|
| 213 | <span class="button"> |
|---|
| 214 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
|---|
| 215 | </span> |
|---|
| 216 | <!-- <span class="button"> |
|---|
| 217 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.clear.text', default:'Clear')}" onclick="return clearFilterPane('searchForm');" /> |
|---|
| 218 | </span> |
|---|
| 219 | <span class="button"> |
|---|
| 220 | <g:actionSubmit class="search" value="Search" /> |
|---|
| 221 | </span>--> |
|---|
| 222 | </div> |
|---|
| 223 | </g:form> |
|---|
| 224 | </div> <!-- end search pane --> |
|---|
| 225 | |
|---|
| 226 | </body> |
|---|
| 227 | </html> |
|---|