Index: trunk/grails-app/views/taskDetailed/searchCalendar.gsp
===================================================================
--- trunk/grails-app/views/taskDetailed/searchCalendar.gsp	(revision 474)
+++ trunk/grails-app/views/taskDetailed/searchCalendar.gsp	(revision 476)
@@ -3,8 +3,9 @@
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
         <meta name="layout" content="main" />
-        <title>Task Search</title>
+        <title>Task Search Calendar</title>
         <filterpane:includes />
         <nav:resources override="true"/>
-        <resource:calendarMonthView />
+        <resource:calendarMonthView  skin="calendarmonthviewCustom"/>
+        <export:resource />
     </head>
     <body>
@@ -14,13 +15,6 @@
 
         <div class="body">
-            <g:if test="${params.message}">
-                <div class="message">${params.message}</div>
-            </g:if>
             <g:render template="/shared/messages" />
-            <g:hasErrors bean="${appCore}">
-                <div class="errors">
-                    <g:renderErrors bean="${appCore}" as="list" />
-                </div>
-            </g:hasErrors>
+
             <filterpane:currentCriteria domainBean="Task"
                                     action="searchCalendar"
@@ -41,22 +35,74 @@
             </div>
 
-            <br />
-            <g:link action="searchCalendar" params="[previousMonth:'true']">
-                < Previous
-            </g:link>
-            <span style="font-size: 17px; font-weight: bold;">
-                <g:formatDate date="${showMonth}" format="MMMM"/>
-            </span>
-            <g:link action="searchCalendar" params="[nextMonth:'true']">
-                Next >
-            </g:link>
-            <br />
+            <jsUtil:toggleControl toggleId="options"
+                                                    imageId="optionsImg"
+                                                    closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}"
+                                                    openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}"
+                                                    text="${g.message(code: 'default.options.text')}"
+                                                    />
+
+            <div id="options" style="display:none;">
+                <g:form method="post" >
+                    <g:hiddenField name="params" value="${filterParams}" />
+                    <div class="dialog">
+                        <table>
+                            <tbody>
+
+                                <tr class="prop">
+                                    <td valign="top" class="name">
+                                        <label for="max">Results per page:</label>
+                                    </td>
+                                    <td valign="top" class="value">
+                                        <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/>
+
+                                        <span class="buttons">
+                                            <g:actionSubmit action="setSearchCalendarParamsMax" class="go" value="Update" />
+                                        </span>
+                                    </td>
+                                </tr>
+
+                            </tbody>
+                        </table>
+                    </div>
+                <export:formats  params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/>
+                </g:form>
+            </div>
+
             <br />
 
             <g:if test="${taskInstanceList.size() > 0}">
+                    <div class="paginateButtons">
+                        <g:link action="searchCalendar"
+                                        params="[showMonth: previousYear.month, showYear: previousYear.year]">
+                            &lt;&lt;
+                        </g:link>
+                        <g:link action="searchCalendar"
+                                        params="[showMonth: previousMonth.month, showYear: previousMonth.year]">
+                            &lt;
+                        </g:link>
+                        <span class="calendarMonthControlTitle">
+                            <g:formatDate date="${showDate}" format="MMMM, yyyy"/>
+                        </span>
+                        <g:link action="searchCalendar"
+                                        params="[showMonth: nextMonth.month, showYear: nextMonth.year]">
+                            &gt;
+                        </g:link>
+                        <g:link action="searchCalendar"
+                                        params="[showMonth: nextYear.month, showYear: nextYear.year]">
+                            &gt;&gt;
+                        </g:link>
+                    </div>
+                    <div>
+                        <g:link action="searchCalendar"
+                                        params="[showMonth: today.month, showYear: today.year]">
+                            Today: <g:formatDate date="${today.date}" format="MMMM, yyyy"/>
+                        </g:link>
+                    </div>
+                    <br />
+
                 <richui:calendarMonthView items="${taskInstanceList}"
                                                                         createLink="true"
                                                                         constraintDateFields="['targetStartDate']"
-                                                                        month="${showMonth}"
+                                                                        month="${showDate}"
                                                                         controller="taskDetailed"
                                                                         action="show"
@@ -70,66 +116,13 @@
                                     additionalProperties="id"
                                     excludeProperties="trash, comment, targetCompletionDate"
-                                    associatedProperties="leadPerson.lastName, taskPriority.name"
+                                    associatedProperties="leadPerson.lastName, leadPerson.firstName, taskPriority.name"
                                     filterPropertyValues="${['taskPriority.name':[values:TaskPriority.list()],
                                                                                 'leadPerson.lastName':[values:Person.executeQuery('select t.lastName from Person t')],
+                                                                                'leadPerson.firstName':[values:Person.executeQuery('select distinct t.firstName from Person t')],
                                                                                 targetStartDate:[years:2020..2000,precision:'day']]}"/>
 
+            <g:render template="quickSearchPane" />
+
         </div> <!-- end body div -->
-
-        <!-- Start Search Pane -->
-        <div class="overlayPane" id="searchPane" style="display:none;">
-            <h2>Quick Search</h2>
-            <g:form method="post" id="searchForm" name="searchForm" >
-                <table>
-                    <tbody>
-
-                        <tr class="prop">
-                            <td valign="top" class="name">
-                                <label>My Tasks:</label>
-                            </td>
-                            <td valign="top" class="value">
-                                <g:link controller="taskDetailed"
-                                                action="searchCalendar"
-                                                params="[quickSearch: 'searchMyTodays']">
-                                                Today's
-                                </g:link>
-                                <br />
-                                <g:link controller="taskDetailed" 
-                                                action="searchCalendar"
-                                                params="[quickSearch: 'searchMyInTheLastWeek']">
-                                                In the last week
-                                </g:link>
-                            </td>
-                        </tr>
-
-                        <tr class="prop">
-                            <td valign="top" class="name">
-                                <label>Tasks:</label>
-                            </td>
-                            <td valign="top" class="value">
-                                <g:link controller="taskDetailed"
-                                                action="searchCalendar"
-                                                params="[quickSearch: 'searchTodays']">
-                                                Today's
-                                </g:link>
-                                <br />
-                                <g:link controller="taskDetailed" 
-                                                action="searchCalendar"
-                                                params="[quickSearch: 'searchInTheLastWeek']">
-                                                In the last week
-                                </g:link>
-                            </td>
-                        </tr>
-
-                    </tbody>
-                </table>
-                <div class="buttons">
-                    <span class="button">
-                        <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" />
-                    </span>
-                </div>
-            </g:form>
-        </div> <!-- end search pane -->
-
     </body>
 </html>
