Fwd: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml

Si Chen-2
Hey guys -

Couldn't this be written as
<#list 1..10 as i>
<#assign expireYear = thisYear + i>
<option value="${expireYear}">${expireYear}</option>
</#list>

instead?  See: http://www.freemarker.org/docs/ref_directive_list.html

Begin forwarded message:

> From: [hidden email]
> Date: December 7, 2006 2:17:01 AM PST
> To: [hidden email]
> Subject: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/
> common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml
> Reply-To: [hidden email]
>
> Author: jleroux
> Date: Thu Dec  7 02:17:00 2006
> New Revision: 483403
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=483403
> Log:
> A patch from Anil K Patel "Expire credit card years" (https://
> issues.apache.org/jira/browse/OFBIZ-188).
>
> Modified:
>     incubator/ofbiz/trunk/framework/common/webcommon/includes/
> ccyears.ftl
>     incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
>
> Modified: incubator/ofbiz/trunk/framework/common/webcommon/includes/
> ccyears.ftl
> URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/ 
> common/webcommon/includes/ccyears.ftl?
> view=diff&rev=483403&r1=483402&r2=483403
> ======================================================================
> ========
> --- incubator/ofbiz/trunk/framework/common/webcommon/includes/
> ccyears.ftl (original)
> +++ incubator/ofbiz/trunk/framework/common/webcommon/includes/
> ccyears.ftl Thu Dec  7 02:17:00 2006
> @@ -14,12 +14,15 @@
>  License for the specific language governing permissions and  
> limitations
>  under the License.
>  -->
> +<#assign stringYear = thisDate?string("yyyy")>
> +<#assign thisYear = stringYear?number>
> +
>  <option></option>
> -<option value="2005">2005</option>
> -<option value="2006">2006</option>
> -<option value="2007">2007</option>
> -<option value="2008">2008</option>
> -<option value="2009">2009</option>
> -<option value="2010">2010</option>
> -<option value="2011">2011</option>
> -<option value="2012">2012</option>
> +<option value="${thisYear}">${thisYear}</option>
> +<option value="${thisYear + 1}">${thisYear + 1}</option>
> +<option value="${thisYear + 2}">${thisYear + 2}</option>
> +<option value="${thisYear + 3}">${thisYear + 3}</option>
> +<option value="${thisYear + 4}">${thisYear + 4}</option>
> +<option value="${thisYear + 5}">${thisYear + 5}</option>
> +<option value="${thisYear + 6}">${thisYear + 6}</option>
> +<option value="${thisYear + 7}">${thisYear + 7}</option>
>
> Modified: incubator/ofbiz/trunk/framework/common/widget/
> CommonScreens.xml
> URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/ 
> common/widget/CommonScreens.xml?
> view=diff&rev=483403&r1=483402&r2=483403
> ======================================================================
> ========
> --- incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml  
> (original)
> +++ incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml  
> Thu Dec  7 02:17:00 2006
> @@ -51,6 +51,9 @@
>      </screen>
>      <screen name="ccyears">
>          <section>
> +            <actions>
> +                <set field="thisDate" from-field="nowTimestamp"/>
> +            </actions>
>              <widgets>
>                  <platform-specific><html><html-template  
> location="component://common/webcommon/includes/ccyears.ftl"/></
> html></platform-specific>
>              </widgets>
>

Best Regards,

Si
[hidden email]



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml

Jacques Le Roux
Administrator
Si,

Yes I guess, now that we have passed the century (and the millennium). If eveybody is ok (ie nobody complain) I will convert it
but I will change to
<#list 0..10 as i>
    <#assign expireYear = thisYear + i>
    <option value="${expireYear}">${expireYear}</option>
</#list>

Jacques

----- Original Message -----
From: "Si Chen" <[hidden email]>
To: <[hidden email]>
Sent: Friday, December 08, 2006 10:06 PM
Subject: Fwd: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/ccyears.ftl
widget/CommonScreens.xml


> Hey guys -
>
> Couldn't this be written as
> <#list 1..10 as i>
> <#assign expireYear = thisYear + i>
> <option value="${expireYear}">${expireYear}</option>
> </#list>
>
> instead?  See: http://www.freemarker.org/docs/ref_directive_list.html
>
> Begin forwarded message:
>
> > From: [hidden email]
> > Date: December 7, 2006 2:17:01 AM PST
> > To: [hidden email]
> > Subject: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/
> > common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml
> > Reply-To: [hidden email]
> >
> > Author: jleroux
> > Date: Thu Dec  7 02:17:00 2006
> > New Revision: 483403
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=483403
> > Log:
> > A patch from Anil K Patel "Expire credit card years" (https://
> > issues.apache.org/jira/browse/OFBIZ-188).
> >
> > Modified:
> >     incubator/ofbiz/trunk/framework/common/webcommon/includes/
> > ccyears.ftl
> >     incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
> >
> > Modified: incubator/ofbiz/trunk/framework/common/webcommon/includes/
> > ccyears.ftl
> > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/
> > common/webcommon/includes/ccyears.ftl?
> > view=diff&rev=483403&r1=483402&r2=483403
> > ======================================================================
> > ========
> > --- incubator/ofbiz/trunk/framework/common/webcommon/includes/
> > ccyears.ftl (original)
> > +++ incubator/ofbiz/trunk/framework/common/webcommon/includes/
> > ccyears.ftl Thu Dec  7 02:17:00 2006
> > @@ -14,12 +14,15 @@
> >  License for the specific language governing permissions and
> > limitations
> >  under the License.
> >  -->
> > +<#assign stringYear = thisDate?string("yyyy")>
> > +<#assign thisYear = stringYear?number>
> > +
> >  <option></option>
> > -<option value="2005">2005</option>
> > -<option value="2006">2006</option>
> > -<option value="2007">2007</option>
> > -<option value="2008">2008</option>
> > -<option value="2009">2009</option>
> > -<option value="2010">2010</option>
> > -<option value="2011">2011</option>
> > -<option value="2012">2012</option>
> > +<option value="${thisYear}">${thisYear}</option>
> > +<option value="${thisYear + 1}">${thisYear + 1}</option>
> > +<option value="${thisYear + 2}">${thisYear + 2}</option>
> > +<option value="${thisYear + 3}">${thisYear + 3}</option>
> > +<option value="${thisYear + 4}">${thisYear + 4}</option>
> > +<option value="${thisYear + 5}">${thisYear + 5}</option>
> > +<option value="${thisYear + 6}">${thisYear + 6}</option>
> > +<option value="${thisYear + 7}">${thisYear + 7}</option>
> >
> > Modified: incubator/ofbiz/trunk/framework/common/widget/
> > CommonScreens.xml
> > URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/
> > common/widget/CommonScreens.xml?
> > view=diff&rev=483403&r1=483402&r2=483403
> > ======================================================================
> > ========
> > --- incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
> > (original)
> > +++ incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
> > Thu Dec  7 02:17:00 2006
> > @@ -51,6 +51,9 @@
> >      </screen>
> >      <screen name="ccyears">
> >          <section>
> > +            <actions>
> > +                <set field="thisDate" from-field="nowTimestamp"/>
> > +            </actions>
> >              <widgets>
> >                  <platform-specific><html><html-template
> > location="component://common/webcommon/includes/ccyears.ftl"/></
> > html></platform-specific>
> >              </widgets>
> >
>
> Best Regards,
>
> Si
> [hidden email]
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml

Si Chen-2
Oh yeah--of course it should be list 0..10 not 1..10  Thanks for  
thinking of that.

On Dec 8, 2006, at 1:30 PM, Jacques Le Roux wrote:

> Si,
>
> Yes I guess, now that we have passed the century (and the  
> millennium). If eveybody is ok (ie nobody complain) I will convert it
> but I will change to
> <#list 0..10 as i>
>     <#assign expireYear = thisYear + i>
>     <option value="${expireYear}">${expireYear}</option>
> </#list>
>
> Jacques
>
> ----- Original Message -----
> From: "Si Chen" <[hidden email]>
> To: <[hidden email]>
> Sent: Friday, December 08, 2006 10:06 PM
> Subject: Fwd: svn commit: r483403 - in /incubator/ofbiz/trunk/
> framework/common: webcommon/includes/ccyears.ftl
> widget/CommonScreens.xml
>
>
>> Hey guys -
>>
>> Couldn't this be written as
>> <#list 1..10 as i>
>> <#assign expireYear = thisYear + i>
>> <option value="${expireYear}">${expireYear}</option>
>> </#list>
>>
>> instead?  See: http://www.freemarker.org/docs/ref_directive_list.html
>>
>> Begin forwarded message:
>>
>>> From: [hidden email]
>>> Date: December 7, 2006 2:17:01 AM PST
>>> To: [hidden email]
>>> Subject: svn commit: r483403 - in /incubator/ofbiz/trunk/framework/
>>> common: webcommon/includes/ccyears.ftl widget/CommonScreens.xml
>>> Reply-To: [hidden email]
>>>
>>> Author: jleroux
>>> Date: Thu Dec  7 02:17:00 2006
>>> New Revision: 483403
>>>
>>> URL: http://svn.apache.org/viewvc?view=rev&rev=483403
>>> Log:
>>> A patch from Anil K Patel "Expire credit card years" (https://
>>> issues.apache.org/jira/browse/OFBIZ-188).
>>>
>>> Modified:
>>>     incubator/ofbiz/trunk/framework/common/webcommon/includes/
>>> ccyears.ftl
>>>     incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
>>>
>>> Modified: incubator/ofbiz/trunk/framework/common/webcommon/includes/
>>> ccyears.ftl
>>> URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/
>>> common/webcommon/includes/ccyears.ftl?
>>> view=diff&rev=483403&r1=483402&r2=483403
>>> ====================================================================
>>> ==
>>> ========
>>> --- incubator/ofbiz/trunk/framework/common/webcommon/includes/
>>> ccyears.ftl (original)
>>> +++ incubator/ofbiz/trunk/framework/common/webcommon/includes/
>>> ccyears.ftl Thu Dec  7 02:17:00 2006
>>> @@ -14,12 +14,15 @@
>>>  License for the specific language governing permissions and
>>> limitations
>>>  under the License.
>>>  -->
>>> +<#assign stringYear = thisDate?string("yyyy")>
>>> +<#assign thisYear = stringYear?number>
>>> +
>>>  <option></option>
>>> -<option value="2005">2005</option>
>>> -<option value="2006">2006</option>
>>> -<option value="2007">2007</option>
>>> -<option value="2008">2008</option>
>>> -<option value="2009">2009</option>
>>> -<option value="2010">2010</option>
>>> -<option value="2011">2011</option>
>>> -<option value="2012">2012</option>
>>> +<option value="${thisYear}">${thisYear}</option>
>>> +<option value="${thisYear + 1}">${thisYear + 1}</option>
>>> +<option value="${thisYear + 2}">${thisYear + 2}</option>
>>> +<option value="${thisYear + 3}">${thisYear + 3}</option>
>>> +<option value="${thisYear + 4}">${thisYear + 4}</option>
>>> +<option value="${thisYear + 5}">${thisYear + 5}</option>
>>> +<option value="${thisYear + 6}">${thisYear + 6}</option>
>>> +<option value="${thisYear + 7}">${thisYear + 7}</option>
>>>
>>> Modified: incubator/ofbiz/trunk/framework/common/widget/
>>> CommonScreens.xml
>>> URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/
>>> common/widget/CommonScreens.xml?
>>> view=diff&rev=483403&r1=483402&r2=483403
>>> ====================================================================
>>> ==
>>> ========
>>> --- incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
>>> (original)
>>> +++ incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
>>> Thu Dec  7 02:17:00 2006
>>> @@ -51,6 +51,9 @@
>>>      </screen>
>>>      <screen name="ccyears">
>>>          <section>
>>> +            <actions>
>>> +                <set field="thisDate" from-field="nowTimestamp"/>
>>> +            </actions>
>>>              <widgets>
>>>                  <platform-specific><html><html-template
>>> location="component://common/webcommon/includes/ccyears.ftl"/></
>>> html></platform-specific>
>>>              </widgets>
>>>
>>
>> Best Regards,
>>
>> Si
>> [hidden email]
>>
>>
>>
>>

Best Regards,

Si
[hidden email]