[gen] Replaced, in PXs, function 'img' by function 'url', that returns the URL of an external resource to be included in the XHTML, like an image, a Javascript file or a CSS file.

This commit is contained in:
Gaetan Delannay 2013-07-20 19:56:17 +02:00
parent f2b19e4141
commit efd918f175
11 changed files with 83 additions and 85 deletions

View file

@ -36,12 +36,12 @@ class Action(Field):
<input if="field.confirm" type="button" class="button"
var="labelConfirm=_(field.labelId + '_confirm')"
value=":ztool.truncateValue(label)" title=":label"
style=":img('buttonAction', bg=True)"
style=":url('buttonAction', bg=True)"
onclick=":'askConfirm(%s,%s,%s)' % (q('form'), q(formId), \
q(labelConfirm))"/>
<input if="not field.confirm" type="submit" class="button" name="do"
value=":ztool.truncateValue(label)" title=":label"
style=":img('buttonAction', bg=True)"/>
style=":url('buttonAction', bg=True)"/>
</form>''')
# It is not possible to edit an action, not to search it.

View file

@ -47,7 +47,7 @@ class Calendar(Field):
goForward=not endDate or (endDate.strftime(fmt) &gt; \
grid[-1][-1].strftime(fmt))">
<!-- Go to the previous month -->
<img class="clickable" if="goBack" src=":img('arrowLeftSimple')"
<img class="clickable" if="goBack" src=":url('arrowLeftSimple')"
onclick=":'askMonthView(%s,%s,%s,%s)' % \
(q(ajaxHookId),q(objUrl),q(field.name),q(previousMonth))"/>
<!-- Go back to the default date -->
@ -60,7 +60,7 @@ class Calendar(Field):
q(objUrl), q(field.name), q(defaultDateMonth))"
disabled=":defaultDate.strftime(fmt)==monthDayOne.strftime(fmt)"/>
<!-- Go to the next month -->
<img class="clickable" if="goForward" src=":img('arrowRightSimple')"
<img class="clickable" if="goForward" src=":url('arrowRightSimple')"
onclick=":'askMonthView(%s, %s, %s, %s)' % (q(ajaxHookId), \
q(objUrl), q(field.name), q(nextMonth))"/>
<span>:_('month_%s' % monthDayOne.aMonth())</span>
@ -107,14 +107,14 @@ class Calendar(Field):
<img class="clickable" style="visibility:hidden"
var="info=field.getApplicableEventsTypesAt(contextObj, date, \
allEventTypes, preComputed, True)"
if="info['eventTypes']" src=":img('plus')"
if="info['eventTypes']" src=":url('plus')"
onclick=":'openEventPopup(%s, %s, %s, null, %s, %s)' % \
(q('new'), q(field.name), q(dayString), q(info['eventTypes']),\
q(info['message']))"/>
</x>
<!-- Icon for deleting an event -->
<img if="mayDelete" class="clickable" style="visibility:hidden"
src=":img('delete')"
src=":url('delete')"
onclick=":'openEventPopup(%s, %s, %s, %s, null, null)' % \
(q('del'), q(field.name), q(dayString), q(str(spansDays)))"/>
<!-- A single event is allowed for the moment -->

View file

@ -56,7 +56,7 @@ class Date(Field):
<!-- The icon for displaying the calendar popup -->
<x if="field.calendar">
<input type="hidden" id=":name" name=":name"/>
<img id=":'%s_img' % name" src=":img('calendar.gif')"/>
<img id=":'%s_img' % name" src=":url('calendar.gif')"/>
<script type="text/javascript">:field.getJsInit(name, years)</script>
</x>
@ -111,7 +111,7 @@ class Date(Field):
<!-- The icon for displaying the calendar popup -->
<x if="field.calendar">
<input type="hidden" id=":fromName" name=":fromName"/>
<img id=":'%s_img' % fromName" src=":img('calendar.gif')"/>
<img id=":'%s_img' % fromName" src=":url('calendar.gif')"/>
<script type="text/javascript">:field.getJsInit(fromName, years)
</script>
</x>
@ -144,7 +144,7 @@ class Date(Field):
<!-- The icon for displaying the calendar popup -->
<x if="widget.calendar">
<input type="hidden" id=":toName" name=":toName"/>
<img id=":'%s_img' % toName" src=":img('calendar.gif')"/>
<img id=":'%s_img' % toName" src=":url('calendar.gif')"/>
<script type="text/javascript">:field.getJsInit(toName, years)">
</script>
</x>

View file

@ -33,7 +33,7 @@ class List(Field):
widgetName='%s*%d' % (field.name, rowIndex)">:field.pxView</td>
<!-- Icon for removing the row -->
<td if="layoutType=='edit'" align=":dright">
<img class="clickable" src=":img(delete')" title=":_('object_delete')"
<img class="clickable" src=":url(delete')" title=":_('object_delete')"
onclick=":'deleteRow(%s, this)' % q('list_%s' % name)"/>
</td>
</tr>''')
@ -47,7 +47,7 @@ class List(Field):
<th for="info in field.fields">::_(info[1].labelId)</th>
<!-- Icon for adding a new row. -->
<th if="isEdit">
<img class="clickable" src=":img('plus')" title=":_('add_ref')"
<img class="clickable" src=":url('plus')" title=":_('add_ref')"
onclick=":'insertRow(%s)' % q('list_%s' % name)"/>
</th>
</tr>

View file

@ -38,7 +38,7 @@ class Ogone(Field):
<input type="hidden" for="item in value.items()" if="item[0] != 'env'"
id=":item[0]" name=":item[0]" value=":item[1]"/>
<!-- Submit image -->
<input type="image" id="submit2" name="submit2" src=":img('ogone.gif')"
<input type="image" id="submit2" name="submit2" src=":url('ogone.gif')"
title=":_('custom_pay')"/>
</form>
</x>''')

View file

@ -43,7 +43,7 @@ class Pod(Field):
<input type="checkbox" name=":doLabel" id=":chekboxId"/>
<label lfor=":chekboxId" class="discreet">:_(doLabel)"></label>
</x>
<img for="fmt in field.getToolInfo(contextObj.appy())[1]" src=":img(fmt)"
<img for="fmt in field.getToolInfo(contextObj.appy())[1]" src=":url(fmt)"
onclick=":'generatePodDocument(%s, %s, %s, %s)' % \
(q(contextObj.UID()), q(name), q(fmt), q(ztool.getQueryInfo()))"
title=":fmt.capitalize()" class="clickable"/>

View file

@ -61,11 +61,11 @@ class Ref(Field):
ajaxBaseCall=navBaseCall.replace('**v**','%s,%s,{%s:%s,%s:%s}'%\
(q(startNumber), q('ChangeRefOrder'), q('refObjectUid'),
q(obj.UID()), q('move'), q('**v**')))">
<img if="objectIndex &gt; 0" class="clickable" src=":img('arrowUp')"
<img if="objectIndex &gt; 0" class="clickable" src=":url('arrowUp')"
title=":_('move_up')"
onclick=":ajaxBaseCall.replace('**v**', 'up')"/>
<img if="objectIndex &lt; (totalNumber-1)" class="clickable"
src=":img('arrowDown')" title=":_('move_down')"
src=":url('arrowDown')" title=":_('move_down')"
onclick=":ajaxBaseCall.replace('**v**', 'down')"/>
</td>
<!-- Workflow transitions -->
@ -76,16 +76,16 @@ class Ref(Field):
<a var="navInfo='ref.%s.%s:%s.%d.%d' % (contextObj.UID(), field.name, \
field.pageName, loop.obj.nb + startNumber, totalNumber)"
href=":obj.getUrl(mode='edit', page='main', nav=navInfo)">
<img src=":img('edit')" title=":_('object_edit')"/></a>
<img src=":url('edit')" title=":_('object_edit')"/></a>
</td>
<!-- Delete -->
<td if="not isBack and field.delete and canWrite and obj.mayDelete()">
<img class="clickable" title=":_('object_delete')"
src=":img('delete')" onclick=":'onDeleteObject(%s)'%q(obj.UID())"/>
src=":url('delete')" onclick=":'onDeleteObject(%s)'%q(obj.UID())"/>
</td>
<!-- Unlink -->
<td if="not isBack and field.unlink and canWrite">
<img class="clickable" title=":_('object_unlink')" src=":img('unlink')"
<img class="clickable" title=":_('object_unlink')" src=":url('unlink')"
onclick=":'onUnlinkObject(%s,%s,%s)' % (q(contextObj.UID()), \
q(field.name), q(obj.UID()))"/>
</td>
@ -109,7 +109,7 @@ class Ref(Field):
noFormCall=not field.addConfirm and noFormCall or \
'askConfirm(%s, %s, %s)' % (q('script'), q(noFormCall), \
q(addConfirmMsg))"
style=":img('buttonAdd', bg=True)" value=":_('add_ref')"
style=":url('buttonAdd', bg=True)" value=":_('add_ref')"
onclick=":field.noForm and noFormCall or formCall"/>''')
# This PX displays, in a cell header from a ref table, icons for sorting the
@ -120,9 +120,9 @@ class Ref(Field):
var2="ajaxBaseCall=navBaseCall.replace('**v**', '%s,%s,{%s:%s,%s:%s}'% \
(q(startNumber), q('SortReference'), q('sortKey'), \
q(field.name), q('reverse'), q('**v**')))">
<img class="clickable" src=":img('sortAsc')"
<img class="clickable" src=":url('sortAsc')"
onclick=":ajaxBaseCall.replace('**v**', 'False')"/>
<img class="clickable" src=":img('sortDesc')"
<img class="clickable" src=":url('sortDesc')"
onclick=":ajaxBaseCall.replace('**v**', 'True')"/>
</x>''')
@ -180,7 +180,7 @@ class Ref(Field):
<x>:field.pxAdd</x>
<!-- The search button if field is queryable -->
<input if="objs and field.queryable" type="button" class="button"
style=":img('buttonSearch', bg=True)" value=":_('search_title')"
style=":url('buttonSearch', bg=True)" value=":_('search_title')"
onclick=":'window.location=%s' % \
q('%s/ui/search?className=%s&amp;ref=%s:%s' % \
(ztool.absolute_url(), linkedPortalType, contextObj.UID(), \

View file

@ -105,12 +105,12 @@ class ToolMixin(BaseMixin):
podField = self.getAppyType(name, className=obj.meta_type)
return podField.getToolInfo(obj.appy())
def getImageUrl(self, name, bg=False):
'''Gets the full URL of an image named p_name. If p_bg is False, the URL
is meant to be used as content for an img's "src" attribute. If p_bg
is True, the URL is meant to be used in a "style" attribute for
defining the background image of the current tag.'''
# If not extension is found in the image p_name, suppose it is a png.
def getIncludeUrl(self, name, bg=False):
'''Gets the full URL of an external resource, like an image, a
Javascript or a CSS file, named p_name. If p_bg is True, p_name is
an image that is meant to be used in a "style" attribute for defining
the background image of some XHTML tag.'''
# If no extension is found in p_name, we suppose it is a png image.
if '.' not in name: name += '.png'
url = '%s/ui/%s' % (self.getPhysicalRoot(),absolute_url(), name)
if not bg: return url

View file

@ -73,7 +73,7 @@ class GroupDescr(Descr):
<div class="portletGroup">
<img class="clickable" style="margin-right: 3px" align=":dleft"
id=":'%s_img' % field.labelId"
src=":expanded and img('collapse.gif') or img('expand.gif')"
src=":expanded and url('collapse.gif') or url('expand.gif')"
onclick=":'toggleCookie(%s)' % q(field.labelId)"/>
<x if="not field.translated">:_(field.labelId)</x>
<x if="field.translated">:field.translated</x>
@ -174,16 +174,16 @@ class PhaseDescr(Descr):
editable=mayEdit and phase['pagesInfo'][aPage]['showOnEdit']">
<a if="editable and not locked"
href="contextObj.getUrl(mode='edit', page=aPage)">
<img src=":img('edit')" title=":_('object_edit')"/></a>
<img src=":url('edit')" title=":_('object_edit')"/></a>
<a if="editable and locked">
<img style="cursor: help"
var="lockDate=tool.formatDate(locked[1]);
lockMap={'user':ztool.getUserName(locked[0]), \
'date':lockDate};
lockMsg=_('page_locked', mapping=lockMap)"
src=":img('locked')" title=":lockMsg"/></a>
src=":url('locked')" title=":lockMsg"/></a>
<a if="editable and locked and user.has_role('Manager')">
<img class="clickable" title=":_('page_unlock')" src=":img('unlock')"
<img class="clickable" title=":_('page_unlock')" src=":url('unlock')"
onclick=":'onUnlockPage(%s,%s)' % \
(q(contextObj.UID()), q(aPage))"/></a>
</x>

View file

@ -49,8 +49,8 @@ class ToolWrapper(AbstractWrapper):
(className, searchName, loop.obj.nb+1+startNumber, totalNumber)"
href=":obj.getUrl(mode='edit', page=obj.getDefaultEditPage(), \
nav=navInfo)">
<img src=":img('edit')" title=":_('object_edit')"/></a>
<img if="obj.mayDelete()" class="clickable" src=":img('delete')"
<img src=":url('edit')" title=":_('object_edit')"/></a>
<img if="obj.mayDelete()" class="clickable" src=":url('delete')"
title=":_('object_delete')"
onClick="'onDeleteObject(%s)' % q(obj.UID())"/>
</div>
@ -206,9 +206,9 @@ class ToolWrapper(AbstractWrapper):
<!-- Include type-specific CSS and JS. -->
<link for="cssFile in cssJs['css']" rel="stylesheet" type="text/css"
href=":'%s/ui/%s' % (appUrl, cssFile)"/>
href=":url(cssFile)"/>
<script for="jsFile in cssJs['js']" type="text/javascript"
src=":'%s/ui/%s' % (appUrl, jsFile)"></script>
src=":url(jsFile)"></script>
<!-- Search title -->
<h1><x>:_('%s_plural'%className)</x> &ndash;
@ -238,7 +238,7 @@ class ToolWrapper(AbstractWrapper):
<!-- Submit button -->
<p align=":dright"><br/>
<input type="submit" class="button" value=":_('search_button')"
style=":img('buttonSearch', bg=True)"/>
style=":url('buttonSearch', bg=True)"/>
</p>
</form>
</x>''', template=AbstractWrapper.pxTemplate, hook='content')
@ -305,13 +305,13 @@ class ToolWrapper(AbstractWrapper):
<table class="list" width="100%">
<tr>
<th for="columnHeader in importElems[0]">
<img if="loop.columnHeader.nb == 0" src=":img('eye')"
<img if="loop.columnHeader.nb == 0" src=":url('eye')"
title="_('import_show_hide')" class="clickable"
onClick="toggleViewableElements()" align=":dleft" />
<x>:columnHeader</x>
</th>
<th></th>
<th width="20px"><img src=":img('select_elems')" class="clickable"
<th width="20px"><img src=":url('select_elems')" class="clickable"
title=":_('select_delesect')" onClick="toggleCheckboxes()"/></th>
</tr>
<tr for="row in importElems[1]"

View file

@ -33,7 +33,7 @@ class AbstractWrapper(object):
# Icon for hiding/showing details below the title.
pxShowDetails = Px('''
<img if="ztool.subTitleIsUsed(className) and (field.name == 'title')"
class="clickable" src=":img('toggleDetails')"
class="clickable" src=":url('toggleDetails')"
onclick="toggleSubTitles()"/>''')
# Displays up/down arrows in a table header column for sorting a given
@ -43,18 +43,18 @@ class AbstractWrapper(object):
<img if="(sortKey != field.name) or (sortOrder == 'desc')"
onclick=":navBaseCall.replace('**v**', '0,%s,%s,%s' % \
(q(field.name), q('asc'), q(filterKey)))"
src=":img('sortDown.gif')" class="clickable"/>
src=":url('sortDown.gif')" class="clickable"/>
<img if="(sortKey != field.name) or (sortOrder == 'asc')"
onclick=":navBaseCall.replace('**v**', '0,%s,%s,%s' % \
(q(field.name), q('desc'), q(filterKey)))"
src=":img('sortUp.gif')" class="clickable"/>
src=":url('sortUp.gif')" class="clickable"/>
</x>
<x if="filterable">
<input type="text" size="7" id=":'%s_%s' % (ajaxHookId, field.name)"
value=":filterKey == field.name and filterValue or ''"/>
<img onclick=":navBaseCall.replace('**v**', '0, %s,%s,%s' % \
(q(sortKey), q(sortOrder), q(field.name)))"
src=":img('funnel')" class="clickable"/>
src=":url('funnel')" class="clickable"/>
</x></x>''')
# Buttons for navigating among a list of elements: next,back,first,last...
@ -67,27 +67,27 @@ class AbstractWrapper(object):
<tr valign="middle">
<!-- Go to the first page -->
<td if="(startNumber != 0) and (startNumber != batchSize)"><img
class="clickable" src=":img('arrowLeftDouble')"
class="clickable" src=":url('arrowLeftDouble')"
title=":_('goto_first')"
onClick=":navBaseCall.replace('**v**', '0'+sortAndFilter)"/></td>
<!-- Go to the previous page -->
<td var="sNumber=startNumber - batchSize" if="startNumber != 0"><img
class="clickable" src=":img('arrowLeftSimple')"
class="clickable" src=":url('arrowLeftSimple')"
title=":_('goto_previous')"
onClick="navBaseCall.replace('**v**', \
str(sNumber)+sortAndFilter)"/></td>
<!-- Explain which elements are currently shown -->
<td class="discreet">&nbsp;
<x>:startNumber + 1</x><img src=":img('to')"/>
<x>:startNumber + 1</x><img src=":url('to')"/>
<x>:startNumber + len(objs)</x>&nbsp;<b>//</b>
<x>:totalNumber</x>&nbsp;&nbsp;</td>
<!-- Go to the next page -->
<td var="sNumber=startNumber + batchSize"
if="sNumber &lt; totalNumber"><img class="clickable"
src=":img('arrowRightSimple')" title=":_('goto_next')"
src=":url('arrowRightSimple')" title=":_('goto_next')"
onClick=":navBaseCall.replace('**v**', \
str(sNumber)+sortAndFilter)"/></td>
@ -99,7 +99,7 @@ class AbstractWrapper(object):
sNumber= nbOfCountedPages * batchSize"
if="(startNumber != sNumber) and \
(startNumber != sNumber-batchSize)"><img class="clickable"
src=":img('arrowRightDouble')" title=":_('goto_last')"
src=":url('arrowRightDouble')" title=":_('goto_last')"
onClick="navBaseCall.replace('**v**', \
str(sNumber)+sortAndFilter)"/></td>
</tr>
@ -125,15 +125,15 @@ class AbstractWrapper(object):
var="gotoSource=_('goto_source');
goBack=backText and ('%s - %s' % (backText, gotoSource)) \
or gotoSource"
src=":img('gotoSource')" title=":goBack"/></a>
src=":url('gotoSource')" title=":goBack"/></a>
<!-- Go to the first page -->
<a if="firstUrl" href=":firstUrl"><img title=":_('goto_first')"
src=":img('arrowLeftDouble')"/></a>
src=":url('arrowLeftDouble')"/></a>
<!-- Go to the previous page -->
<a if="previousUrl" href=":previousUrl"><img title=":_('goto_previous')"
src=":img('arrowLeftSimple')"/></a>
src=":url('arrowLeftSimple')"/></a>
<!-- Explain which element is currently shown -->
<span class="discreet">&nbsp;
@ -143,11 +143,11 @@ class AbstractWrapper(object):
<!-- Go to the next page -->
<a if="nextUrl" href=":nextUrl"><img title=":_('goto_next')"
src=":img('arrowRightSimple')"/></a>
src=":url('arrowRightSimple')"/></a>
<!-- Go to the last page -->
<a if="lastUrl" href=":lastUrl"><img title=":_('goto_last')"
src=":img('arrowRightDouble')"/></a>
src=":url('arrowRightDouble')"/></a>
</div>''')
pxNavigationStrip = Px('''
@ -156,7 +156,7 @@ class AbstractWrapper(object):
<!-- Breadcrumb -->
<td var="breadcrumb=contextObj.getBreadCrumb()" class="breadcrumb">
<x for="bc in breadcrumb" var2="nb=loop.bc.nb">
<img if="nb != 0" src=":img('to')"/>
<img if="nb != 0" src=":url('to')"/>
<!-- Display only the title of the current object -->
<span if="nb == len(breadcrumb)-1">:bc['title']</span>
<!-- Display a link for parent objects -->
@ -176,9 +176,9 @@ class AbstractWrapper(object):
<!-- Include type-specific CSS and JS. -->
<x if="cssJs">
<link for="cssFile in cssJs['css']" rel="stylesheet" type="text/css"
href=":'%s/ui/%s' % (appUrl, cssFile)"/>
href=":url(cssFile)"/>
<script for="jsFile in cssJs['js']" type="text/javascript"
src=":'%s/ui/%s' % (appUrl, jsFile)"></script></x>
src=":url(jsFile)"></script></x>
<!-- Javascript messages -->
<script type="text/javascript">:ztool.getJavascriptMessages()</script>
@ -268,7 +268,7 @@ class AbstractWrapper(object):
<!-- Create a new object from a web form -->
<input type="button" class="button"
if="userMayAdd and ('form' in createMeans)"
style=":img('buttonAdd', bg=True)" value=":_('query_create')"
style=":url('buttonAdd', bg=True)" value=":_('query_create')"
onclick=":'window.location=%s' % \
q('%s/do?action=Create&amp;className=%s' % \
(toolUrl, rootClass))"/>
@ -276,7 +276,7 @@ class AbstractWrapper(object):
<!-- Create object(s) by importing data -->
<input type="button" class="button"
if="userMayAdd and ('import' in createMeans)"
style=":img('buttonImport', bg=True)" value=":_('query_import')"
style=":url('buttonImport', bg=True)" value=":_('query_import')"
onclick=":'window.location=%s' % \
q('%s/ui/import?className=%s' % (toolUrl, rootClass))"/>
</x>
@ -285,7 +285,7 @@ class AbstractWrapper(object):
<x if="ztool.advancedSearchEnabledFor(rootClass)">
<!-- Live search -->
<form action=":'%s/config/do' % appUrl">
<form action=":'%s/do' % toolUrl">
<input type="hidden" name="action" value="SearchObjects"/>
<input type="hidden" name="className" value=":rootClass"/>
<table cellpadding="0" cellspacing="0">
@ -293,7 +293,7 @@ class AbstractWrapper(object):
<td><input type="text" size="14" name="w_SearchableText"
class="inputSearch"/></td>
<td>
<input type="image" class="clickable" src=":img('search.gif')"
<input type="image" class="clickable" src=":url('search.gif')"
title=":_('search_button')"/></td>
</tr>
</table>
@ -324,7 +324,7 @@ class AbstractWrapper(object):
pxMessage = Px('''
<div var="messages=ztool.consumeMessages()" if="messages" class="message">
<!-- The icon for closing the message -->
<img src=":img('close')" align=":dright" class="clickable"
<img src=":url('close')" align=":dright" class="clickable"
onclick="this.parentNode.style.display='none'"/>
<!-- The message content -->
<x>::messages</x>
@ -350,11 +350,10 @@ class AbstractWrapper(object):
pxTemplate = Px('''
<html var="tool=self.tool; ztool=tool.o; user=tool.user;
isAnon=ztool.userIsAnon(); app=ztool.getApp();
appUrl=app.absolute_url(); appFolder=app.data;
appFolder=app.data; url = ztool.getIncludeUrl;
appName=ztool.getAppName(); _=ztool.translate;
req=ztool.REQUEST; resp=req.RESPONSE;
lang=ztool.getUserLanguage(); q=ztool.quote;
img = ztool.getImageUrl;
layoutType=ztool.getLayoutType();
contextObj=ztool.getPublishedObject(layoutType) or \
ztool.getHomeObject();
@ -373,10 +372,9 @@ class AbstractWrapper(object):
<x for="name in ztool.getGlobalCssJs()">
<link if="name.endswith('.css') and \
not ((dir == 'ltr') and (name == 'appyrtl.css'))"
rel="stylesheet" type="text/css"
href=":'%s/ui/%s' % (appUrl, name)"/>
rel="stylesheet" type="text/css" href=":url(name)"/>
<script if="name.endswith('.js')" type="text/javascript"
src=":'%s/ui/%s' % (appUrl, name)"></script>
src=":url(name)"></script>
</x>
</head>
<body>
@ -427,13 +425,13 @@ class AbstractWrapper(object):
<tr class="top">
<!-- Top banner -->
<td var="bannerName=(dir == 'ltr') and 'banner' or 'bannerrtl'"
style=":img('%s.jpg' % bannerName, bg=True)">
style=":url('%s.jpg' % bannerName, bg=True)">
<!-- Top links -->
<div style="margin-top: 4px" align=":dright">
<!-- Icon "home" -->
<a class="pageLink" href=":appUrl" title=": _('app_home')">
<img src=":img('home.gif')" style="margin-right: 3px"/>
<a class="pageLink" href="/" title=": _('app_home')">
<img src=":url('home.gif')" style="margin-right: 3px"/>
</a>
<!-- Additional links -->
@ -508,18 +506,18 @@ class AbstractWrapper(object):
<!-- Config -->
<a if="user.has_role('Manager')" href=":tool.url"
title=":_('%sTool' % appName)">
<img src=":img('appyConfig.gif')"/></a>
<img src=":url('appyConfig.gif')"/></a>
<!-- Additional icons -->
<x>:self.pxIcons</x>
<!-- Log out -->
<a href=":tool.url + '/performLogout'" title=":_('app_logout')">
<img src=":img('logout.gif')"/></a>
<img src=":url('logout.gif')"/></a>
</td>
<td class="userStripText" var="userInfo=ztool.getUserLine()"
align=":dright">
<span>:userInfo[0]</span>
<a if="userInfo[1]"
href=":userInfo[1]"><img src=":img('edit')"/></a>
href=":userInfo[1]"><img src=":url('edit')"/></a>
</td>
</tr>
</table>
@ -588,7 +586,7 @@ class AbstractWrapper(object):
<td if="isDataChange">
<x>:_('data_change')</x>
<img if="user.has_role('Manager')" class="clickable"
src=":img('delete')"
src=":url('delete')"
onclick=":'onDeleteEvent(%s,%s)' % \
(q(contextObj.UID()), q(event['time']))"/>
</td>
@ -637,7 +635,7 @@ class AbstractWrapper(object):
<td align=":dright" for="transition in transitions">
<!-- Real button -->
<input type="button" class="button" if="transition['may_trigger']"
style=":img('buttonTransition', bg=True)"
style=":url('buttonTransition', bg=True)"
title=":transition['title']"
value=":ztool.truncateValue(transition['title'])"
onclick=":'triggerTransition(%s,%s,%s)' % (q(formId), \
@ -645,7 +643,7 @@ class AbstractWrapper(object):
<!-- Fake button, explaining why the transition can't be triggered -->
<input type="button" class="button" if="not transition['may_trigger']"
style=":img('buttonFake', bg=True) + ';cursor: help'"
style=":url('buttonFake', bg=True) + ';cursor: help'"
value=":ztool.truncateValue(transition['title'])"
title=":'%s: %s' % (transition['title'], \
transition['reason'])"/>
@ -668,7 +666,7 @@ class AbstractWrapper(object):
<!-- Plus/minus icon for accessing history -->
<x if="hasHistory">
<img class="clickable" onclick="toggleCookie('appyHistory')"
src="historyExpanded and img('collapse.gif') or img('expand.gif')"
src="historyExpanded and url('collapse.gif') or url('expand.gif')"
align=":dleft" id="appyHistory_img"/>
<x>:_('object_history')</x> ||
</x>
@ -725,13 +723,13 @@ class AbstractWrapper(object):
<x if="isEdit">
<input type="button" class="button" value=":_('page_previous')"
onClick="submitAppyForm('previous')"
style=":img('buttonPrevious', bg=True)"/>
style=":url('buttonPrevious', bg=True)"/>
<input type="hidden" name="previousPage" value=":previousPage"/>
</x>
<!-- Button on the view page -->
<input if="not isEdit" type="button" class="button"
value=":_('page_previous')"
style=":img('buttonPrevious', bg=True)"
style=":url('buttonPrevious', bg=True)"
onclick=":'window.location=%s' % \
q(contextObj.getUrl(page=previousPage))"/>
</td>
@ -739,13 +737,13 @@ class AbstractWrapper(object):
<!-- Save -->
<td if="isEdit and pageInfo['showSave']">
<input type="button" class="button" onClick="submitAppyForm('save')"
style=":img(buttonSave', bg=True)" value=":_('object_save')"/>
style=":url(buttonSave', bg=True)" value=":_('object_save')"/>
</td>
<!-- Cancel -->
<td if="isEdit and pageInfo['showCancel']">
<input type="button" class="button" onClick="submitAppyForm('cancel')"
style=":img('buttonCancel', bg=True)" value=":_('object_cancel')"/>
style=":url('buttonCancel', bg=True)" value=":_('object_cancel')"/>
</td>
<td if="not isEdit"
@ -754,7 +752,7 @@ class AbstractWrapper(object):
<!-- Edit -->
<input type="button" class="button" if="editable and not locked"
style=":img('buttonEdit', bg=True)" value=":_('object_edit')"
style=":url('buttonEdit', bg=True)" value=":_('object_edit')"
onclick=":'window.location=%s' % \
q(contextObj.getUrl(mode='edit', page=page))"/>
@ -764,7 +762,7 @@ class AbstractWrapper(object):
var="lockDate=tool.formatDate(locked[1]);
lockMap={'user':tool.getUserName(locked[0]),'date':lockDate};
lockMsg=_('page_locked', mapping=lockMap)"
src=":img('lockedBig')" title=":lockMsg"/></a>
src=":url('lockedBig')" title=":lockMsg"/></a>
</td>
<!-- Next -->
@ -772,12 +770,12 @@ class AbstractWrapper(object):
<!-- Button on the edit page -->
<x if="isEdit">
<input type="button" class="button" onClick="submitAppyForm('next')"
style=":img('buttonNext', bg=True)" value=":_('page_next')"/>
style=":url('buttonNext', bg=True)" value=":_('page_next')"/>
<input type="hidden" name="nextPage" value=":nextPage"/>
</x>
<!-- Button on the view page -->
<input if="not isEdit" type="button" class="button"
style=":img('buttonNext', bg=True)" value=":_('page_next')"
style=":url('buttonNext', bg=True)" value=":_('page_next')"
onclick=":'window.location=%s' % \
q(contextObj.getUrl(page=nextPage))"/>
</td>
@ -789,7 +787,7 @@ class AbstractWrapper(object):
<!-- Refresh -->
<td if="contextObj.isDebug()">
<a href="contextObj.getUrl(mode=layoutType, page=page, refresh='yes')">
<img title="Refresh" style="vertical-align:top" src=":img('refresh')"/>
<img title="Refresh" style="vertical-align:top" src=":url('refresh')"/>
</a>
</td>
</tr>