You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2011/06/03 07:06:18 UTC

Re: svn commit: r1130891 - /ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl

Hans,

Thank you for doing this - it is a change I have wanting to make for a 
while. Don't forget that there is a macro for generating the pagination 
markup, so a lot of this code is not necessary.

-Adrian

On 6/3/2011 4:13 AM, hansbak@apache.org wrote:
> Author: hansbak
> Date: Fri Jun  3 03:13:16 2011
> New Revision: 1130891
>
> URL: http://svn.apache.org/viewvc?rev=1130891&view=rev
> Log:
> add paging buttons to the general partylist in party. contribution by antwebsystems employee Tor
>
> 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=1130891&r1=1130890&r2=1130891&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Fri Jun  3 03:13:16 2011
> @@ -45,19 +45,6 @@ under the License.
>     <#else>
>         <li class="expanded"><a href="<@o...@ofbizUrl>" title="${uiLabelMap.CommonHideFields}">&nbsp;</a></li>
>     </#if>
> -<#if (partyListSize>  0)>
> -<#if (partyListSize>  highIndex)>
> -<li><a class="nav-next" href="<@o...@ofbizUrl>">${uiLabelMap.CommonNext}</a></li>
> -<#else>
> -<li class="disabled">${uiLabelMap.CommonNext}</li>
> -</#if>
> -<li>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${partyListSize}</li>
> -<#if (viewIndex>  0)>
> -<li><a class="nav-previous" href="<@o...@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li>
> -<#else>
> -<li class="disabled">${uiLabelMap.CommonPrevious}</li>
> -</#if>
> -</#if>
>       </ul>
>       <br class="clear"/>
>   </#if>
> @@ -220,6 +207,52 @@ 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="<@o...@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='<@o...@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="<@o...@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="<@o...@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='<@o...@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>
>       <table class="basic-table hover-bar" cellspacing="0">
>         <tr class="header-row-2">
>           <td>${uiLabelMap.PartyPartyId}</td>
>
>

Re: svn commit: r1130891 - /ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl

Posted by Hans Bakker <ma...@antwebsystems.com>.
Hi Adrian, thanks for the comment,

we improved the commit at rev 1132558.

Regards,
Hans

On Fri, 2011-06-03 at 06:06 +0100, Adrian Crum wrote:
> Hans,
> 
> Thank you for doing this - it is a change I have wanting to make for a 
> while. Don't forget that there is a macro for generating the pagination 
> markup, so a lot of this code is not necessary.
> 
> -Adrian
> 
> On 6/3/2011 4:13 AM, hansbak@apache.org wrote:
> > Author: hansbak
> > Date: Fri Jun  3 03:13:16 2011
> > New Revision: 1130891
> >
> > URL: http://svn.apache.org/viewvc?rev=1130891&view=rev
> > Log:
> > add paging buttons to the general partylist in party. contribution by antwebsystems employee Tor
> >
> > 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=1130891&r1=1130890&r2=1130891&view=diff
> > ==============================================================================
> > --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
> > +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Fri Jun  3 03:13:16 2011
> > @@ -45,19 +45,6 @@ under the License.
> >     <#else>
> >         <li class="expanded"><a href="<@o...@ofbizUrl>" title="${uiLabelMap.CommonHideFields}">&nbsp;</a></li>
> >     </#if>
> > -<#if (partyListSize>  0)>
> > -<#if (partyListSize>  highIndex)>
> > -<li><a class="nav-next" href="<@o...@ofbizUrl>">${uiLabelMap.CommonNext}</a></li>
> > -<#else>
> > -<li class="disabled">${uiLabelMap.CommonNext}</li>
> > -</#if>
> > -<li>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${partyListSize}</li>
> > -<#if (viewIndex>  0)>
> > -<li><a class="nav-previous" href="<@o...@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li>
> > -<#else>
> > -<li class="disabled">${uiLabelMap.CommonPrevious}</li>
> > -</#if>
> > -</#if>
> >       </ul>
> >       <br class="clear"/>
> >   </#if>
> > @@ -220,6 +207,52 @@ 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="<@o...@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='<@o...@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="<@o...@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="<@o...@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='<@o...@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>
> >       <table class="basic-table hover-bar" cellspacing="0">
> >         <tr class="header-row-2">
> >           <td>${uiLabelMap.PartyPartyId}</td>
> >
> >

-- 
Ofbiz on twitter: http://twitter.com/apache_ofbiz
Myself on twitter: http://twitter.com/hansbak
Antwebsystems.com: Quality services for competitive rates.