2010-08-05 11:23:17 -05:00
|
|
|
<tal:comment replace="nothing">
|
|
|
|
We begin with some sub-macros used within macro "show" defined below.
|
|
|
|
</tal:comment>
|
2009-06-29 07:06:01 -05:00
|
|
|
|
2009-10-18 07:52:27 -05:00
|
|
|
<metal:objectTitle define-macro="objectTitle">
|
2009-06-29 07:06:01 -05:00
|
|
|
<tal:comment replace="nothing">Displays the title of a referenced object, with a link on
|
|
|
|
it to reach the consult view for this object. If we are on a back reference, the link
|
2009-11-17 03:05:19 -06:00
|
|
|
allows to reach the correct page where the forward reference is defined. If we are
|
|
|
|
on a forward reference, the "nav" parameter is added to the URL for allowing to navigate
|
2011-11-25 11:01:20 -06:00
|
|
|
from one object to the next/previous on ui/view.</tal:comment>
|
2012-10-31 15:17:31 -05:00
|
|
|
<tal:icons replace="structure obj/getIcons"/>
|
2010-09-17 08:32:48 -05:00
|
|
|
<a tal:define="includeShownInfo includeShownInfo | python:False;
|
2010-10-19 03:47:42 -05:00
|
|
|
navInfo python:'ref.%s.%s:%s.%d.%d' % (contextObj.UID(), fieldName, appyType['pageName'], repeat['obj'].number()+startNumber, totalNumber);
|
2010-10-14 07:43:56 -05:00
|
|
|
navInfo python: test(appyType['isBack'], '', navInfo);
|
2010-10-19 03:47:42 -05:00
|
|
|
pageName python: appyType['isBack'] and appyType['backd']['pageName'] or 'main';
|
2010-09-17 08:32:48 -05:00
|
|
|
fullUrl python: obj.getUrl(page=pageName, nav=navInfo)"
|
2010-08-27 01:59:53 -05:00
|
|
|
tal:attributes="href fullUrl" tal:content="python: (not includeShownInfo) and obj.Title() or contextObj.getReferenceLabel(fieldName, obj.appy())"></a>
|
2009-06-29 07:06:01 -05:00
|
|
|
</metal:objectTitle>
|
|
|
|
|
2009-10-18 07:52:27 -05:00
|
|
|
<metal:objectActions define-macro="objectActions">
|
2009-06-29 07:06:01 -05:00
|
|
|
<tal:comment replace="nothing">Displays icons for triggering actions on a given
|
|
|
|
referenced object (edit, delete, etc).</tal:comment>
|
2012-10-08 03:08:54 -05:00
|
|
|
<table class="noStyle"
|
|
|
|
tal:define="isBack appyType/isBack">
|
|
|
|
<tr>
|
|
|
|
<tal:comment replace="nothing">Edit</tal:comment>
|
|
|
|
<td tal:condition="python: not appyType['noForm'] and obj.mayEdit() and appyType['delete']">
|
2010-10-19 03:47:42 -05:00
|
|
|
<a tal:define="navInfo python:'ref.%s.%s:%s.%d.%d' % (contextObj.UID(), fieldName, appyType['pageName'], repeat['obj'].number()+startNumber, totalNumber);"
|
2010-10-14 07:43:56 -05:00
|
|
|
tal:attributes="href python: obj.getUrl(mode='edit', page='main', nav=navInfo)">
|
2013-01-14 09:58:30 -06:00
|
|
|
<img tal:attributes="src string: $appUrl/ui/edit.png;
|
2012-10-04 09:17:30 -05:00
|
|
|
title python: _('object_edit')"/>
|
2010-10-14 07:43:56 -05:00
|
|
|
</a>
|
|
|
|
</td>
|
2012-10-08 03:08:54 -05:00
|
|
|
<tal:comment replace="nothing">Delete</tal:comment>
|
|
|
|
<td tal:condition="python: not isBack and appyType['delete'] and canWrite and obj.mayDelete()">
|
2012-10-04 09:17:30 -05:00
|
|
|
<img style="cursor:pointer"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:attributes="src string: $appUrl/ui/delete.png;
|
2012-10-04 09:17:30 -05:00
|
|
|
onClick python:'onDeleteObject(\'%s\')' % obj.UID();
|
|
|
|
title python: _('object_delete')"/>
|
2009-11-24 15:41:42 -06:00
|
|
|
</td>
|
2012-10-08 03:08:54 -05:00
|
|
|
<tal:comment replace="nothing">Unlink</tal:comment>
|
|
|
|
<td tal:condition="python: not isBack and appyType['unlink'] and canWrite">
|
|
|
|
<img style="cursor:pointer"
|
|
|
|
tal:attributes="src string: $appUrl/ui/unlink.png;
|
|
|
|
onClick python:'onUnlinkObject(\'%s\',\'%s\',\'%s\')' % (contextObj.UID(), appyType['name'], obj.UID());
|
|
|
|
title python: _('object_unlink')"/>
|
|
|
|
</td>
|
2012-10-31 15:17:31 -05:00
|
|
|
<tal:comment replace="nothing">Arrows for moving objects up or down</tal:comment>
|
|
|
|
<td tal:condition="python: not isBack and (len(objs)>1) and changeOrder and canWrite">
|
|
|
|
<tal:moveRef define="objectIndex python: contextObj.getAppyRefIndex(fieldName, obj);
|
|
|
|
ajaxBaseCall python: navBaseCall.replace('**v**', '\'%s\',\'ChangeRefOrder\', {\'refObjectUid\':\'%s\', \'move\':\'**v**\'}' % (startNumber, obj.UID()))">
|
|
|
|
<img tal:condition="python: objectIndex > 0" style="cursor:pointer"
|
|
|
|
tal:attributes="src string: $appUrl/ui/arrowUp.png;
|
|
|
|
title python: _('move_up');
|
|
|
|
onClick python: ajaxBaseCall.replace('**v**', 'up')"/><img style="cursor:pointer"
|
|
|
|
tal:condition="python: objectIndex < (totalNumber-1)"
|
|
|
|
tal:attributes="src string: $appUrl/ui/arrowDown.png;
|
|
|
|
title python: _('move_down');
|
|
|
|
onClick python: ajaxBaseCall.replace('**v**', 'down')"/>
|
|
|
|
</tal:moveRef>
|
|
|
|
</td>
|
2012-10-08 03:08:54 -05:00
|
|
|
</tr>
|
2009-06-29 07:06:01 -05:00
|
|
|
</table>
|
|
|
|
</metal:objectActions>
|
|
|
|
|
2009-10-18 07:52:27 -05:00
|
|
|
<metal:plusIcon define-macro="plusIcon">
|
2009-06-29 07:06:01 -05:00
|
|
|
<tal:comment replace="nothing">Displays the "plus" icon that allows to add new object
|
|
|
|
through a reference widget. Indeed, If field was declared as "addable", we must provide
|
|
|
|
an icon for creating a new linked object (at least if multiplicities allow it).</tal:comment>
|
2009-10-18 07:52:27 -05:00
|
|
|
<img style="cursor:pointer" tal:condition="showPlusIcon"
|
2010-10-19 03:47:42 -05:00
|
|
|
tal:define="navInfo python:'ref.%s.%s:%s.%d.%d' % (contextObj.UID(), fieldName, appyType['pageName'], 0, totalNumber);
|
2011-11-25 11:01:20 -06:00
|
|
|
formCall python:'window.location=\'%s/do?action=Create&className=%s&nav=%s\'' % (folder.absolute_url(), linkedPortalType, navInfo);
|
2010-10-14 07:43:56 -05:00
|
|
|
formCall python: test(appyType['addConfirm'], 'askConfirm(\'script\', "%s", "%s")' % (formCall, addConfirmMsg), formCall);
|
|
|
|
noFormCall python: navBaseCall.replace('**v**', '%d, \'CreateWithoutForm\'' % startNumber);
|
|
|
|
noFormCall python: test(appyType['addConfirm'], 'askConfirm(\'script\', "%s", "%s")' % (noFormCall, addConfirmMsg), noFormCall)"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:attributes="src string:$appUrl/ui/plus.png;
|
2011-10-19 02:37:44 -05:00
|
|
|
title python: _('add_ref');
|
2010-10-14 07:43:56 -05:00
|
|
|
onClick python: test(appyType['noForm'], noFormCall, formCall)"/>
|
2009-06-29 07:06:01 -05:00
|
|
|
</metal:plusIcon>
|
|
|
|
|
2010-04-30 05:05:29 -05:00
|
|
|
<tal:comment replace="nothing">
|
|
|
|
This macro displays, in a cell header from a ref table, icons for sorting the
|
|
|
|
ref field according to the field that corresponds to this column.
|
|
|
|
</tal:comment>
|
|
|
|
<metal:sortIcons define-macro="sortIcons"
|
2011-01-19 13:51:43 -06:00
|
|
|
tal:define="ajaxBaseCall python: navBaseCall.replace('**v**', '\'%s\',\'SortReference\', {\'sortKey\':\'%s\', \'reverse\':\'**v**\'}' % (startNumber, widget['name']))"
|
2012-10-07 04:26:55 -05:00
|
|
|
tal:condition="python: changeOrder and canWrite and tool.isSortable(widget['name'], objs[0].meta_type, 'ref')">
|
2010-04-30 05:05:29 -05:00
|
|
|
<img style="cursor:pointer"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:attributes="src string:$appUrl/ui/sortAsc.png;
|
2010-04-30 05:05:29 -05:00
|
|
|
onClick python: ajaxBaseCall.replace('**v**', 'False')"/>
|
|
|
|
<img style="cursor:pointer"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:attributes="src string:$appUrl/ui/sortDesc.png;
|
2010-04-30 05:05:29 -05:00
|
|
|
onClick python: ajaxBaseCall.replace('**v**', 'True')"/>
|
|
|
|
</metal:sortIcons>
|
|
|
|
|
2010-08-05 11:23:17 -05:00
|
|
|
<tal:comment replace="nothing">View macro for a Ref.</tal:comment>
|
2012-10-07 04:26:55 -05:00
|
|
|
<metal:view define-macro="view"
|
|
|
|
tal:define="dummy python: request.set('fieldName', widget['name'])">
|
|
|
|
<metal:ref use-macro="app/ui/widgets/ref/macros/viewContent"/>
|
2012-03-27 08:49:41 -05:00
|
|
|
</metal:view>
|
2009-10-25 15:42:08 -05:00
|
|
|
|
|
|
|
<tal:comment replace="nothing">
|
2012-03-27 08:49:41 -05:00
|
|
|
This macro is called by a XmlHttpRequest (or directly by the macro above)
|
|
|
|
for displaying the referred objects of a reference field.
|
2009-10-25 15:42:08 -05:00
|
|
|
</tal:comment>
|
2010-08-05 11:23:17 -05:00
|
|
|
<div metal:define-macro="viewContent"
|
2009-10-25 15:42:08 -05:00
|
|
|
tal:define="fieldName request/fieldName;
|
2010-08-05 11:23:17 -05:00
|
|
|
appyType python: contextObj.getAppyType(fieldName, asDict=True);
|
2012-03-27 08:49:41 -05:00
|
|
|
innerRef python: test(request.get('innerRef', False)=='True', True, False);
|
2009-10-25 15:42:08 -05:00
|
|
|
ajaxHookId python: contextObj.UID()+fieldName;
|
|
|
|
startNumber python: int(request.get('%s_startNumber' % ajaxHookId, 0));
|
|
|
|
tool contextObj/getTool;
|
2011-10-19 02:37:44 -05:00
|
|
|
_ python: tool.translate;
|
2010-08-27 01:59:53 -05:00
|
|
|
refObjects python:contextObj.getAppyRefs(fieldName, startNumber);
|
2009-10-25 15:42:08 -05:00
|
|
|
objs refObjects/objects;
|
|
|
|
totalNumber refObjects/totalNumber;
|
|
|
|
batchSize refObjects/batchSize;
|
2012-06-02 07:36:49 -05:00
|
|
|
folder contextObj/getCreateFolder;
|
2010-10-14 07:43:56 -05:00
|
|
|
linkedPortalType python: tool.getPortalType(appyType['klass']);
|
2011-09-18 08:00:05 -05:00
|
|
|
canWrite python: not appyType['isBack'] and contextObj.allows(appyType['writePermission']);
|
2012-06-02 07:36:49 -05:00
|
|
|
showPlusIcon python: contextObj.mayAddReference(fieldName);
|
2012-03-27 08:49:41 -05:00
|
|
|
atMostOneRef python: (appyType['multiplicity'][1] == 1) and (len(objs)<=1);
|
2011-10-19 02:37:44 -05:00
|
|
|
addConfirmMsg python: appyType['addConfirm'] and _('%s_addConfirm' % appyType['labelId']) or '';
|
2012-10-07 04:26:55 -05:00
|
|
|
navBaseCall python: 'askRefField(\'%s\',\'%s\',\'%s\',\'%s\',**v**)' % (ajaxHookId, contextObj.absolute_url(), fieldName, innerRef);
|
2012-10-31 15:17:31 -05:00
|
|
|
changeOrder python: contextObj.callField(fieldName, 'changeOrderEnabled', contextObj);
|
|
|
|
showSubTitles python: request.get('showSubTitles', 'true') == 'true'"
|
2012-10-07 04:26:55 -05:00
|
|
|
tal:attributes="id ajaxHookId">
|
2009-06-29 07:06:01 -05:00
|
|
|
|
2011-09-18 08:00:05 -05:00
|
|
|
<tal:comment replace="nothing">This macro displays the Reference widget on a "view" page.
|
2009-06-29 07:06:01 -05:00
|
|
|
|
|
|
|
The definition of "atMostOneRef" above may sound strange: we shouldn't check the actual number
|
|
|
|
of referenced objects. But for back references people often forget to specify multiplicities.
|
|
|
|
So concretely, multiplicities (0,None) are coded as (0,1).</tal:comment>
|
|
|
|
<tal:atMostOneReference condition="atMostOneRef">
|
|
|
|
<tal:comment replace="nothing">Display a simplified widget if maximum number of
|
|
|
|
referenced objects is 1.</tal:comment>
|
2011-09-18 08:00:05 -05:00
|
|
|
<table><tr valign="top">
|
2009-06-29 07:06:01 -05:00
|
|
|
<tal:comment replace="nothing">If there is no object...</tal:comment>
|
|
|
|
<tal:noObject condition="not:objs">
|
2012-09-04 11:00:22 -05:00
|
|
|
<td class="discreet" tal:content="python: _('no_ref')"></td>
|
2011-11-25 11:01:20 -06:00
|
|
|
<td><metal:plusIcon use-macro="app/ui/widgets/ref/macros/plusIcon"/></td>
|
2009-06-29 07:06:01 -05:00
|
|
|
</tal:noObject>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">If there is an object...</tal:comment>
|
2011-10-26 03:21:09 -05:00
|
|
|
<tal:objectIsPresent condition="python: objs">
|
2009-11-17 03:05:19 -06:00
|
|
|
<tal:obj repeat="obj objs">
|
2011-11-25 11:01:20 -06:00
|
|
|
<td tal:define="includeShownInfo python:True"><metal:showObjectTitle use-macro="app/ui/widgets/ref/macros/objectTitle" /></td>
|
2009-06-29 07:06:01 -05:00
|
|
|
</tal:obj>
|
|
|
|
</tal:objectIsPresent>
|
|
|
|
</tr></table>
|
|
|
|
</tal:atMostOneReference>
|
|
|
|
|
2012-05-29 13:50:18 -05:00
|
|
|
<tal:comment replace="nothing">Display a table in all other cases.</tal:comment>
|
2009-06-29 07:06:01 -05:00
|
|
|
<tal:anyNumberOfReferences condition="not: atMostOneRef">
|
2012-05-29 13:50:18 -05:00
|
|
|
<div tal:condition="python: not innerRef or showPlusIcon">
|
|
|
|
(<span tal:replace="totalNumber"/>)
|
|
|
|
<metal:plusIcon use-macro="app/ui/widgets/ref/macros/plusIcon"/>
|
|
|
|
<tal:comment replace="nothing">The search icon if field is queryable</tal:comment>
|
|
|
|
<a tal:condition="python: objs and appyType['queryable']"
|
|
|
|
tal:attributes="href python: '%s/ui/search?className=%s&ref=%s:%s' % (tool.absolute_url(), linkedPortalType, contextObj.UID(), appyType['name'])">
|
|
|
|
<img src="search.gif" tal:attributes="title python: _('search_objects')"/></a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Appy (top) navigation</tal:comment>
|
|
|
|
<metal:nav use-macro="here/ui/navigate/macros/appyNavigate"/>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">No object is present</tal:comment>
|
2012-09-04 11:00:22 -05:00
|
|
|
<p class="discreet" tal:condition="not:objs" tal:content="python: _('no_ref')"></p>
|
2012-05-29 13:50:18 -05:00
|
|
|
|
|
|
|
<table width="100%" tal:condition="python: objs"
|
|
|
|
tal:attributes="class python:test(innerRef, 'innerAppyTable', '')">
|
|
|
|
<tr valign="bottom"><td>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Show forward or backward reference(s)</tal:comment>
|
|
|
|
<table tal:attributes="class python:test(innerRef, '', 'list');
|
|
|
|
width python:test(innerRef, '100%', appyType['layouts']['view']['width']);">
|
2012-11-02 16:27:54 -05:00
|
|
|
<tal:infos define="columns python: objs[0].getColumnsSpecifiers(appyType['shownInfo'], dir)">
|
2012-05-29 13:50:18 -05:00
|
|
|
<tr tal:condition="appyType/showHeaders">
|
2012-11-02 16:27:54 -05:00
|
|
|
<th tal:repeat="column columns"
|
|
|
|
tal:attributes="width column/width; align column/align">
|
|
|
|
<tal:def define="widget column/field">
|
2012-05-29 13:50:18 -05:00
|
|
|
<span tal:content="python: _(widget['labelId'])"></span>
|
|
|
|
<metal:sortIcons use-macro="app/ui/widgets/ref/macros/sortIcons" />
|
2012-10-31 15:17:31 -05:00
|
|
|
<tal:sd define="className linkedPortalType">
|
|
|
|
<metal:details use-macro="context/ui/navigate/macros/showDetails"/>
|
|
|
|
</tal:sd>
|
2012-11-02 16:27:54 -05:00
|
|
|
</tal:def>
|
2012-05-29 13:50:18 -05:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tal:row repeat="obj objs">
|
2012-10-31 15:17:31 -05:00
|
|
|
<tr valign="top" tal:define="odd repeat/obj/odd"
|
2012-11-02 16:27:54 -05:00
|
|
|
tal:attributes="class python:test(odd, 'even', 'odd')">
|
|
|
|
<td tal:repeat="column columns"
|
|
|
|
tal:attributes="width column/width; align column/align">
|
|
|
|
<tal:def define="widget column/field">
|
2012-05-29 13:50:18 -05:00
|
|
|
<tal:title condition="python: widget['name'] == 'title'">
|
|
|
|
<metal:showObjectTitle use-macro="app/ui/widgets/ref/macros/objectTitle"/>
|
2012-10-31 15:17:31 -05:00
|
|
|
<div name="subTitle" tal:content="structure obj/getSubTitle"
|
|
|
|
tal:attributes="style python: showSubTitles and 'display:block' or 'display:none'"></div>
|
|
|
|
<div tal:attributes="align dright" tal:condition="obj/mayAct">
|
|
|
|
<metal:showObjectActions use-macro="app/ui/widgets/ref/macros/objectActions" />
|
|
|
|
</div>
|
2012-05-29 13:50:18 -05:00
|
|
|
</tal:title>
|
2012-10-31 15:17:31 -05:00
|
|
|
<tal:other condition="python: widget['name'] != 'title'">
|
2012-05-29 13:50:18 -05:00
|
|
|
<tal:field define="contextObj python:obj;
|
|
|
|
layoutType python: 'cell';
|
2013-01-07 08:30:13 -06:00
|
|
|
innerRef python:True"
|
|
|
|
condition="python: obj.showField(widget['name'], layoutType='result')">
|
2012-05-29 13:50:18 -05:00
|
|
|
<metal:field use-macro="app/ui/widgets/show/macros/field" />
|
|
|
|
</tal:field>
|
|
|
|
</tal:other>
|
2012-11-02 16:27:54 -05:00
|
|
|
</tal:def>
|
2012-05-29 13:50:18 -05:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tal:row>
|
2012-11-02 16:27:54 -05:00
|
|
|
</tal:infos>
|
2012-05-29 13:50:18 -05:00
|
|
|
</table>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Appy (bottom) navigation</tal:comment>
|
|
|
|
<metal:nav use-macro="context/ui/navigate/macros/appyNavigate"/>
|
2009-06-29 07:06:01 -05:00
|
|
|
</tal:anyNumberOfReferences>
|
|
|
|
</div>
|
|
|
|
|
2010-08-05 11:23:17 -05:00
|
|
|
<tal:comment replace="nothing">Edit macro for an Ref.</tal:comment>
|
2010-10-14 07:43:56 -05:00
|
|
|
<metal:editRef define-macro="edit"
|
2010-08-05 11:23:17 -05:00
|
|
|
tal:condition="widget/link"
|
2011-10-19 02:37:44 -05:00
|
|
|
tal:define="requestValue python: request.get(name, []);
|
|
|
|
inRequest python: request.has_key(name);
|
2010-08-27 01:59:53 -05:00
|
|
|
allObjects python: contextObj.getSelectableAppyRefs(name);
|
2010-09-02 09:16:08 -05:00
|
|
|
refUids python: [o.UID() for o in contextObj.getAppyRefs(name)['objects']];
|
2010-08-27 01:59:53 -05:00
|
|
|
isBeingCreated python: contextObj.isTemporary() or ('/portal_factory/' in contextObj.absolute_url())">
|
2009-06-29 07:06:01 -05:00
|
|
|
|
2011-10-19 02:37:44 -05:00
|
|
|
<select tal:attributes="name name;
|
2011-01-28 07:36:30 -06:00
|
|
|
size python: test(isMultiple, widget['height'], '');
|
|
|
|
multiple python: test(isMultiple, 'multiple', '')">
|
2012-03-02 08:42:22 -06:00
|
|
|
<option value="" tal:condition="not: isMultiple" tal:content="python: _('choose_a_value')"></option>
|
2010-10-14 07:43:56 -05:00
|
|
|
<tal:ref repeat="refObj allObjects">
|
|
|
|
<option tal:define="uid python: contextObj.getReferenceUid(refObj)"
|
|
|
|
tal:content="python: contextObj.getReferenceLabel(name, refObj)"
|
|
|
|
tal:attributes="value uid;
|
|
|
|
selected python:(inRequest and (uid in requestValue) or (not inRequest and ((uid in refUids)))) and True or False">
|
|
|
|
</option>
|
|
|
|
</tal:ref>
|
|
|
|
</select>
|
|
|
|
</metal:editRef>
|
2010-08-05 11:23:17 -05:00
|
|
|
|
|
|
|
<tal:comment replace="nothing">Cell macro for a Ref.</tal:comment>
|
|
|
|
<metal:cell define-macro="cell">
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:call use-macro="app/ui/widgets/ref/macros/view"/>
|
2010-08-05 11:23:17 -05:00
|
|
|
</metal:cell>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Search macro for a Ref.</tal:comment>
|
2012-09-17 14:11:54 -05:00
|
|
|
<metal:search define-macro="search">
|
|
|
|
<label tal:attributes="for widgetName" tal:content="python: _(widget['labelId'])"></label><br>
|
|
|
|
<tal:comment replace="nothing">The "and" / "or" radio buttons</tal:comment>
|
|
|
|
<tal:operator define="operName python: 'o_%s' % name;
|
|
|
|
orName python: '%s_or' % operName;
|
|
|
|
andName python: '%s_and' % operName;"
|
|
|
|
condition="python: widget['multiplicity'][1]!=1">
|
|
|
|
<input type="radio" tal:attributes="name operName; id orName" checked="checked" value="or"/>
|
|
|
|
<label tal:attributes="for orName" tal:content="python: _('search_or')"></label>
|
|
|
|
<input type="radio" tal:attributes="name operName; id andName" value="and"/>
|
|
|
|
<label tal:attributes="for andName" tal:content="python: _('search_and')"></label><br/>
|
|
|
|
</tal:operator>
|
|
|
|
<tal:comment replace="nothing">The list of values</tal:comment>
|
|
|
|
<select tal:attributes="name widgetName; size widget/height" multiple="multiple">
|
|
|
|
<tal:option repeat="v python: tool.getSearchValues(name, className)">
|
|
|
|
<option tal:define="uid python: v[0];
|
|
|
|
title python: tool.getReferenceLabel(name, v[1], className)"
|
|
|
|
tal:attributes="value uid; title title"
|
|
|
|
tal:content="python: tool.truncateValue(title, widget)">
|
|
|
|
</option>
|
|
|
|
</tal:option>
|
|
|
|
</select>
|
|
|
|
</metal:search>
|