Re: opencore r18814 -
sputnik/branches/geotagging/sputnik/member/browser
from
slinkp
on 2008-07-02 10:33
I've been keeping an eye on these checkins, looks good.
I think I see a mistake in r18817 though. This line:
<input type="text" id="geolocation" name="geolocation"
tal:attributes="value request/location | view/geo_info/location | nothing" />
The value should just be "request/geolocation | nothing". What you
have now will show the wrong field, either from the request or
persistent.
In fact, it may be that geo_info/location should die, since we're no
longer using that field for geocoding. (Looks like geotagging.utils
still needs to make that switch though.
Also, a bit of stylistic musing re. profile-edit.pt: IIRC, I put in
that <tal:viewlets> tag because I'd noticed a convention of doing
things that way in other opencore code. I assumed that style was
intended as documentation of the author's intent... e.g. "We're
putting some viewlets in here."
It's not functionally necessary though. tal:define runs before other
tal statements, so you could equivalently do it all in the <li> tag
like so:
<li tal:define="viewlets provider:opencore.profile_edit_viewlets"
tal:condition="python:viewlets.strip()"
tal:content="structure viewlets">
geo viewlet stuff goes here!
</li>
This morning I seem to like the more concise version.
But then, I'm fickle about style. Which do you prefer?
On Tue, Jul 01, 2008 at 08:20:16PM -0400, egj@... wrote:
> Author: egj
> Date: 2008-07-01 20:20:10 -0400 (Tue, 01 Jul 2008)
> New Revision: 18814
>
> Modified:
> sputnik/branches/geotagging/sputnik/member/browser/profile-edit.pt
> Log:
> use both location (saved) and geolocation (not saved) fields in form
>
> Modified: sputnik/branches/geotagging/sputnik/member/browser/profile-edit.pt
> ===================================================================
> --- sputnik/branches/geotagging/sputnik/member/browser/profile-edit.pt 2008-07-01 23:01:25 UTC (rev 18813)
> +++ sputnik/branches/geotagging/sputnik/member/browser/profile-edit.pt 2008-07-02 00:20:10 UTC (rev 18814)
> @@ -24,13 +24,7 @@
> class python: request.form.get('field') == 'fullname' and default or nothing" />
> </li>
>
> - <tal:viewlets define="viewlets provider:opencore.profile_edit_viewlets">
> - <li tal:condition="python:viewlets.strip()"
> - tal:content="structure viewlets">
> - geo viewlet stuff goes here!
> - </li>
> - <li tal:condition="python:not viewlets.strip()">
> - <!-- the old pre-geotagging way of doing location, still here for now -->
> + <li>
> <label i18n:translate="profile-edit_location_label" for="location">Location</label><br />
> <input type="text" id="location" name="location"
> class="oc-autoFocus"
> @@ -38,7 +32,12 @@
> class python:request.form.get('field') == 'location' and default or nothing" />
> </li>
>
> -</tal:viewlets>
> + <tal:viewlets define="viewlets provider:opencore.profile_edit_viewlets">
> + <li tal:condition="python:viewlets.strip()"
> + tal:content="structure viewlets">
> + geo viewlet stuff goes here!
> + </li>
> + </tal:viewlets>
>
> <li>
> <label i18n:translate="profile-edit_website_label" for="website">Website</label><br />
>
>
>
> --
> Archive: http://www.openplans.org/projects/opencore/lists/openplans-svn/archive/2008/07/1214958019960
> To unsubscribe send an email with subject "unsubscribe" to openplans-svn-commits@.... Please contact openplans-svn-commits-manager@... for questions.
>
>
> !DSPAM:4043,486aca0b228461804284693!
>
--
Paul Winkler
http://www.openplans.org/people/slinkp/profile
yahoo: slinkp23
AIM: slinkp1970