This is a good start. I was please to see a presentation that deemphasised
the action to improve the readability of the page.
The behaviour of these actions is disconcerting. When I edit a a template,
the next_url is the template, but I expected to return to the all templates
view. I know that this behaviour has not changed in this branch. I do not
see any bugs that pertain to this surprise--maybe I do not know what to
search on. Here is an example of how to negotiate multiple origins:
@property
def next_url(self):
referrer = self.request.getHeader('referer')
if (referrer is not None
and referrer.startswith(self.request.getApplicationURL())):
return referrer
else:
return canonical_url(self.context)
We should discuss if this is in scope. If not this should be a bug reported
against translations.
I an uncomfortable with these hand crafted links. We usually need extra tests
to verify that the permission and URL that is in the same as the canonical
definitions used by menus, and render the correct markup.
This rendered markup is not 3.0 style. This should use a sprite, which will
fix the strange underlining issues I see under the icon eg:
class="sprint edit"
All these links appear to be defined in POTemplateMenu, so I think you can
avoid writing lots of tests by removing this exceptional markup with:
The URL is guaranteed by menu:translations. The markup is guaranteed by
fmt:link. This does permission checking for you too. This will be consistent
with other links...
...Which leads me to ask why do we use "Edit" when the canonical link uses
"Settings"? I am certain they should be the same. If settings is wrong,
should we change the link defined in POTemplateMenu?
Hi Adi.
This is a good start. I was please to see a presentation that deemphasised
the action to improve the readability of the page.
The behaviour of these actions is disconcerting. When I edit a a template,
the next_url is the template, but I expected to return to the all templates
view. I know that this behaviour has not changed in this branch. I do not
see any bugs that pertain to this surprise--maybe I do not know what to
search on. Here is an example of how to negotiate multiple origins:
@property getHeader( 'referer' ) startswith( self.request. getApplicationU RL())): url(self. context)
def next_url(self):
referrer = self.request.
if (referrer is not None
and referrer.
return referrer
else:
return canonical_
We should discuss if this is in scope. If not this should be a bug reported
against translations.
See below for some 3.0 style concerns.
=== modified file 'lib/lp/ translations/ templates/ object- templates. pt' translations/ templates/ object- templates. pt 2009-12-28 22:58:18 +0000 translations/ templates/ object- templates. pt 2010-02-10 13:48:35 +0000
--- lib/lp/
+++ lib/lp/
...
+ <td class=" actions_ column" "context/ required: launchpad. AnyPerson" > template_ links"> "template/ required: launchpad. Edit"> "href string: ${template/ fmt:url} /+edit; "href string: ${template/ fmt:url} /+upload; "href string: ${template/ fmt:url} /+export; Download< /a> "template/ required: launchpad. TranslationsAdm in"> "href string: ${template/ fmt:url} /+admin; Administer< /a>
+ tal:condition=
+ <div class="
+ <tal:maintainer condition=
+ <a tal:attributes=
+ title string:Edit ${template/name}'s details">
+ <img src="/@@/edit" /> Edit</a>
+ <a tal:attributes=
+ title string:Upload translations to ${template/name}">
+ <img src="/@@/add" /> Upload</a>
+ </tal:maintainer>
+ <a tal:attributes=
+ title string:Download translations from ${template/name}">
+ <img src="/@@/download" />
+ <tal:admin condition=
+ <a tal:attributes=
+ title string:Administer ${template/name}">
+ <img src="/@@/edit" />
+ </tal:admin>
I an uncomfortable with these hand crafted links. We usually need extra tests
to verify that the permission and URL that is in the same as the canonical
definitions used by menus, and render the correct markup.
This rendered markup is not 3.0 style. This should use a sprite, which will
fix the strange underlining issues I see under the icon eg:
class="sprint edit"
All these links appear to be defined in POTemplateMenu, so I think you can
avoid writing lots of tests by removing this exceptional markup with:
<a tal:replace= "structure template/ menu:translatio ns/edit/ fmt:link" />
The URL is guaranteed by menu:translations. The markup is guaranteed by
fmt:link. This does permission checking for you too. This will be consistent
with other links...
...Which leads me to ask why do we use "Edit" when the canonical link uses
"Settings"? I am certain they should be the same. If settings is wrong,
should we change the link defined in POTemplateMenu?
...