[gen] Added a transparent clickable logo at the top left (or right if rtl) of the page.

This commit is contained in:
Gaetan Delannay 2014-03-05 22:01:51 +01:00
parent 90af2e5698
commit 62e2d49953
4 changed files with 9 additions and 11 deletions

View file

@ -400,7 +400,7 @@ class File(Field):
if rq: action = rq.get('%s_delete' % self.name, None)
if action != 'nochange':
# Delete the file on disk
info = getattr(zobj.aq_base, self.name)
info = getattr(zobj.aq_base, self.name, None)
if info:
info.removeFile(zobj.getDbFolder(), removeEmptyFolders=True)
# Delete the FileInfo in the DB

View file

@ -1243,9 +1243,8 @@ class ToolMixin(BaseMixin):
tb = sys.exc_info()
if error.type.__name__ == 'Unauthorized':
siteUrl = self.getSiteUrl()
htmlMessage = '<a href="%s"><img src="%s/ui/home.gif"/></a>' \
'You are not allowed to access this page.' % \
(siteUrl, siteUrl)
htmlMessage = '<a href="/">Back</a> You are not allowed to ' \
'access this page.'
userId = self.appy().user.login
textMessage = 'Unauthorized for %s @%s.' % \
(userId, self.REQUEST.get('PATH_INFO'))

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

View file

@ -150,16 +150,15 @@ class AbstractWrapper(object):
<tr class="top">
<!-- Top banner -->
<td var="bannerName=(dir == 'ltr') and 'banner' or 'bannerrtl'"
style=":url(bannerName, bg=True) + '; background-repeat:no-repeat'">
style=":url(bannerName, bg=True) + '; background-repeat:no-repeat;\
position:relative'">
<!-- Logo (transparent clickable zone by default) -->
<div align=":dleft" style="position: absolute"><a href="/">
<img src=":url('logo')"/></a></div>
<!-- Top links -->
<div style="margin-top: 4px" align=":dright">
<!-- Icon "home" -->
<a class="pageLink" href="/" title=": _('app_home')">
<img src=":url('home.gif')" style="margin-right: 3px"/>
</a>
<!-- Additional links -->
<!-- Custom links -->
<x>:tool.pxLinks</x>
<!-- Top-level pages -->