I tried to look into doc/tales.txt but I am not sure if the are covering all permissions testing or if I should move the permission testing for templates actions in a different test. Any advice is much appreciated. Thanks!
Bellow is the diff with the latest changes:
=== modified file 'lib/lp/translations/browser/potemplate.py'
--- lib/lp/translations/browser/potemplate.py 2010-02-02 11:17:00 +0000
+++ lib/lp/translations/browser/potemplate.py 2010-02-15 14:55:25 +0000
@@ -175,21 +175,21 @@
@enabled_with_permission('launchpad.Edit')
def upload(self):
text = 'Upload'
- return Link('+upload', text)
+ return Link('+upload', text, icon='add')
I filled bug 522188.
The hover presentation is already on edge. ie: https:/ /translations. edge.launchpad. net/openobject- addons/ trunk/+ templates
I tried to look into doc/tales.txt but I am not sure if the are covering all permissions testing or if I should move the permission testing for templates actions in a different test. Any advice is much appreciated. Thanks!
Bellow is the diff with the latest changes: translations/ browser/ potemplate. py' translations/ browser/ potemplate. py 2010-02-02 11:17:00 +0000 translations/ browser/ potemplate. py 2010-02-15 14:55:25 +0000 with_permission ('launchpad. Edit')
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -175,21 +175,21 @@
@enabled_
def upload(self):
text = 'Upload'
- return Link('+upload', text)
+ return Link('+upload', text, icon='add')
def download(self):
text = 'Download'
- return Link('+export', text)
+ return Link('+export', text, icon='download')
@enabled_ with_permission ('launchpad. Edit')
def edit(self):
- text = 'Settings'
- return Link('+edit', text)
+ text = 'Edit'
+ return Link('+edit', text, icon='edit')
@enabled_ with_permission ('launchpad. TranslationsAdm in')
def administer(self):
text = 'Administer'
- return Link('+admin', text)
+ return Link('+admin', text, icon='edit')
class POTemplateSubse tView:
=== modified file 'lib/lp/ translations/ templates/ object- templates. pt' translations/ templates/ object- templates. pt 2010-02-02 11:17:00 +0000 translations/ templates/ object- templates. pt 2010-02-15 15:25:55 +0000 slot="head_ epilogue" >
.inactive_ links a{ actions_ column"
tal: condition= "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> menu:translatio ns/edit/ fmt:link menu:translatio ns/upload/ fmt:link menu:translatio ns/download/ fmt:link menu:translatio ns/administer/ fmt:link
</div>
</td>
--- lib/lp/
+++ lib/lp/
@@ -7,8 +7,8 @@
<body>
<div metal:fill-
<style type="text/css">
- .inactive_links a img{
- visibility: hidden;
+ .inactive_links a{
+ background: none;
}
color: lightgray;
@@ -130,22 +130,18 @@
<td class="
<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>
+ <a tal:replace="
+ structure template/
+ " />
+ <a tal:replace="
+ structure template/
+ " />
+ <a tal:replace="
+ structure template/
+ " />
+ <a tal:replace="
+ structure template/
+ " />
</tr>