This commit is contained in:
Gaetan Delannay 2010-01-15 13:46:54 +01:00
parent bdc7baf25a
commit 16a0a90bbf
2 changed files with 15 additions and 2 deletions

View file

@ -587,6 +587,18 @@ class ToolMixin(AbstractMixin):
t,d1,d2,currentNumber,totalNumber = self.REQUEST.get('nav').split('.') t,d1,d2,currentNumber,totalNumber = self.REQUEST.get('nav').split('.')
res['currentNumber'] = int(currentNumber) res['currentNumber'] = int(currentNumber)
res['totalNumber'] = int(totalNumber) res['totalNumber'] = int(totalNumber)
# Compute the label of the search, or ref field
if t == 'search':
searchName = d2
if searchName == '_advanced': label = 'search_results'
else:
label = '%s_search_%s' % (d1.split(':')[0], searchName)
res['backText'] = self.translate(label)
else:
sourceObj = self.uid_catalog(UID=d1)[0].getObject()
label = '%s_%s' % (sourceObj.meta_type, d2)
res['backText'] = u'%s : %s' % \
(sourceObj.Title(),self.translate(label))
newNav = '%s.%s.%s.%%d.%s' % (t, d1, d2, totalNumber) newNav = '%s.%s.%s.%%d.%s' % (t, d1, d2, totalNumber)
# Among, first, previous, next and last, which one do I need? # Among, first, previous, next and last, which one do I need?
previousNeeded = False # Previous ? previousNeeded = False # Previous ?

View file

@ -1049,12 +1049,13 @@
previousUrl navInfo/previousUrl; previousUrl navInfo/previousUrl;
nextUrl navInfo/nextUrl; nextUrl navInfo/nextUrl;
lastUrl navInfo/lastUrl; lastUrl navInfo/lastUrl;
sourceUrl navInfo/sourceUrl"> sourceUrl navInfo/sourceUrl;
backText navInfo/backText">
<tr> <tr>
<tal:comment replace="nothing">Go to the source URL (search or referred object)</tal:comment> <tal:comment replace="nothing">Go to the source URL (search or referred object)</tal:comment>
<td><a tal:condition="sourceUrl" tal:attributes="href sourceUrl"><img style="cursor:pointer" <td><a tal:condition="sourceUrl" tal:attributes="href sourceUrl"><img style="cursor:pointer"
tal:attributes="src string: $portal_url/skyn/gotoSource.png; tal:attributes="src string: $portal_url/skyn/gotoSource.png;
title python: tool.translate('goto_source')"/></a></td> title python: backText + ' : ' + tool.translate('goto_source')"/></a></td>
<tal:comment replace="nothing">Go to the first page</tal:comment> <tal:comment replace="nothing">Go to the first page</tal:comment>
<td><a tal:condition="firstUrl" tal:attributes="href firstUrl"><img style="cursor:pointer" <td><a tal:condition="firstUrl" tal:attributes="href firstUrl"><img style="cursor:pointer"
tal:attributes="src string: $portal_url/skyn/arrowLeftDouble.png; tal:attributes="src string: $portal_url/skyn/arrowLeftDouble.png;