Author: adrianc
Date: Wed Jul 8 20:28:01 2009 New Revision: 792295 URL: http://svn.apache.org/viewvc?rev=792295&view=rev Log: Cleaned up cluttered and confusing FindGeneric screen in WebTools. Added: ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl (with props) Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl ofbiz/trunk/framework/webtools/widget/EntityScreens.xml Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl?rev=792295&r1=792294&r2=792295&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl (original) +++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/FindGeneric.ftl Wed Jul 8 20:28:01 2009 @@ -16,41 +16,14 @@ specific language governing permissions and limitations under the License. --> -<div class="screenlet"> - <div class="screenlet-title-bar"> - <ul> - <li class="h3">${uiLabelMap.WebtoolsFindValues}</li> - </ul> - <br class="clear"/> - </div> - <div class="screenlet-body"> - <h2>${uiLabelMap.WebtoolsForEntity}: ${entityName}</h2> - <br/> - <div class="button-bar"> - <a href="<@ofbizUrl>entitymaint</@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsBackToEntityList}</a> - <a href="<@ofbizUrl>ViewRelations?entityName=${entityName}</@ofbizUrl>" class="smallSubmit">${uiLabelMap.WebtoolsViewRelations}</a> - <a href="<@ofbizUrl>FindGeneric?entityName=${entityName}&find=true&VIEW_SIZE=50&VIEW_INDEX=0</@ofbizUrl>" class="smallSubmit">${uiLabelMap.CommonFind} ${uiLabelMap.CommonAll}</a> - <#if hasCreatePermission == 'Y'> - <a href="<@ofbizUrl>ViewGeneric?entityName=${entityName}</@ofbizUrl>" class="smallSubmit">${uiLabelMap.CommonCreateNew} ${entityName}</a> - </#if> - </div> - <br/> - <div class="screenlet"> - <div class="screenlet-title-bar"> - <ul> - <li class="h3">${uiLabelMap.WebtoolsToFindAll} ${entityName}, ${uiLabelMap.WebtoolsLeaveAllEntriesBlank}.</li> - </ul> - <br class="clear"/> - </div> - <div class="screenlet-body"> <form method="post" action="<@ofbizUrl>FindGeneric?entityName=${entityName}</@ofbizUrl>"> <input type="hidden" name="find" value="true"> <table class="basic-table hover-bar" cellspacing="0"> - <tr class="header-row"> + <tr class="header-row-2"> <td>${uiLabelMap.WebtoolsFieldName}</td> <td>${uiLabelMap.WebtoolsPk}</td> <td>${uiLabelMap.WebtoolsFieldType}</td> - <td><input type="submit" value="${uiLabelMap.CommonFind}"></td> + <td> </td> </tr> <#assign alt_row = false> <#list fieldList as field> @@ -63,96 +36,8 @@ <#assign alt_row = !alt_row> </#list> <tr> - <td colspan="3"> </td> + <td colspan="3"><h3>${uiLabelMap.WebtoolsToFindAll} ${entityName}, ${uiLabelMap.WebtoolsLeaveAllEntriesBlank}</h3></td> <td><input type="submit" value="${uiLabelMap.CommonFind}"></td> </tr> </table> </form> - <br/> - - <#if hasCreatePermission == 'Y'> - <div class="button-bar"> - <a href='<@ofbizUrl>ViewGeneric?entityName=${entityName}</@ofbizUrl>' class="smallSubmit">${uiLabelMap.CommonCreateNew} ${entityName}</a> - </div> - </#if> - - <#macro tableNav> - <div class="button-bar"> - <ul> - <#if (viewIndex > 0)> - <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexFirst}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonFirst}</a></li> - <li>|</li> - <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexPrevious}</@ofbizUrl>' class="nav-previous">${uiLabelMap.CommonPrevious}</a></li> - <li>|</li> - </#if> - <#if (arraySize > 0)> - <li>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${arraySize}</li> - </#if> - <#if (arraySize > highIndex)> - <li>|</li> - <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexNext}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonNext}</a></li> - <li>|</li> - <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexLast}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonLast}</a></li> - </#if> - </ul> - <br class="clear"/> - </div> - </#macro> - <#if (arraySize > 0)> - <@tableNav/> - </#if> - </div> - </div> - <div class="screenlet"> - <div class="screenlet-title-bar"> - <ul> - <li class="h3">${uiLabelMap.WebtoolsFindValuesResults}</li> - </ul> - <br class="clear"/> - </div> - <div class="screenlet-body"> - <table class="basic-table hover-bar" cellspacing="0"> - <tr class="header-row"> - <td> </td> - <#list fieldList as field> - <td>${field.name}</td> - </#list> - </tr> - <#if resultPartialList?has_content> - <#assign alt_row = false> - <#list records as record> - <tr<#if alt_row> class="alternate-row"</#if>> - <td class="button-col"> - <a href='<@ofbizUrl>ViewGeneric?${record.findString}</@ofbizUrl>'>${uiLabelMap.CommonView}</a> - <#if hasDeletePermission == 'Y'> - <a href='<@ofbizUrl>UpdateGeneric?${record.findString}&UPDATE_MODE=DELETE</@ofbizUrl>'>${uiLabelMap.CommonDelete}</a> - </#if> - </td> - <#list fieldList as field> - <td>${record.fields.get(field.name)?if_exists?string}</td> - </#list> - </tr> - <#assign alt_row = !alt_row> - </#list> - <#else> - <tr> - <td colspan="${columnCount}"> - <h2>${uiLabelMap.WebtoolsNoRecordsFound} ${entityName}.</h2> - </td> - </tr> - </#if> - </table> - - <#if (arraySize > 0)> - <@tableNav/> - </#if> - - <#if hasCreatePermission == 'Y'> - <a href='<@ofbizUrl>ViewGeneric?entityName=${entityName}</@ofbizUrl>' class="smallSubmit">${uiLabelMap.CommonCreateNew} ${entityName}</a> - <#else> - <h2>${uiLabelMap.WebtoolsEntityCretePermissionError} ${entityName} ${plainTableName}.</h2> - </#if> - </div> - </div> - </div> -</div> Added: ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl?rev=792295&view=auto ============================================================================== --- ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl (added) +++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl Wed Jul 8 20:28:01 2009 @@ -0,0 +1,77 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + <#macro tableNav> + <div class="nav-pager"> + <ul> + <#if (viewIndex > 0)> + <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexFirst}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonFirst}</a></li> + <li>|</li> + <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexPrevious}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>' class="nav-previous">${uiLabelMap.CommonPrevious}</a></li> + <li>|</li> + </#if> + <#if (arraySize > 0)> + <li>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${arraySize}</li> + </#if> + <#if (arraySize > highIndex)> + <li>|</li> + <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexNext}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonNext}</a></li> + <li>|</li> + <li><a href='<@ofbizUrl>FindGeneric?${curFindString}&VIEW_SIZE=${viewSize}&VIEW_INDEX=${viewIndexLast}&searchOptions_collapsed=${(parameters.searchOptions_collapsed)?default("false")}</@ofbizUrl>' class="nav-next">${uiLabelMap.CommonLast}</a></li> + </#if> + </ul> + <br class="clear"/> + </div> + </#macro> + <#if (arraySize > 0)> + <@tableNav/> + </#if> + <table class="basic-table hover-bar" cellspacing="0"> + <tr class="header-row-2"> + <td> </td> + <#list fieldList as field> + <td>${field.name}</td> + </#list> + </tr> + <#if resultPartialList?has_content> + <#assign alt_row = false> + <#list records as record> + <tr<#if alt_row> class="alternate-row"</#if>> + <td class="button-col"> + <a href='<@ofbizUrl>ViewGeneric?${record.findString}</@ofbizUrl>'>${uiLabelMap.CommonView}</a> + <#if hasDeletePermission == 'Y'> + <a href='<@ofbizUrl>UpdateGeneric?${record.findString}&UPDATE_MODE=DELETE</@ofbizUrl>'>${uiLabelMap.CommonDelete}</a> + </#if> + </td> + <#list fieldList as field> + <td>${record.fields.get(field.name)?if_exists?string}</td> + </#list> + </tr> + <#assign alt_row = !alt_row> + </#list> + <#else> + <tr> + <td colspan="${columnCount}"> + <h2>${uiLabelMap.WebtoolsNoRecordsFound} ${entityName}.</h2> + </td> + </tr> + </#if> + </table> + <#if (arraySize > 0)> + <@tableNav/> + </#if> Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/framework/webtools/webapp/webtools/entity/ListGeneric.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/framework/webtools/widget/EntityScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/EntityScreens.xml?rev=792295&r1=792294&r2=792295&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/EntityScreens.xml (original) +++ ofbiz/trunk/framework/webtools/widget/EntityScreens.xml Wed Jul 8 20:28:01 2009 @@ -204,14 +204,35 @@ <actions> <script location="component://webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy"/> <property-map resource="WebtoolsUiLabels" map-name="uiLabelMap"/> - <set field="title" value="${uiLabelMap.WebtoolsFindValues}: ${entityName}"/> + <set field="title" value="${uiLabelMap.WebtoolsFindValues} ${uiLabelMap.WebtoolsForEntity}: ${entityName}"/> </actions> <widgets> <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <platform-specific> - <html><html-template location="component://webtools/webapp/webtools/entity/FindGeneric.ftl"/></html> - </platform-specific> + <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml"> + <decorator-section name="menu-bar"> + <container style="button-bar"> + <link target="entitymaint" text="${uiLabelMap.WebtoolsBackToEntityList}" style="buttontext"/> + <link target="ViewRelations" text="${uiLabelMap.WebtoolsViewRelations}" style="buttontext"> + <parameter param-name="entityName" from-field="entityName"/> + </link> + <link target="ViewGeneric" text="${uiLabelMap.CommonCreateNew}" style="buttontext"> + <parameter param-name="entityName" from-field="entityName"/> + <parameter param-name="enableEdit" value="true"/> + </link> + </container> + </decorator-section> + <decorator-section name="search-options"> + <platform-specific> + <html><html-template location="component://webtools/webapp/webtools/entity/FindGeneric.ftl"/></html> + </platform-specific> + </decorator-section> + <decorator-section name="search-results"> + <platform-specific> + <html><html-template location="component://webtools/webapp/webtools/entity/ListGeneric.ftl"/></html> + </platform-specific> + </decorator-section> + </decorator-screen> </decorator-section> </decorator-screen> </widgets> |
Free forum by Nabble | Edit this page |