[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 rq: action = rq.get('%s_delete' % self.name, None)
if action != 'nochange': if action != 'nochange':
# Delete the file on disk # Delete the file on disk
info = getattr(zobj.aq_base, self.name) info = getattr(zobj.aq_base, self.name, None)
if info: if info:
info.removeFile(zobj.getDbFolder(), removeEmptyFolders=True) info.removeFile(zobj.getDbFolder(), removeEmptyFolders=True)
# Delete the FileInfo in the DB # Delete the FileInfo in the DB

View file

@ -1243,9 +1243,8 @@ class ToolMixin(BaseMixin):
tb = sys.exc_info() tb = sys.exc_info()
if error.type.__name__ == 'Unauthorized': if error.type.__name__ == 'Unauthorized':
siteUrl = self.getSiteUrl() siteUrl = self.getSiteUrl()
htmlMessage = '<a href="%s"><img src="%s/ui/home.gif"/></a>' \ htmlMessage = '<a href="/">Back</a> You are not allowed to ' \
'You are not allowed to access this page.' % \ 'access this page.'
(siteUrl, siteUrl)
userId = self.appy().user.login userId = self.appy().user.login
textMessage = 'Unauthorized for %s @%s.' % \ textMessage = 'Unauthorized for %s @%s.' % \
(userId, self.REQUEST.get('PATH_INFO')) (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"> <tr class="top">
<!-- Top banner --> <!-- Top banner -->
<td var="bannerName=(dir == 'ltr') and 'banner' or 'bannerrtl'" <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 --> <!-- Top links -->
<div style="margin-top: 4px" align=":dright"> <div style="margin-top: 4px" align=":dright">
<!-- Icon "home" --> <!-- Custom links -->
<a class="pageLink" href="/" title=": _('app_home')">
<img src=":url('home.gif')" style="margin-right: 3px"/>
</a>
<!-- Additional links -->
<x>:tool.pxLinks</x> <x>:tool.pxLinks</x>
<!-- Top-level pages --> <!-- Top-level pages -->