2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<tal:comment replace="nothing">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  We begin with some sub-macros used within macro "show" defined below.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<metal:objectTitle define-macro="objectTitle">
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02: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 10:05:19 +01: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
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    from one object to the next/previous on skyn/view.</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-09-17 15:32:48 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  <a tal:define="includeShownInfo includeShownInfo | python:False;
							 
						 
					
						
							
								
									
										
										
										
											2010-10-19 10:47:42 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 navInfo python:'ref.%s.%s:%s.%d.%d' % (contextObj.UID(), fieldName, appyType['pageName'], repeat['obj'].number()+startNumber, totalNumber);
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 navInfo python: test(appyType['isBack'], '', navInfo);
							 
						 
					
						
							
								
									
										
										
										
											2010-10-19 10:47:42 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 pageName python: appyType['isBack'] and appyType['backd']['pageName'] or 'main';
							 
						 
					
						
							
								
									
										
										
										
											2010-09-17 15:32:48 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 fullUrl python: obj.getUrl(page=pageName, nav=navInfo)"
							 
						 
					
						
							
								
									
										
										
										
											2010-08-27 08:59:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								     tal:attributes="href fullUrl" tal:content="python: (not includeShownInfo) and obj.Title() or contextObj.getReferenceLabel(fieldName, obj.appy())"></a>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								</metal:objectTitle>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<metal:objectActions define-macro="objectActions">
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								  <tal:comment replace="nothing">Displays icons for triggering actions on a given
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    referenced object (edit, delete, etc).</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <table class="no-style-table" cellpadding="0" cellspacing="0">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    <tr>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    <tal:comment replace="nothing">Arrows for moving objects up or down</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-12-17 14:46:55 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    <td class="noPadding" tal:condition="python: not appyType['isBack'] and (len(objs)>1) and member.has_permission('Modify portal content', contextObj)">
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <tal:moveRef define="objectIndex  python: contextObj.getAppyRefIndex(fieldName, obj);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                           ajaxBaseCall python: navBaseCall.replace('**v**', '\'%s\',\'ChangeRefOrder\', {\'refObjectUid\':\'%s\', \'move\':\'**v**\'}' % (startNumber, obj.UID()))">
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">Move up</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <img tal:condition="python: objectIndex > 0"
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        tal:attributes="src string: $portal_url/skyn/arrowUp.png;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        title python: tool.translate('move_up');
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        onClick python: ajaxBaseCall.replace('**v**', 'up')"
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        style="cursor:pointer"/>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">Move down</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <img tal:condition="python: objectIndex < (totalNumber-1)"
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        tal:attributes="src string: $portal_url/skyn/arrowDown.png;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        title python: tool.translate('move_down');
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                        onClick python: ajaxBaseCall.replace('**v**', 'down')"
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        style="cursor:pointer"/>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      </tal:moveRef>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    </td>
							 
						 
					
						
							
								
									
										
										
										
											2009-11-24 22:41:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    <tal:comment replace="nothing">Edit the element</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    <td class="noPadding" tal:condition="python: member.has_permission('Modify portal content', obj) and not appyType['noForm']">
							 
						 
					
						
							
								
									
										
										
										
											2010-10-19 10:47:42 +02: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 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          tal:attributes="href python: obj.getUrl(mode='edit', page='main', nav=navInfo)">
							 
						 
					
						
							
								
									
										
										
										
											2009-11-25 20:37:22 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <img title="label_edit" i18n:domain="plone" i18n:attributes="title"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								             tal:attributes="src string: $portal_url/skyn/edit.gif"/>
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								       </a>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    </td>
							 
						 
					
						
							
								
									
										
										
										
											2009-11-24 22:41:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    <tal:comment replace="nothing">Delete the element</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    <td class="noPadding">
							 
						 
					
						
							
								
									
										
										
										
											2010-12-17 14:46:55 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <img tal:condition="python: not appyType['isBack'] and member.has_permission('Delete objects', obj) and obj.mayDelete()"
							 
						 
					
						
							
								
									
										
										
										
											2009-11-24 22:41:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								           title="Delete" i18n:domain="plone" i18n:attributes="title" style="cursor:pointer"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								           tal:attributes="src string: $portal_url/skyn/delete.png;
							 
						 
					
						
							
								
									
										
										
										
											2010-09-17 15:32:48 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                           onClick python:'onDeleteObject(\'%s\')' % obj.UID()"/>
							 
						 
					
						
							
								
									
										
										
										
											2009-11-24 22:41:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    </td>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    </tr>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  </table>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</metal:objectActions>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<metal:plusIcon define-macro="plusIcon">
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02: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 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  <img style="cursor:pointer" tal:condition="showPlusIcon"
							 
						 
					
						
							
								
									
										
										
										
											2010-10-19 10:47:42 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								       tal:define="navInfo python:'ref.%s.%s:%s.%d.%d' % (contextObj.UID(), fieldName, appyType['pageName'], 0, totalNumber);
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                   formCall python:'window.location=\'%s/skyn/do?action=Create&type_name=%s&nav=%s\'' % (folder.absolute_url(), linkedPortalType, navInfo);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                   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)"
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								       tal:attributes="src string:$portal_url/skyn/plus.png;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                       title python: tool.translate('add_ref');
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                       onClick python: test(appyType['noForm'], noFormCall, formCall)"/>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								</metal:plusIcon>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02: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 20:51:43 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    tal:define="ajaxBaseCall python: navBaseCall.replace('**v**', '\'%s\',\'SortReference\', {\'sortKey\':\'%s\', \'reverse\':\'**v**\'}' % (startNumber, widget['name']))"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    tal:condition="python: canWrite and tool.isSortable(widget['name'], objs[0].meta_type, 'ref')">
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  <img style="cursor:pointer"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								       tal:attributes="src string:$portal_url/skyn/sortAsc.png;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                       onClick python: ajaxBaseCall.replace('**v**', 'False')"/>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <img style="cursor:pointer"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								       tal:attributes="src string:$portal_url/skyn/sortDesc.png;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                       onClick python: ajaxBaseCall.replace('**v**', 'True')"/>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</metal:sortIcons>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<tal:comment replace="nothing">View macro for a Ref.</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<div metal:define-macro="view"
							 
						 
					
						
							
								
									
										
										
										
											2010-11-22 09:36:14 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								     tal:define= "innerRef innerRef|python:False;
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                  ajaxHookId python: contextObj.UID() + name"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								     tal:attributes = "id ajaxHookId">
							 
						 
					
						
							
								
									
										
										
										
											2010-11-22 09:36:14 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  <script name="appyHook" tal:content="python: 'askRefField(\'%s\',\'%s\',\'%s\',\'%s\',0)' % (ajaxHookId, contextObj.absolute_url(), name, innerRef)">
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  </script>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</div>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<tal:comment replace="nothing">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								   This macro is called by a XmlHttpRequest for displaying the paginated
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								   referred objects of a reference field.
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<div metal:define-macro="viewContent"
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								     tal:define="fieldName request/fieldName;
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 appyType python: contextObj.getAppyType(fieldName, asDict=True);
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 innerRef python: test(request['innerRef']=='True', True, False);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 ajaxHookId python: contextObj.UID()+fieldName;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 startNumber python: int(request.get('%s_startNumber' % ajaxHookId, 0));
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 tool contextObj/getTool;
							 
						 
					
						
							
								
									
										
										
										
											2010-08-27 08:59:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 refObjects python:contextObj.getAppyRefs(fieldName, startNumber);
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 objs refObjects/objects;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 totalNumber refObjects/totalNumber;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 batchSize refObjects/batchSize;
							 
						 
					
						
							
								
									
										
										
										
											2010-09-02 16:16:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 folder python: contextObj.isPrincipiaFolderish and contextObj or contextObj.getParentNode();
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 linkedPortalType python: tool.getPortalType(appyType['klass']);
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 addPermission python: '%s: Add %s' % (tool.getAppName(), linkedPortalType);
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 canWrite python: not appyType['isBack'] and member.has_permission(appyType['writePermission'], contextObj);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 multiplicity appyType/multiplicity;
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								                 maxReached python:(multiplicity[1] != None) and (len(objs) >= multiplicity[1]);
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 showPlusIcon python:not appyType['isBack'] and appyType['add'] and not maxReached and member.has_permission(addPermission, folder) and canWrite;
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 atMostOneRef python: (multiplicity[1] == 1) and (len(objs)<=1);
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 label python: tool.translate(appyType['labelId']);
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 addConfirmMsg python: tool.translate('%s_addConfirm' % appyType['labelId']);
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 description python: tool.translate(appyType['descrId']);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 navBaseCall python: 'askRefField(\'%s\',\'%s\',\'%s\',\'%s\',**v**)' % (ajaxHookId, contextObj.absolute_url(), fieldName, innerRef)">
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <tal:comment replace="nothing">This macro displays the Reference widget on a "consult" page.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  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>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    <table class="no-style-table" cellpadding="0" cellspacing="0"><tr valign="top">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-27 08:59:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <td><span class="appyLabel" tal:condition="python: not innerRef and not appyType['link']"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                tal:content="structure label"></span></td>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">If there is no object...</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <tal:noObject condition="not:objs">
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <td tal:content="python: tool.translate('no_ref')"></td>
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <td><metal:plusIcon use-macro="portal/skyn/widgets/ref/macros/plusIcon"/></td>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								      </tal:noObject>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">If there is an object...</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-08-27 08:59:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <tal:objectIsPresent condition="objs">
							 
						 
					
						
							
								
									
										
										
										
											2009-11-17 10:05:19 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <tal:obj repeat="obj objs">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-27 08:59:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          <td tal:define="includeShownInfo python:True"><metal:showObjectTitle use-macro="portal/skyn/widgets/ref/macros/objectTitle" /></td>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        </tal:obj>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      </tal:objectIsPresent>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    </tr></table>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  </tal:atMostOneReference>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <tal:comment replace="nothing">Display a fieldset in all other cases.</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <tal:anyNumberOfReferences condition="not: atMostOneRef">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    <fieldset tal:attributes="class python:test(innerRef, 'innerAppyFieldset', '')">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <legend tal:condition="python: not innerRef or showPlusIcon">
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <span tal:condition="not: innerRef" tal:content="label"/>
							 
						 
					
						
							
								
									
										
										
										
											2009-11-17 10:05:19 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        (<span tal:replace="totalNumber"/>)
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <metal:plusIcon use-macro="portal/skyn/widgets/ref/macros/plusIcon"/>
							 
						 
					
						
							
								
									
										
										
										
											2010-12-06 11:11:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <tal:comment replace="nothing">The search icon if field is queryable</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        <a tal:condition="appyType/queryable"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								           tal:attributes="href python: '%s/skyn/search?type_name=%s&ref=%s:%s' % (tool.getAppFolder().absolute_url(), linkedPortalType, contextObj.meta_type, appyType['name'])">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          <img src="search.gif" tal:attributes="title python: tool.translate('search_objects')"/></a>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								      </legend>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">Object description</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <!--p tal:condition="python: not innerRef and description.strip()"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								         tal:content="description" class="discreet" ></p-->
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">Appy (top) navigation</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <metal:nav use-macro="here/skyn/navigate/macros/appyNavigate"/>
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">No object is present</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <p tal:condition="not:objs" tal:content="python: tool.translate('no_ref')"></p>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <table width="100%" cellspacing="0" cellpadding="0" tal:condition="objs"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								             tal:attributes="class python:test(innerRef, 'innerAppyTable', '')">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        <tr valign="bottom"><td>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-17 14:46:55 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <tal:comment replace="nothing">Show forward or backward reference(s)</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2009-12-15 21:30:43 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        <table tal:attributes="class python:test(innerRef, '', 'listing nosort');
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                               width python:test(innerRef, '100%', appyType['layouts']['view']['width']);"
							 
						 
					
						
							
								
									
										
										
										
											2010-12-17 14:46:55 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								               align="right" tal:condition="python: objs" cellpadding="0" cellspacing="0">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          <tal:widgets define="widgets python: objs[0].getAppyTypesFromNames(appyType['shownInfo'])">
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								          <tr tal:condition="appyType/showHeaders">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            <th tal:repeat="widget widgets">
							 
						 
					
						
							
								
									
										
										
										
											2010-12-06 11:11:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								              <span tal:content="python: tool.translate(widget['labelId'])"></span>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								              <metal:sortIcons use-macro="portal/skyn/widgets/ref/macros/sortIcons" />
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								            </th>
							 
						 
					
						
							
								
									
										
										
										
											2009-10-18 14:52:27 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            <th tal:content="python: tool.translate('ref_actions')"></th>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								          </tr>
							 
						 
					
						
							
								
									
										
										
										
											2009-12-15 21:30:43 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          <tal:row repeat="obj objs">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          <tr valign="top" tal:define="odd repeat/obj/odd"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								              tal:attributes="class python:test(odd, 'even', 'odd')">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								            <td tal:repeat="widget widgets">
							 
						 
					
						
							
								
									
										
										
										
											2010-12-06 11:11:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								              <tal:title condition="python: widget['name'] == 'title'">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                <metal:showObjectTitle use-macro="portal/skyn/widgets/ref/macros/objectTitle"/>
							 
						 
					
						
							
								
									
										
										
										
											2010-12-06 11:11:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								              </tal:title>
							 
						 
					
						
							
								
									
										
										
										
											2011-01-19 20:51:43 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								              <tal:state condition="python: widget['name'] == 'state'"
							 
						 
					
						
							
								
									
										
										
										
											2010-12-06 11:11:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                         content="python: tool.translate(obj.getWorkflowLabel())">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								              </tal:state>
							 
						 
					
						
							
								
									
										
										
										
											2011-01-19 20:51:43 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								              <tal:other condition="python: widget['name'] not in ('title', 'state')">
							 
						 
					
						
							
								
									
										
										
										
											2010-12-06 11:11:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                <tal:field define="contextObj python:obj;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                   layoutType python: 'cell';
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                                   innerRef python:True">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                  <metal:field use-macro="portal/skyn/widgets/show/macros/field" />
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                </tal:field>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								              </tal:other>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								            </td>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            <tal:comment replace="nothing">Actions</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            <td align="right">
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								              <metal:showObjectActions use-macro="portal/skyn/widgets/ref/macros/objectActions" />
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								            </td>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          </tr>
							 
						 
					
						
							
								
									
										
										
										
											2009-12-15 21:30:43 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          </tal:row>
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          </tal:widgets>
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        </table>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        </td></tr>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      </table>
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      <tal:comment replace="nothing">Appy (bottom) navigation</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-04-30 12:05:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      <metal:nav use-macro="here/skyn/navigate/macros/appyNavigate"/>
							 
						 
					
						
							
								
									
										
										
										
											2009-10-25 21:42:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								    </fieldset>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    <tal:comment replace="nothing">A carriage return needed in some cases.</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  </tal:anyNumberOfReferences>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</div>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<tal:comment replace="nothing">Edit macro for an Ref.</tal:comment>
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<metal:editRef define-macro="edit"
							 
						 
					
						
							
								
									
										
										
										
											2010-08-05 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								     tal:condition="widget/link"
							 
						 
					
						
							
								
									
										
										
										
											2010-08-27 08:59:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								     tal:define="rname           python: 'appy_ref_%s' % name;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 requestValue    python: request.get(rname, []);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 inRequest       python: request.has_key(rname);
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                 allObjects      python: contextObj.getSelectableAppyRefs(name);
							 
						 
					
						
							
								
									
										
										
										
											2010-09-02 16:16:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 refUids         python: [o.UID() for o in contextObj.getAppyRefs(name)['objects']];
							 
						 
					
						
							
								
									
										
										
										
											2010-08-27 08:59:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								                 isBeingCreated  python: contextObj.isTemporary() or ('/portal_factory/' in contextObj.absolute_url())">
							 
						 
					
						
							
								
									
										
										
										
											2009-06-29 14:06:01 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-01-28 14:36:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								<select tal:attributes="name rname;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        size python: test(isMultiple, widget['height'], '');
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								                        multiple python: test(isMultiple, 'multiple', '')">
							 
						 
					
						
							
								
									
										
										
										
											2010-10-14 14:43:56 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  <option tal:condition="not: isMultiple" i18n:translate="choose_a_value"></option>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <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 18:23:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<tal:comment replace="nothing">Cell macro for a Ref.</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<metal:cell define-macro="cell">
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  <metal:call use-macro="portal/skyn/widgets/ref/macros/view"/>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								</metal:cell>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<tal:comment replace="nothing">Search macro for a Ref.</tal:comment>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<metal:search define-macro="search"></metal:search>