Ignore:
Timestamp:
Apr 7, 2010, 1:49:22 PM (14 years ago)
Author:
gav
Message:

Improve task search and calendar logic.
Move task quick search links to a template.
Set targetCompletionDate when creating task from calendar.
Remove task budget action and view, functionality moved to task search.
Customise calendar css.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/taskDetailed/searchCalendar.gsp

    r474 r476  
    33        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    44        <meta name="layout" content="main" />
    5         <title>Task Search</title>
     5        <title>Task Search Calendar</title>
    66        <filterpane:includes />
    77        <nav:resources override="true"/>
    8         <resource:calendarMonthView />
     8        <resource:calendarMonthView  skin="calendarmonthviewCustom"/>
     9        <export:resource />
    910    </head>
    1011    <body>
     
    1415
    1516        <div class="body">
    16             <g:if test="${params.message}">
    17                 <div class="message">${params.message}</div>
    18             </g:if>
    1917            <g:render template="/shared/messages" />
    20             <g:hasErrors bean="${appCore}">
    21                 <div class="errors">
    22                     <g:renderErrors bean="${appCore}" as="list" />
    23                 </div>
    24             </g:hasErrors>
     18
    2519            <filterpane:currentCriteria domainBean="Task"
    2620                                    action="searchCalendar"
     
    4135            </div>
    4236
    43             <br />
    44             <g:link action="searchCalendar" params="[previousMonth:'true']">
    45                 < Previous
    46             </g:link>
    47             <span style="font-size: 17px; font-weight: bold;">
    48                 <g:formatDate date="${showMonth}" format="MMMM"/>
    49             </span>
    50             <g:link action="searchCalendar" params="[nextMonth:'true']">
    51                 Next >
    52             </g:link>
    53             <br />
     37            <jsUtil:toggleControl toggleId="options"
     38                                                    imageId="optionsImg"
     39                                                    closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}"
     40                                                    openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}"
     41                                                    text="${g.message(code: 'default.options.text')}"
     42                                                    />
     43
     44            <div id="options" style="display:none;">
     45                <g:form method="post" >
     46                    <g:hiddenField name="params" value="${filterParams}" />
     47                    <div class="dialog">
     48                        <table>
     49                            <tbody>
     50
     51                                <tr class="prop">
     52                                    <td valign="top" class="name">
     53                                        <label for="max">Results per page:</label>
     54                                    </td>
     55                                    <td valign="top" class="value">
     56                                        <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/>
     57
     58                                        <span class="buttons">
     59                                            <g:actionSubmit action="setSearchCalendarParamsMax" class="go" value="Update" />
     60                                        </span>
     61                                    </td>
     62                                </tr>
     63
     64                            </tbody>
     65                        </table>
     66                    </div>
     67                <export:formats  params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/>
     68                </g:form>
     69            </div>
     70
    5471            <br />
    5572
    5673            <g:if test="${taskInstanceList.size() > 0}">
     74                    <div class="paginateButtons">
     75                        <g:link action="searchCalendar"
     76                                        params="[showMonth: previousYear.month, showYear: previousYear.year]">
     77                            &lt;&lt;
     78                        </g:link>
     79                        <g:link action="searchCalendar"
     80                                        params="[showMonth: previousMonth.month, showYear: previousMonth.year]">
     81                            &lt;
     82                        </g:link>
     83                        <span class="calendarMonthControlTitle">
     84                            <g:formatDate date="${showDate}" format="MMMM, yyyy"/>
     85                        </span>
     86                        <g:link action="searchCalendar"
     87                                        params="[showMonth: nextMonth.month, showYear: nextMonth.year]">
     88                            &gt;
     89                        </g:link>
     90                        <g:link action="searchCalendar"
     91                                        params="[showMonth: nextYear.month, showYear: nextYear.year]">
     92                            &gt;&gt;
     93                        </g:link>
     94                    </div>
     95                    <div>
     96                        <g:link action="searchCalendar"
     97                                        params="[showMonth: today.month, showYear: today.year]">
     98                            Today: <g:formatDate date="${today.date}" format="MMMM, yyyy"/>
     99                        </g:link>
     100                    </div>
     101                    <br />
     102
    57103                <richui:calendarMonthView items="${taskInstanceList}"
    58104                                                                        createLink="true"
    59105                                                                        constraintDateFields="['targetStartDate']"
    60                                                                         month="${showMonth}"
     106                                                                        month="${showDate}"
    61107                                                                        controller="taskDetailed"
    62108                                                                        action="show"
     
    70116                                    additionalProperties="id"
    71117                                    excludeProperties="trash, comment, targetCompletionDate"
    72                                     associatedProperties="leadPerson.lastName, taskPriority.name"
     118                                    associatedProperties="leadPerson.lastName, leadPerson.firstName, taskPriority.name"
    73119                                    filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()],
    74120                                                                                'leadPerson.lastName':[values:Person.executeQuery('select t.lastName from Person t')],
     121                                                                                'leadPerson.firstName':[values:Person.executeQuery('select distinct t.firstName from Person t')],
    75122                                                                                targetStartDate:[years:2020..2000,precision:'day']]}"/>
    76123
     124            <g:render template="quickSearchPane" />
     125
    77126        </div> <!-- end body div -->
    78 
    79         <!-- Start Search Pane -->
    80         <div class="overlayPane" id="searchPane" style="display:none;">
    81             <h2>Quick Search</h2>
    82             <g:form method="post" id="searchForm" name="searchForm" >
    83                 <table>
    84                     <tbody>
    85 
    86                         <tr class="prop">
    87                             <td valign="top" class="name">
    88                                 <label>My Tasks:</label>
    89                             </td>
    90                             <td valign="top" class="value">
    91                                 <g:link controller="taskDetailed"
    92                                                 action="searchCalendar"
    93                                                 params="[quickSearch: 'searchMyTodays']">
    94                                                 Today's
    95                                 </g:link>
    96                                 <br />
    97                                 <g:link controller="taskDetailed"
    98                                                 action="searchCalendar"
    99                                                 params="[quickSearch: 'searchMyInTheLastWeek']">
    100                                                 In the last week
    101                                 </g:link>
    102                             </td>
    103                         </tr>
    104 
    105                         <tr class="prop">
    106                             <td valign="top" class="name">
    107                                 <label>Tasks:</label>
    108                             </td>
    109                             <td valign="top" class="value">
    110                                 <g:link controller="taskDetailed"
    111                                                 action="searchCalendar"
    112                                                 params="[quickSearch: 'searchTodays']">
    113                                                 Today's
    114                                 </g:link>
    115                                 <br />
    116                                 <g:link controller="taskDetailed"
    117                                                 action="searchCalendar"
    118                                                 params="[quickSearch: 'searchInTheLastWeek']">
    119                                                 In the last week
    120                                 </g:link>
    121                             </td>
    122                         </tr>
    123 
    124                     </tbody>
    125                 </table>
    126                 <div class="buttons">
    127                     <span class="button">
    128                         <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" />
    129                     </span>
    130                 </div>
    131             </g:form>
    132         </div> <!-- end search pane -->
    133 
    134127    </body>
    135128</html>
Note: See TracChangeset for help on using the changeset viewer.