Author: hansbak
Date: Mon Jun 6 09:18:13 2011 New Revision: 1132558 URL: http://svn.apache.org/viewvc?rev=1132558&view=rev Log: improvement of commit 1130891 following a comment from Adrian: partylist paging Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=1132558&r1=1132557&r2=1132558&view=diff ============================================================================== --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original) +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Mon Jun 6 09:18:13 2011 @@ -16,7 +16,6 @@ KIND, either express or implied. See th specific language governing permissions and limitations under the License. --> - <#assign extInfo = parameters.extInfo?default("N")> <#assign inventoryItemId = parameters.inventoryItemId?default("")> <#assign serialNumber = parameters.serialNumber?default("")> @@ -207,52 +206,16 @@ under the License. <h2>${uiLabelMap.CommonSearchResults}</h2> </div> <#if partyList?has_content> - <div class="nav-pager"> - <ul> - <#if (viewIndex > 0)> - <li class="nav-first"><a href="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&hideFields=${hideFields}${paramList}&VIEW_INDEX=0</@ofbizUrl>">${uiLabelMap.CommonFirst}</a></li> - <#else> - <li class="nav-first-disabled"><span>${uiLabelMap.CommonFirst}</span></li> - </#if> - <#if (viewIndex > 0)> - <li class="nav-previous"><a href="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&hideFields=${hideFields}${paramList}&VIEW_INDEX=${viewIndex - 1}</@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li> - <#else> - <li class="nav-previous-disabled"><span>${uiLabelMap.CommonPrevious}</span></li> - </#if> - <li class="nav-page-select"> - ${uiLabelMap.CommonPage} - <select onchange="location.href='<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&hideFields=${hideFields}${paramList}</@ofbizUrl>&VIEW_INDEX=' + this.value;" size="1" name="page"> - <#assign indexSize = partyListSize/viewSize /> - <#list 0..indexSize as index> - <option value="${index}" <#if viewIndex == index>selected="selected"</#if>>${index+1}</option> - <#assign lastIndex = index/> - </#list> - </select> - </li> - <#if (partyListSize > highIndex)> - <li class="nav-next"><a href="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&hideFields=${hideFields}${paramList}&VIEW_INDEX=${viewIndex+1}</@ofbizUrl>">${uiLabelMap.CommonNext}</a></li> - <#else> - <li class="nav-next-disabled"><span>${uiLabelMap.CommonNext}</span></li> - </#if> - <#if (partyListSize > highIndex)> - <li class="nav-last"><a href="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&hideFields=${hideFields}${paramList}&VIEW_INDEX=${lastIndex}</@ofbizUrl>">${uiLabelMap.CommonLast}</a></li> - <#else> - <li class="nav-last-disabled"><span>${uiLabelMap.CommonLast}</span></li> - </#if> - <li class="nav-pagesize"> - <select name="pageSize" size="1" onchange="location.href='<@ofbizUrl>findparty?hideFields=${hideFields}${paramList}&VIEW_INDEX=0</@ofbizUrl>&VIEW_SIZE=' + this.value;"> - <option <#if viewSize == 20>selected="selected"</#if> value="20">20</option> - <option <#if viewSize == 30>selected="selected"</#if> value="30">30</option> - <option <#if viewSize == 50>selected="selected"</#if> value="50">50</option> - <option <#if viewSize == 100>selected="selected"</#if> value="100">100</option> - <option <#if viewSize == 200>selected="selected"</#if> value="200">200</option> - </select> ${uiLabelMap.CommonItemsPerPage}</li> - <#assign lowCount = lowIndex/> - <#assign highCount = highIndex/> - <#assign total = partyListSize/> - <li class="nav-displaying">${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${partyListSize}</li> - </ul> - </div> + <#-- Pagination --> + <#include "component://common/webcommon/includes/htmlTemplate.ftl"/> + <#assign commonUrl = "findparty?hideFields=" + hideFields + paramList + "&"/> + <#assign viewIndexFirst = 0/> + <#assign viewIndexPrevious = viewIndex - 1/> + <#assign viewIndexNext = viewIndex + 1/> + <#assign viewIndexLast = Static["java.lang.Math"].floor(partyListSize/viewSize)/> + <#assign messageMap = Static["org.ofbiz.base.util.UtilMisc"].toMap("lowCount", lowIndex, "highCount", highIndex, "total", partyListSize)/> + <#assign commonDisplaying = Static["org.ofbiz.base.util.UtilProperties"].getMessage("CommonUiLabels", "CommonDisplaying", messageMap, locale)/> + <@nextPrev commonUrl=commonUrl ajaxEnabled=false javaScriptEnabled=false paginateStyle="nav-pager" paginateFirstStyle="nav-first" viewIndex=viewIndex highIndex=highIndex listSize=partyListSize viewSize=viewSize ajaxFirstUrl="" firstUrl="" paginateFirstLabel="" paginatePreviousStyle="nav-previous" ajaxPreviousUrl="" previousUrl="" paginatePreviousLabel="" pageLabel="" ajaxSelectUrl="" selectUrl="" ajaxSelectSizeUrl="" selectSizeUrl="" commonDisplaying=commonDisplaying paginateNextStyle="nav-next" ajaxNextUrl="" nextUrl="" paginateNextLabel="" paginateLastStyle="nav-last" ajaxLastUrl="" lastUrl="" paginateLastLabel="" paginateViewSizeLabel="" /> <table class="basic-table hover-bar" cellspacing="0"> <tr class="header-row-2"> <td>${uiLabelMap.PartyPartyId}</td> |
Free forum by Nabble | Edit this page |