Cnanges.
This commit is contained in:
parent
bdc7baf25a
commit
16a0a90bbf
|
@ -587,6 +587,18 @@ class ToolMixin(AbstractMixin):
|
|||
t,d1,d2,currentNumber,totalNumber = self.REQUEST.get('nav').split('.')
|
||||
res['currentNumber'] = int(currentNumber)
|
||||
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)
|
||||
# Among, first, previous, next and last, which one do I need?
|
||||
previousNeeded = False # Previous ?
|
||||
|
|
|
@ -1049,12 +1049,13 @@
|
|||
previousUrl navInfo/previousUrl;
|
||||
nextUrl navInfo/nextUrl;
|
||||
lastUrl navInfo/lastUrl;
|
||||
sourceUrl navInfo/sourceUrl">
|
||||
sourceUrl navInfo/sourceUrl;
|
||||
backText navInfo/backText">
|
||||
<tr>
|
||||
<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"
|
||||
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>
|
||||
<td><a tal:condition="firstUrl" tal:attributes="href firstUrl"><img style="cursor:pointer"
|
||||
tal:attributes="src string: $portal_url/skyn/arrowLeftDouble.png;
|
||||
|
|
Loading…
Reference in a new issue