Ignore:
Timestamp:
Feb 8, 2010, 4:30:14 AM (14 years ago)
Author:
gav
Message:

Add options control to asset search view.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/assetDetailed/search.gsp

    r284 r326  
    2525
    2626            <div class="paginateButtons">
     27                Results: ${assetInstanceList.size()} / ${assetInstanceTotal}
    2728                <span class="searchButtons">
    2829                    <filterpane:filterButton text="Search" appliedText="Change Search" />
    2930                </span>
    30                 Results:${assetInstanceTotal}
    3131            </div>
     32
     33            <jsUtil:toggleControl toggleId="options"
     34                                                    imageId="optionsImg"
     35                                                    closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}"
     36                                                    openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}"
     37                                                    text="${g.message(code: 'default.options.text')}"
     38                                                    />
     39
     40            <div id="options" style="display:none;">
     41                <g:form method="post" >
     42                    <g:hiddenField name="params" value="${filterParams}" />
     43                    <div class="dialog">
     44                        <table>
     45                            <tbody>
     46
     47                                <tr class="prop">
     48                                    <td valign="top" class="name">
     49                                        <label for="max">Results per page:</label>
     50                                    </td>
     51                                    <td valign="top" class="value">
     52                                        <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/>
     53
     54                                        <span class="buttons">
     55                                            <g:actionSubmit action="setSearchParamsMax" class="go" value="Update" />
     56                                        </span>
     57                                    </td>
     58                                </tr>
     59
     60                                <tr class="prop">
     61                                    <td valign="top" class="name">
     62                                        <label for="max">Asset Tree:</label>
     63                                    </td>
     64                                    <td valign="top" class="value">
     65                                        <g:link action="exportAssetTree">
     66                                            Export
     67                                        </g:link>
     68                                        /
     69                                        <g:link action="exportAssetTreeTemplate">
     70                                            Template
     71                                        </g:link>
     72                                        /
     73                                        <g:link action="importAssetTree">
     74                                            Import
     75                                        </g:link>
     76                                    </td>
     77                                </tr>
     78
     79                            </tbody>
     80                        </table>
     81                    </div>
     82                </g:form>
     83                <export:formats  params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/>
     84            </div>
     85
     86            <br />
     87
     88            <g:if test="${assetInstanceList.size() > 10}">
     89                <div class="paginateButtons">
     90                    <g:paginate total="${assetInstanceTotal}" params="${filterParams}" />
     91                </div>
     92            </g:if>
    3293
    3394            <div class="list">
     
    78139                <g:paginate total="${assetInstanceTotal}" params="${filterParams}" />
    79140            </div>
    80             <export:formats  params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/>
    81             <br />
    82             Asset Tree:
    83             <g:link action="exportAssetTree">
    84                 Export
    85             </g:link>
    86             /
    87             <g:link action="exportAssetTreeTemplate">
    88                 Template
    89             </g:link>
    90             /
    91             <g:link action="importAssetTree">
    92                 Import
    93             </g:link>
    94141
    95142            <filterpane:filterPane domainBean="Asset"
Note: See TracChangeset for help on using the changeset viewer.