?> , autocompleteUrl: '<?php print caNavUrl($this->request, 'lookup', 'Place', 'Get', $va_lookup_params); ?> ', types: <?php print json_encode($va_settings['restrict_to_types']); ?> , restrictToSearch: <?php print json_encode($va_settings['restrict_to_search']); ?> , bundlePreview: <?php print sizeof($this->getVar('initialValues')) < 50 ? caEscapeForBundlePreview($t_instance->get($t_item->tableName(), array('delimiter' => '; ', 'restrict_to_types' => $va_settings['restrict_to_types'], 'restrict_to_relationship_types' => $va_settings['restrict_to_relationship_types'], 'template' => $va_settings['display_template']))) : "''"; ?> , readonly: <?php print $vb_read_only ? "true" : "false"; ?> , isSortable: <?php print $vb_read_only || $vs_sort ? "false" : "true"; ?> , listSortOrderID: '<?php print $vs_id_prefix; ?> BundleList', listSortItems: 'div.roundedRel',
', templateValues: ['name', 'locale_id', 'type_id'], forceNewValues: <?php print json_encode($va_force_new_labels); ?> , initialValues: <?php print json_encode($va_initial_values); ?> , labelID: 'Label_', localeClassName: 'labelLocale', templateClassName: 'caLabelTemplate', labelListClassName: 'caLabelList', addButtonClassName: 'caAddLabelButton', deleteButtonClassName: 'caDeleteLabelButton', readonly: <?php print $vb_read_only ? "1" : "0"; ?> , bundlePreview: <?php $va_cur = current($va_initial_values); print caEscapeForBundlePreview($va_cur['name']); ?> , defaultLocaleID: <?php print ca_locales::getDefaultCataloguingLocaleID(); ?> }); </script>
/** * Get bundle preview for a relationship bundle * @param BundlableLabelableBaseModelWithAttributes $t_rel_instance * @param array $pa_initial_values * @param string $ps_template * @param string $ps_delimiter * @return string */ function caGetBundlePreviewForRelationshipBundle($t_rel_instance, $pa_initial_values, $ps_template, $ps_delimiter = '; ') { if (!is_array($pa_initial_values) || sizeof($pa_initial_values) == 0) { return '""'; } // it's very unlikely that the preview will fit more then 10 items if (sizeof($pa_initial_values) > 10) { $pa_initial_values = array_slice($pa_initial_values, 0, 10); } if (!$t_rel_instance instanceof BundlableLabelableBaseModelWithAttributes) { return '""'; } $va_ids = $va_previews = array(); foreach ($pa_initial_values as $va_item) { $va_ids[] = $va_item['id']; } $o_res = $t_rel_instance->makeSearchResult($t_rel_instance->tableName(), $va_ids); while ($o_res->nextHit()) { $va_previews[] = $o_res->getWithTemplate($ps_template); } return caEscapeForBundlePreview(join($ps_delimiter, $va_previews)); }
', templateValues: ['displayname', 'prefix', 'forename', 'other_forenames', 'middlename', 'surname', 'suffix', 'locale_id', 'type_id'], initialValues: <?php print json_encode($va_initial_values); ?> , forceNewValues: <?php print json_encode($va_force_new_labels); ?> , labelID: 'Label_', localeClassName: 'labelLocale', templateClassName: 'caLabelTemplate', labelListClassName: 'caLabelList', addButtonClassName: 'caAddLabelButton', deleteButtonClassName: 'caDeleteLabelButton', bundlePreview: <?php $va_cur = current($va_initial_values); print caEscapeForBundlePreview($va_cur['displayname']); ?> , readonly: <?php print $vb_read_only ? "1" : "0"; ?> , defaultLocaleID: <?php print ca_locales::getDefaultCataloguingLocaleID(); ?> }); </script>
print $vs_id_prefix; ?> _download_control_', '<?php print $vs_id_prefix; ?> _print_control_',], showOnNewIDList: ['<?php print $vs_id_prefix; ?> _upload_control_'], defaultValues: <?php print json_encode($va_element_value_defaults); ?> , bundlePreview: <?php print caEscapeForBundlePreview($vs_bundle_preview); ?> , readonly: <?php print $vb_read_only ? "1" : "0"; ?> , defaultLocaleID: <?php print ca_locales::getDefaultCataloguingLocaleID(); } ?> }); function <?php print $vs_id_prefix; ?>
', templateValues: ['caption', 'locale_id', 'type_id'], initialValues: <?php print json_encode($va_initial_values); ?> , forceNewValues: <?php print json_encode($va_force_new_labels); ?> , labelID: 'Label_', localeClassName: 'labelLocale', templateClassName: 'caLabelTemplate', labelListClassName: 'caLabelList', addButtonClassName: 'caAddLabelButton', deleteButtonClassName: 'caDeleteLabelButton', bundlePreview: <?php $va_cur = current($va_initial_values); print caEscapeForBundlePreview($va_cur['caption']); ?> , readonly: <?php print $vb_read_only ? "1" : "0"; ?> , defaultLocaleID: <?php print ca_locales::getDefaultCataloguingLocaleID(); ?> }); </script>
', templateValues: ['name_singular', 'name_plural', 'description', 'locale_id', 'type_id'], initialValues: <?php print json_encode($va_initial_values); ?> , forceNewValues: <?php print json_encode($va_force_new_labels); ?> , labelID: 'Label_', localeClassName: 'labelLocale', templateClassName: 'caLabelTemplate', labelListClassName: 'caLabelList', addButtonClassName: 'caAddLabelButton', deleteButtonClassName: 'caDeleteLabelButton', bundlePreview: <?php $va_cur = current($va_initial_values); print caEscapeForBundlePreview($va_cur['name_plural']); ?> , readonly: <?php print $vb_read_only ? "1" : "0"; ?> , defaultLocaleID: <?php print ca_locales::getDefaultCataloguingLocaleID(); ?> }); </script>