当前位置: 首页>>代码示例>>PHP>>正文


PHP caJSONLookupServiceUrl函数代码示例

本文整理汇总了PHP中caJSONLookupServiceUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP caJSONLookupServiceUrl函数的具体用法?PHP caJSONLookupServiceUrl怎么用?PHP caJSONLookupServiceUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了caJSONLookupServiceUrl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getRepresentationChooserHTMLFormBundle

 /**
  * Returns HTML bundle for picking representations to attach to an object-* relationship
  *
  * @param object $po_request The current request
  * @param $ps_form_name The name of the HTML form this bundle will be part of
  *
  * @return string HTML for bundle
  */
 public function getRepresentationChooserHTMLFormBundle($po_request, $ps_form_name, $ps_placement_code, $pa_bundle_settings, $pa_options = null)
 {
     $o_view = new View($po_request, $po_request->getViewsDirectoryPath() . '/bundles/');
     $o_view->setVar('lookup_urls', caJSONLookupServiceUrl($po_request, $this->getAppDatamodel()->getTableName($this->get('table_num'))));
     $o_view->setVar('t_subject', $this);
     $vn_object_id = $this->getLeftTableName() == 'ca_objects' ? $this->get($this->getLeftTableFieldName()) : $this->get($this->getRightTableFieldName());
     $o_view->setVar('t_object', $t_object = new ca_objects($vn_object_id));
     $o_view->setVar('id_prefix', $ps_form_name);
     $o_view->setVar('placement_code', $ps_placement_code);
     $o_view->setVar('element_code', caGetOption(array('elementCode', 'element_code'), $pa_bundle_settings, null));
     $o_view->setVar('settings', $pa_bundle_settings);
     return $o_view->render('ca_object_representation_chooser_html.php');
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:21,代码来源:ObjectRelationshipBaseModel.php

示例2: ca_objects

        break;
}
$vb_objects_x_collections_hierarchy_enabled = (bool) $t_subject->getAppConfig()->get('ca_objects_x_collections_hierarchy_enabled');
$vs_disabled_items_mode = $t_subject->getAppConfig()->get($t_subject->tableName() . '_hierarchy_browser_disabled_items_mode');
$vs_disabled_items_mode = $vs_disabled_items_mode ? $vs_disabled_items_mode : 'hide';
$t_object = new ca_objects();
$va_search_lookup_extra_params = array('noInline' => 1);
if ($t_subject->getProperty('HIERARCHY_ID_FLD') && ($vn_hier_id = (int) $t_subject->get($t_subject->getProperty('HIERARCHY_ID_FLD')))) {
    $va_search_lookup_extra_params['currentHierarchyOnly'] = $vn_hier_id;
}
if (in_array($t_subject->tableName(), array('ca_objects', 'ca_collections')) && $vb_objects_x_collections_hierarchy_enabled) {
    $va_lookup_urls = array('search' => caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'Get', $va_search_lookup_extra_params), 'levelList' => caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'GetHierarchyLevel'), 'ancestorList' => caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'GetHierarchyAncestorList'));
    $vs_edit_url = caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'Edit') . '/id/';
    $vn_init_id = $t_subject->tableName() . "-" . $pn_id;
} else {
    $va_lookup_urls = caJSONLookupServiceUrl($this->request, $t_subject->tableName(), $va_search_lookup_extra_params);
    $vs_edit_url = caEditorUrl($this->request, $t_subject->tableName());
    $vn_init_id = $pn_id;
}
$vb_strict_type_hierarchy = (bool) $this->request->config->get($t_subject->tableName() . '_enforce_strict_type_hierarchy');
$vs_type_selector = trim($t_subject->getTypeListAsHTMLFormElement("{$vs_id_prefix}type_id", array('id' => "{$vs_id_prefix}typeList"), array('childrenOfCurrentTypeOnly' => $vb_strict_type_hierarchy, 'includeSelf' => !$vb_strict_type_hierarchy, 'directChildrenOnly' => $vb_strict_type_hierarchy)));
$pa_bundle_settings = $this->getVar('settings');
$vb_read_only = isset($pa_bundle_settings['readonly']) && $pa_bundle_settings['readonly'] || $this->request->user->getBundleAccessLevel($t_subject->tableName(), 'hierarchy_location') == __CA_BUNDLE_ACCESS_READONLY__;
$va_errors = array();
if (is_array($va_action_errors = $this->request->getActionErrors('hierarchy_location'))) {
    foreach ($va_action_errors as $o_error) {
        $va_errors[] = $o_error->getErrorDescription();
    }
}
?>
	
开发者ID:idiscussforum,项目名称:providence,代码行数:30,代码来源:hierarchy_location.php

示例3: getInlineEditColumns

 /**
  * Return array of columns suitable for use with ca.tableview.js
  * (implements "spreadsheet" editing UI)
  *
  */
 public function getInlineEditColumns($pa_display_list, $pa_options = null)
 {
     $po_request = isset($pa_options['request']) ? $pa_options['request'] : null;
     $va_bundle_names = caExtractValuesFromArrayList($pa_display_list, 'bundle_name', array('preserveKeys' => true));
     $va_column_spec = array();
     foreach ($va_bundle_names as $vn_placement_id => $vs_bundle_name) {
         if (!(bool) $pa_display_list[$vn_placement_id]['allowInlineEditing']) {
             // Read only
             $va_column_spec[] = array('data' => str_replace(".", "-", $vs_bundle_name), 'readOnly' => !(bool) $pa_display_list[$vn_placement_id]['allowInlineEditing']);
             continue;
         }
         switch ($pa_display_list[$vn_placement_id]['inlineEditingType']) {
             case DT_SELECT:
                 $va_column_spec[] = array('data' => str_replace(".", "-", $vs_bundle_name), 'readOnly' => false, 'type' => 'DT_SELECT', 'source' => $pa_display_list[$vn_placement_id]['inlineEditingListValues'], 'strict' => true);
                 break;
             case DT_LOOKUP:
                 if ($po_request) {
                     $va_urls = caJSONLookupServiceUrl($po_request, 'ca_list_items');
                     $va_column_spec[] = array('data' => str_replace(".", "-", $vs_bundle_name), 'readOnly' => false, 'type' => 'DT_LOOKUP', 'list' => $pa_display_list[$vn_placement_id]['inlineEditingList'], 'lookupURL' => $va_urls['search'], 'strict' => false);
                 }
                 break;
             default:
                 $va_column_spec[] = array('data' => str_replace(".", "-", $vs_bundle_name), 'readOnly' => false, 'type' => 'DT_FIELD');
                 break;
         }
     }
     return $va_column_spec;
 }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:33,代码来源:BaseFindController.php

示例4: caJSONLookupServiceUrl

	</div>
	<div class="quickAddSectionBox" id="{$vs_form_name}Container<?php 
print $vs_field_name_prefix . $vs_n;
?>
">
		<div class="quickAddFormTopPadding"><!-- empty --></div>
			<div class="quickAddErrorContainer" id="<?php 
print $vs_form_name;
?>
Errors<?php 
print $vs_field_name_prefix . $vs_n;
?>
"> </div>
<?php 
// Output hierarchy browser
$va_lookup_urls = caJSONLookupServiceUrl($this->request, 'ca_storage_locations');
?>
	<div class='bundleLabel'><span class="formLabelText" id="ObjectEditorForm_ca_entities"><?php 
print _t('Location in hierarchy');
?>
</span><br/>
		<div class="bundleContainer">
			<div class="caItemList">
				<div class="hierarchyBrowserContainer">
					<div id="caQuickAdd<?php 
print $vs_form_name;
?>
HierarchyBrowser" class="hierarchyBrowserSmall">
						<!-- Content for hierarchy browser is dynamically inserted here by ca.hierbrowser -->
					</div><!-- end hierbrowser -->
					<div>
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:quickadd_html.php

示例5: getBundleDisplayHTMLFormBundle

 /**
  * Returns HTML bundle for adding/editing/deleting placements from a display
  *
  * @param object $po_request The current request
  * @param $ps_form_name The name of the HTML form this bundle will be part of
  * @return string HTML for bundle
  */
 public function getBundleDisplayHTMLFormBundle($po_request, $ps_form_name, $ps_placement_code, $pa_options = null)
 {
     if (!$this->haveAccessToDisplay($po_request->getUserID(), __CA_BUNDLE_DISPLAY_EDIT_ACCESS__)) {
         return null;
     }
     $o_view = new View($po_request, $po_request->getViewsDirectoryPath() . '/bundles/');
     $o_view->setVar('lookup_urls', caJSONLookupServiceUrl($po_request, $this->getAppDatamodel()->getTableName($this->get('table_num'))));
     $o_view->setVar('t_display', $this);
     $o_view->setVar('placement_code', $ps_placement_code);
     $o_view->setVar('id_prefix', $ps_form_name);
     return $o_view->render('ca_bundle_display_placements.php');
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:19,代码来源:ca_bundle_displays.php

示例6: getBundleFormHTML


//.........这里部分代码省略.........
                 foreach ($va_error_objects as $o_e) {
                     $va_errors[] = $o_e->getErrorDescription();
                 }
             } else {
                 $vs_display_format = $o_config->get('bundle_element_display_format');
             }
             $pa_options['dontCache'] = true;
             // we *don't* want to cache labels here
             $vs_element = $vs_type === 'preferred_label' ? $this->getPreferredLabelHTMLFormBundle($pa_options['request'], $pa_options['formName'], $ps_placement_code, $pa_bundle_settings, $pa_options) : $this->getNonPreferredLabelHTMLFormBundle($pa_options['request'], $pa_options['formName'], $ps_placement_code, $pa_bundle_settings, $pa_options);
             $vs_field_id = "ca_{$vs_type}_" . $pa_options['formName'] . "_{$ps_placement_code}";
             if (!$vs_label_text) {
                 $vs_label_text = $va_info['label'];
             }
             $vs_label = '<span class="formLabelText" id="' . $vs_field_id . '">' . $vs_label_text . '</span>';
             if ($vs_type == 'preferred_label' && $o_config->get('show_required_field_marker') && $o_config->get('require_preferred_label_for_' . $this->tableName())) {
                 $vs_label .= ' ' . $vs_required_marker;
             }
             $vs_description = isset($pa_bundle_settings['description'][$g_ui_locale]) ? $pa_bundle_settings['description'][$g_ui_locale] : null;
             if ($vs_label && $vs_description) {
                 TooltipManager::add('#' . $vs_field_id, "<h3>{$vs_label_text}</h3>{$vs_description}");
             }
             break;
             # -------------------------------------------------
         # -------------------------------------------------
         case 'intrinsic':
             if (isset($pa_bundle_settings['label'][$g_ui_locale]) && $pa_bundle_settings['label'][$g_ui_locale]) {
                 $pa_options['label'] = $pa_bundle_settings['label'][$g_ui_locale];
             }
             if (!$pa_options['label']) {
                 $pa_options['label'] = $this->getFieldInfo($ps_bundle_name, 'LABEL');
             }
             $vs_view_path = isset($pa_options['viewPath']) && $pa_options['viewPath'] ? $pa_options['viewPath'] : $pa_options['request']->getViewsDirectoryPath();
             $o_view = new View($pa_options['request'], "{$vs_view_path}/bundles/");
             $va_lookup_url_info = caJSONLookupServiceUrl($pa_options['request'], $this->tableName());
             if ($this->getFieldInfo($ps_bundle_name, 'IDENTITY')) {
                 $o_view->setVar('form_element', ($vn_id = (int) $this->get($ps_bundle_name)) ? $vn_id : "&lt;" . _t('Not yet issued') . "&gt;");
             } else {
                 $vb_read_only = $pa_bundle_settings['readonly'] || $pa_options['request']->user->getBundleAccessLevel($this->tableName(), $ps_bundle_name) == __CA_BUNDLE_ACCESS_READONLY__ ? true : false;
                 $va_additional_field_options = array();
                 if ($vn_width = caGetOption('width', $pa_bundle_settings)) {
                     $va_additional_field_options['width'] = $vn_width;
                 }
                 if ($vn_height = caGetOption('height', $pa_bundle_settings)) {
                     $va_additional_field_options['height'] = $vn_height;
                 }
                 $o_view->setVar('form_element', $this->htmlFormElement($ps_bundle_name, $this->getProperty('ID_NUMBERING_ID_FIELD') == $ps_bundle_name ? $o_config->get('idno_element_display_format_without_label') : $o_config->get('bundle_element_display_format_without_label'), array_merge(array('readonly' => $vb_read_only, 'error_icon' => $pa_options['request']->getThemeUrlPath() . "/graphics/icons/warning_small.gif", 'progress_indicator' => $pa_options['request']->getThemeUrlPath() . "/graphics/icons/indicator.gif", 'lookup_url' => $va_lookup_url_info['intrinsic'], 'name' => $ps_placement_code . $pa_options['formName'] . $ps_bundle_name), $pa_options, $va_additional_field_options)));
             }
             $o_view->setVar('errors', $pa_options['request']->getActionErrors($ps_bundle_name));
             if (method_exists($this, "getDefaultMediaPreviewVersion")) {
                 $o_view->setVar('display_media', $this->getMediaTag($ps_bundle_name, $this->getDefaultMediaPreviewVersion($ps_bundle_name)));
             }
             $vs_field_id = 'ca_intrinsic_' . $pa_options['formName'] . '_' . $ps_placement_code;
             $vs_label = '<span class="formLabelText" id="' . $vs_field_id . '">' . $pa_options['label'] . '</span>';
             if ($o_config->get('show_required_field_marker')) {
                 if ($this->getFieldInfo($ps_bundle_name, 'FIELD_TYPE') == FT_TEXT && is_array($va_bounds = $this->getFieldInfo($ps_bundle_name, 'BOUNDS_LENGTH')) && $va_bounds[0] > 0) {
                     $vs_label .= ' ' . $vs_required_marker;
                 } else {
                     if (in_array($this->getFieldInfo($ps_bundle_name, 'FIELD_TYPE'), array(FT_NUMBER, FT_HISTORIC_DATERANGE, FT_DATERANGE)) && !$this->getFieldInfo($ps_bundle_name, 'IS_NULL')) {
                         $vs_label .= ' ' . $vs_required_marker;
                     }
                 }
             }
             // Set access inheritance default
             if ((bool) $this->getAppConfig()->get($this->tableName() . '_allow_access_inheritance') && $this->hasField('access_inherit_from_parent') && !$this->getPrimaryKey()) {
                 $this->set('access_inherit_from_parent', (bool) $this->getAppConfig()->get($this->tableName() . '_access_inheritance_default') ? 1 : 0);
             }
开发者ID:idiscussforum,项目名称:providence,代码行数:67,代码来源:BundlableLabelableBaseModelWithAttributes.php

示例7: htmlFormElement

 /**
  * Return HTML form elements for all elements using the current format, type and value
  *
  * @param string $ps_name Name of form element. Is used as a prefix for each form element. The number element name will be used as a suffix for each.
  * @param array $pa_errors Passed-by-reference array. Will contain any validation errors for the value, indexed by element.
  * @param array $pa_options Options include:
  *		id_prefix = Prefix to add to element ID attributes. [Default is null]
  *		for_search_form = Generate a blank form for search. [Default is false]
  *		show_errors = Include error messages next to form elements. [Default is false]
  *		error_icon = Icon to display next to error messages; should be ready-to-display HTML. [Default is null]
  *		readonly = Make all form elements read-only. [Default is false]
  *		request = the current request (an instance of RequestHTTP) [Default is null]
  *		check_for_dupes = perform live checking for duplicate numbers. [Default is false]
  *		progress_indicator = URL for spinner graphic to use while running duplicate number check. [Default is null] 
  *		table = Table to perform duplicate number check in. [Default is null]
  *		search_url = Search service URL to use when performing duplicate number check. [Default is null]
  *		row_id = ID of row to exclude from duplicate number check (typically the current record id). [Default is null]
  *		context_id = context ID of row to exclude from duplicate number check (typically the current record context). [Default is null]
  * @return string HTML output
  */
 public function htmlFormElement($ps_name, &$pa_errors = null, $pa_options = null)
 {
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     $vs_id_prefix = isset($pa_options['id_prefix']) ? $pa_options['id_prefix'] : null;
     $vb_generate_for_search_form = isset($pa_options['for_search_form']) ? true : false;
     $pa_errors = $this->validateValue($this->getValue());
     $vs_separator = $this->getSeparator();
     $va_element_vals = $this->explodeValue($this->getValue());
     if (!is_array($va_elements = $this->getElements())) {
         $va_elements = array();
     }
     $va_element_controls = $va_element_control_names = array();
     $vn_i = 0;
     $vb_next_in_seq_is_present = false;
     foreach ($va_elements as $vs_element_name => $va_element_info) {
         if ($va_element_info['type'] == 'SERIAL' && $va_element_vals[$vn_i] == '') {
             $vb_next_in_seq_is_present = true;
         }
         $vs_tmp = $this->genNumberElement($vs_element_name, $ps_name, $va_element_vals[$vn_i], $vs_id_prefix, $vb_generate_for_search_form, $pa_options);
         $va_element_control_names[] = $ps_name . '_' . $vs_element_name;
         if ($pa_options['show_errors'] && isset($pa_errors[$vs_element_name])) {
             $vs_error_message = preg_replace("/[\"\\']+/", "", $pa_errors[$vs_element_name]);
             if ($pa_options['error_icon']) {
                 $vs_tmp .= "<a href='#'\" id='caIdno_{$vs_id_prefix}_{$ps_name}'><img src='" . $pa_options['error_icon'] . "' border='0'/></a>";
             } else {
                 $vs_tmp .= "<a href='#'\" id='caIdno_{$vs_id_prefix}_{$ps_name}'>[" . _t('Error') . "]</a>";
             }
             TooltipManager::add("#caIdno_{$vs_id_prefix}_{$ps_name}", "<h2>" . _t('Error') . "</h2>{$vs_error_message}");
         }
         $va_element_controls[] = $vs_tmp;
         $vn_i++;
     }
     if (sizeof($va_elements) < sizeof($va_element_vals) && (bool) $this->getFormatPropery('allow_extra_elements', array('default' => 1))) {
         $va_extra_vals = array_slice($va_element_vals, sizeof($va_elements));
         if (($vn_extra_size = (int) $this->getFormatPropery('extra_element_width', array('default' => 10))) < 1) {
             $vn_extra_size = 10;
         }
         foreach ($va_extra_vals as $vn_i => $vs_extra_val) {
             $va_element_controls[] = "<input type='text' name='{$ps_name}_extra_{$vn_i}' id='{$ps_name}_extra_{$vn_i}' value='" . htmlspecialchars($vs_extra_val, ENT_QUOTES, 'UTF-8') . "' size='{$vn_extra_size}'" . ($pa_options['readonly'] ? ' disabled="1" ' : '') . ">";
             $va_element_control_names[] = $ps_name . '_extra_' . $vn_i;
         }
     }
     $vs_js = '';
     if ($pa_options['check_for_dupes'] && !$vb_next_in_seq_is_present) {
         $va_ids = array();
         foreach ($va_element_control_names as $vs_element_control_name) {
             $va_ids[] = "'#" . $vs_id_prefix . $vs_element_control_name . "'";
         }
         $vs_js = '<script type="text/javascript" language="javascript">' . "\n// <![CDATA[\n";
         $va_lookup_url_info = caJSONLookupServiceUrl($pa_options['request'], $pa_options['table']);
         $vs_js .= "\n\t\t\t\tcaUI.initIDNoChecker({\n\t\t\t\t\terrorIcon: '" . $pa_options['error_icon'] . "',\n\t\t\t\t\tprocessIndicator: '" . $pa_options['progress_indicator'] . "',\n\t\t\t\t\tidnoStatusID: 'idnoStatus',\n\t\t\t\t\tlookupUrl: '" . $va_lookup_url_info['idno'] . "',\n\t\t\t\t\tsearchUrl: '" . $pa_options['search_url'] . "',\n\t\t\t\t\tidnoFormElementIDs: [" . join(',', $va_ids) . "],\n\t\t\t\t\tseparator: '" . $this->getSeparator() . "',\n\t\t\t\t\trow_id: " . intval($pa_options['row_id']) . ",\n\t\t\t\t\tcontext_id: " . intval($pa_options['context_id']) . ",\n\n\t\t\t\t\tsingularAlreadyInUseMessage: '" . addslashes(_t('Identifier is already in use')) . "',\n\t\t\t\t\tpluralAlreadyInUseMessage: '" . addslashes(_t('Identifier is already in use %1 times')) . "'\n\t\t\t\t});\n\t\t\t";
         $vs_js .= "// ]]>\n</script>\n";
     }
     return join($vs_separator, $va_element_controls) . $vs_js;
 }
开发者ID:samrahman,项目名称:providence,代码行数:77,代码来源:MultipartIDNumber.php

示例8: caJSONLookupServiceUrl

 */
JavascriptLoadManager::register('hierBrowser');
JavascriptLoadManager::register('tabUI');
$t_subject = $this->getVar('t_subject');
$pa_ancestors = $this->getVar('ancestors');
$pn_id = $this->getVar('id');
$ps_id_prefix = $this->getVar('placement_code') . $this->getVar('id_prefix') . 'HierNavigation';
$va_lookup_urls = caJSONLookupServiceUrl($this->request, $t_subject->tableName(), array('noInline' => 1));
$pa_bundle_settings = $this->getVar('settings');
$vb_objects_x_collections_hierarchy_enabled = (bool) $t_subject->getAppConfig()->get('ca_objects_x_collections_hierarchy_enabled');
if (in_array($t_subject->tableName(), array('ca_objects', 'ca_collections')) && $vb_objects_x_collections_hierarchy_enabled) {
    $va_lookup_urls = array('search' => caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'Get'), 'levelList' => caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'GetHierarchyLevel'), 'ancestorList' => caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'GetHierarchyAncestorList'));
    $vs_edit_url = caNavUrl($this->request, 'lookup', 'ObjectCollectionHierarchy', 'Edit') . '/id/';
    $vn_init_id = $t_subject->tableName() . "-" . $pn_id;
} else {
    $va_lookup_urls = caJSONLookupServiceUrl($this->request, $t_subject->tableName(), array('noInline' => 1));
    $vs_edit_url = caEditorUrl($this->request, $t_subject->tableName());
    $vn_init_id = $pn_id;
}
print caEditorBundleShowHideControl($this->request, $ps_id_prefix . $t_subject->tableNum() . 'HierNavigation');
?>
	
	<div class="bundleContainer" id="<?php 
print $ps_id_prefix . $t_subject->tableNum();
?>
HierNavigation">
		<div class="hierNav">
<?php 
if ($pn_id > 0) {
    ?>
			<div class="buttonPosition" <?php 
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:hierarchy_navigation.php

示例9: caFormControlBox

<?php 
print $vs_control_box = caFormControlBox(caFormSubmitButton($this->request, __CA_NAV_BUTTON_SAVE__, _t("Save"), 'ElementsForm') . ' ' . caNavButton($this->request, __CA_NAV_BUTTON_CANCEL__, _t("Cancel"), '', 'administrate/setup', 'Elements', 'Index', array('element_id' => 0)), '', caNavButton($this->request, __CA_NAV_BUTTON_DELETE__, _t("Delete"), '', 'administrate/setup', 'Elements', 'Delete', array('element_id' => $vn_element_id)));
print caFormTag($this->request, 'Save', 'ElementsForm');
?>

<div class="bundleLabel">
	<span class="formLabelText" id="_ca_metadata_element_labels_"><?php 
print _t("Labels");
?>
</span>
<?php 
print $t_element->getPreferredLabelHTMLFormBundle($this->request, 'element_labels', 'element_labels');
?>
</div>
<?php 
$va_lookup_url_info = caJSONLookupServiceUrl($this->request, $t_element->tableName());
$va_options = array('error_icon' => $this->request->getThemeUrlPath() . "/graphics/icons/warning_small.gif", 'progress_indicator' => $this->request->getThemeUrlPath() . "/graphics/icons/indicator.gif", 'lookup_url' => $va_lookup_url_info['intrinsic'], 'no_tooltips' => false);
foreach ($t_element->getFormFields() as $vs_f => $va_user_info) {
    print $t_element->htmlFormElement($vs_f, null, array_merge($va_options, array('field_errors' => $this->request->getActionErrors('field_' . $vs_f))));
}
if ($vn_parent_id) {
    print caHTMLHiddenInput('parent_id', array('value' => $vn_parent_id));
}
if (!is_array($va_available_settings = $this->getVar('available_settings'))) {
    $va_available_settings = array();
}
?>
		<div id='elementSettingsForm' class='formSettings'>
			<div class='formLabel'><span id="_ca_metadata_element_labels_"><?php 
print _t("Datatype-specific options");
?>
开发者ID:idiscussforum,项目名称:providence,代码行数:31,代码来源:elements_edit_html.php

示例10: getSetItemHTMLFormBundle

 /**
  * Renders and returns HTML form bundle for management of items in the currently loaded set
  * 
  * @param object $po_request The current request object
  * @param string $ps_form_name The name of the form in which the bundle will be rendered
  *
  * @return string Rendered HTML bundle for display
  */
 public function getSetItemHTMLFormBundle($po_request, $ps_form_name, $ps_placement_code, $pa_options = null, $pa_bundle_settings = null)
 {
     if ($this->getItemCount() > 50) {
         $vs_thumbnail_version = 'tiny';
     } else {
         $vs_thumbnail_version = "thumbnail";
     }
     $o_view = new View($po_request, $po_request->getViewsDirectoryPath() . '/bundles/');
     $o_view->setVar('t_set', $this);
     $o_view->setVar('id_prefix', $ps_form_name);
     $o_view->setVar('placement_code', $ps_placement_code);
     $o_view->setVar('request', $po_request);
     if ($this->getPrimaryKey()) {
         $va_items = caExtractValuesByUserLocale($this->getItems(array('thumbnailVersion' => $vs_thumbnail_version, 'user_id' => $po_request->getUserID(), 'template' => caGetOption('displayTemplate', $pa_bundle_settings, null))), null, null, array());
         $o_view->setVar('items', $va_items);
     } else {
         $o_view->setVar('items', array());
     }
     $o_view->setVar('settings', $pa_bundle_settings);
     if ($t_row = $this->getItemTypeInstance()) {
         $o_view->setVar('t_row', $t_row);
         $o_view->setVar('type_singular', $t_row->getProperty('NAME_SINGULAR'));
         $o_view->setVar('type_plural', $t_row->getProperty('NAME_PLURAL'));
     }
     $o_view->setVar('lookup_urls', caJSONLookupServiceUrl($po_request, $this->_DATAMODEL->getTableName($this->get('table_num'))));
     return $o_view->render('ca_set_items.php');
 }
开发者ID:kai-iak,项目名称:providence,代码行数:35,代码来源:ca_sets.php

示例11: getSearchFormHTMLFormBundle

 /**
  * Returns HTML bundle for adding/editing/deleting placements from a form
  *
  * @param object $po_request The current request
  * @param $ps_form_name The name of the HTML form this bundle will be part of
  * @return string HTML for bundle
  */
 public function getSearchFormHTMLFormBundle($po_request, $ps_form_name, $pa_options = null)
 {
     if (!$this->haveAccessToForm($po_request->getUserID(), __CA_SEARCH_FORM_EDIT_ACCESS__)) {
         return null;
     }
     $vs_view_path = isset($pa_options['viewPath']) && $pa_options['viewPath'] ? $pa_options['viewPath'] : $po_request->getViewsDirectoryPath();
     $o_view = new View($po_request, "{$vs_view_path}/bundles/");
     $o_view->setVar('lookup_urls', caJSONLookupServiceUrl($po_request, $this->_DATAMODEL->getTableName($this->get('table_num'))));
     $o_view->setVar('t_form', $this);
     $o_view->setVar('id_prefix', $ps_form_name);
     return $o_view->render('ca_search_form_placements.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:19,代码来源:ca_search_forms.php

示例12: caJSONLookupServiceUrl

 * the terms of the provided license as published by Whirl-i-Gig
 *
 * CollectiveAccess is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 *
 * This source code is free and modifiable under the terms of 
 * GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
 * the "license.txt" file for details, or visit the CollectiveAccess web site at
 * http://www.CollectiveAccess.org
 *
 * ----------------------------------------------------------------------
 */
$t_subject = $this->getVar('t_subject');
$vs_table = $t_subject->tableName();
$va_lookup_urls = caJSONLookupServiceUrl($this->request, $vs_table, array('noInline' => 1));
$vo_result_context = $this->getVar('result_context');
$vs_type_id_form_element = '';
if ($vn_type_id = intval($this->getVar('type_id'))) {
    $vs_type_id_form_element = '<input type="hidden" name="type_id" value="' . $vn_type_id . '"/>';
}
if (!$this->request->isAjax()) {
    if (!$this->getVar('uses_hierarchy_browser')) {
        ?>
		<?php 
        print caFormTag($this->request, 'Index', 'BasicSearchForm', null, 'post', 'multipart/form-data', '_top', array('disableUnsavedChangesWarning' => true));
        print caFormControlBox('<div class="simple-search-box">' . _t('Search') . ': <input type="text" id="BasicSearchInput" name="search" value="' . htmlspecialchars($this->getVar('search'), ENT_QUOTES, 'UTF-8') . '" size="40"/>' . $vs_type_id_form_element . '</div>', '<a href="#" onclick="caSaveSearch(\'BasicSearchForm\', jQuery(\'#BasicSearchInput\').val(), [\'search\']); return false;" class="button">' . _t('Save search') . ' &rsaquo;</a>', caFormSubmitButton($this->request, __CA_NAV_BUTTON_SEARCH__, _t("Search"), 'BasicSearchForm'));
        ?>
		</form>
	<?php 
    } else {
开发者ID:guaykuru,项目名称:pawtucket,代码行数:31,代码来源:search_controls_html.php

示例13: caJSONLookupServiceUrl

	
	<div class="quickAddFormTopPadding"><!-- empty --></div>
	<div class="quickAddErrorContainer" id="<?php 
print $vs_form_name;
?>
Errors<?php 
print $vs_field_name_prefix . $vs_n;
?>
"> </div>
	<div class="quickAddSectionBox" id="{$vs_form_name}Container<?php 
print $vs_field_name_prefix . $vs_n;
?>
">
<?php 
// Output hierarchy browser
$va_lookup_urls = caJSONLookupServiceUrl($this->request, 'ca_places');
?>
	<div class='bundleLabel'><span class="formLabelText"><?php 
print _t('Location in hierarchy');
?>
</span><br/>
		<div class="bundleContainer">
			<div class="caItemList">
				<div class="hierarchyBrowserContainer">
					<div id="caQuickAdd<?php 
print $vs_form_name;
?>
HierarchyBrowser" class="hierarchyBrowserSmall">
						<!-- Content for hierarchy browser is dynamically inserted here by ca.hierbrowser -->
					</div><!-- end hierbrowser -->
					<div>
开发者ID:idiscussforum,项目名称:providence,代码行数:30,代码来源:quickadd_html.php

示例14: htmlFormElementForSimpleForm

 /**
  * Returns HTML form input widget for bundle specified by standard "get" bundle code (eg. <table_name>.<bundle_name> format) suitable
  * for use in a simple data entry form, such as the front-end "contribute" user-provided content submission form
  *
  * This method handles generation of search form widgets for intrinsic fields in the primary table. If this method can't handle 
  * the bundle (because it is not an intrinsic field in the primary table...) it will return null.
  *
  * @param $po_request HTTPRequest
  * @param $ps_field string
  * @param $pa_options array
  * @return string HTML text of form element. Will return null if it is not possible to generate an HTML form widget for the bundle.
  * 
  */
 public function htmlFormElementForSimpleForm($po_request, $ps_field, $pa_options = null)
 {
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     if (isset($pa_options['width'])) {
         if ($va_dim = caParseFormElementDimension($pa_options['width'])) {
             if ($va_dim['type'] == 'pixels') {
                 unset($pa_options['width']);
                 $pa_options['maxPixelWidth'] = $va_dim['dimension'];
             }
         }
     }
     $va_tmp = explode('.', $ps_field);
     if ($va_tmp[0] != $this->tableName()) {
         return null;
     }
     if ($this->hasField($va_tmp[1])) {
         if (caGetOption('asArrayElement', $pa_options, false)) {
             $ps_field .= "[]";
         }
         if ($this->getProperty('ID_NUMBERING_ID_FIELD') == $va_tmp[1]) {
             $va_lookup_url_info = caJSONLookupServiceUrl($po_request, $this->tableName());
             return $this->htmlFormElement($va_tmp[1], $this->getAppConfig()->get('idno_element_display_format_without_label'), array_merge($pa_options, array('name' => $ps_field, 'error_icon' => $po_request->getThemeUrlPath() . "/graphics/icons/warning_small.gif", 'progress_indicator' => $po_request->getThemeUrlPath() . "/graphics/icons/indicator.gif", 'id' => str_replace(".", "_", $ps_field), 'classname' => isset($pa_options['class']) ? $pa_options['class'] : '', 'value' => isset($pa_options['values'][$ps_field]) ? $pa_options['values'][$ps_field] : '', 'width' => isset($pa_options['width']) && $pa_options['width'] > 0 ? $pa_options['width'] : 30, 'height' => isset($pa_options['height']) && $pa_options['height'] > 0 ? $pa_options['height'] : 1, 'no_tooltips' => true, 'lookup_url' => $va_lookup_url_info['intrinsic'], 'request' => $po_request)));
         }
         return $this->htmlFormElement($va_tmp[1], '^ELEMENT', array_merge($pa_options, array('name' => $ps_field, 'id' => str_replace(".", "_", $ps_field), 'classname' => isset($pa_options['class']) ? $pa_options['class'] : '', 'value' => isset($pa_options['values'][$ps_field]) ? $pa_options['values'][$ps_field] : '', 'width' => isset($pa_options['width']) && $pa_options['width'] > 0 ? $pa_options['width'] : 30, 'height' => isset($pa_options['height']) && $pa_options['height'] > 0 ? $pa_options['height'] : 1, 'no_tooltips' => true)));
     }
     return null;
 }
开发者ID:samrahman,项目名称:providence,代码行数:42,代码来源:BaseModel.php

示例15: intval

 *
 * ----------------------------------------------------------------------
 */
$va_facet = $this->getVar('grouped_facet');
$vs_facet_name = $this->getVar('facet_name');
$va_facet_info = $this->getVar('facet_info');
$vs_grouping_field = $this->getVar('grouping');
$vs_group_mode = $va_facet_info["group_mode"];
$t_item = $this->getVar('t_item');
$t_subject = $this->getVar('t_subject');
$va_types = $this->getVar('type_list');
$va_relationship_types = $this->getVar('relationship_type_list');
$va_row_size = $this->request->config->get('browse_row_size');
$va_td_width = intval(100 / $va_row_size);
$vb_individual_group_display = (bool) $this->getVar('individual_group_display');
$va_service_urls = caJSONLookupServiceUrl($this->request, $va_facet_info['table'], array('noInline' => 1, 'noSymbols' => 1));
if (!$va_facet || !$vs_facet_name) {
    print _t('No facet defined');
    return;
}
$vm_modify_id = $this->getVar('modify') ? $this->getVar('modify') : '0';
?>
<script type="text/javascript">
	function caUpdateFacetDisplay(grouping) {
		caUIBrowsePanel.showBrowsePanel('<?php 
print $vs_facet_name;
?>
', <?php 
print intval($vm_modify_id) > 0 ? 'true' : 'false';
?>
, <?php 
开发者ID:idiscussforum,项目名称:providence,代码行数:31,代码来源:ajax_browse_facet_html.php


注:本文中的caJSONLookupServiceUrl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。