Ignore:
Timestamp:
Mar 30, 2010, 7:29:54 PM (14 years ago)
Author:
gav
Message:

Only show table headers in search views if there actually are results.

File:
1 edited

Legend:

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

    r450 r467  
    1414
    1515        <div class="body">
    16             <g:if test="${flash.message}">
    17                 <div class="message">${flash.message}</div>
    18             </g:if>
    1916            <g:if test="${params.message}">
    2017                <div class="message">${params.message}</div>
    2118            </g:if>
     19            <g:render template="/shared/messages" />
    2220            <g:hasErrors bean="${appCore}">
    2321                <div class="errors">
     
    3735                    <a href='' onclick="showElement('searchPane'); return false;">Quick</a>
    3836                </span>
    39                 Results:${taskInstanceTotal}
     37                Results: ${taskInstanceList.size()} / ${taskInstanceTotal}
    4038                <span class="searchButtons">
    4139                    <filterpane:filterButton text="Advanced" appliedText="Advanced" />
    4240                </span>
    4341            </div>
    44             <richui:calendarMonthView items="${taskInstanceList}"
    45                                                                     createLink="true"
    46                                                                     constraintDateFields="['targetStartDate']"
    47                                                                     month="${new Date()}"
    48                                                                     controller="taskDetailed"
    49                                                                     action="show"
    50                                                                     dayAction="create"/>
     42            <g:if test="${taskInstanceList.size() > 0}">
     43                <richui:calendarMonthView items="${taskInstanceList}"
     44                                                                        createLink="true"
     45                                                                        constraintDateFields="['targetStartDate']"
     46                                                                        month="${new Date()}"
     47                                                                        controller="taskDetailed"
     48                                                                        action="show"
     49                                                                        dayAction="create"/>
     50            </g:if>
     51
    5152            <filterpane:filterPane domainBean="Task"
    5253                                    title="Advanced Search"
     
    113114                        <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" />
    114115                    </span>
    115 <!--                    <span class="button">
    116                         <input type="button" value="${g.message(code:'fp.tag.filterPane.button.clear.text', default:'Clear')}" onclick="return clearFilterPane('searchForm');" />
    117                     </span>
    118                     <span class="button">
    119                         <g:actionSubmit class="search" value="Search" />
    120                     </span>-->
    121116                </div>
    122117            </g:form>
    123118        </div> <!-- end search pane -->
    124        
     119
    125120    </body>
    126121</html>
Note: See TracChangeset for help on using the changeset viewer.