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


PHP Utils_RecordBrowserCommon::get_caption方法代码示例

本文整理汇总了PHP中Utils_RecordBrowserCommon::get_caption方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils_RecordBrowserCommon::get_caption方法的具体用法?PHP Utils_RecordBrowserCommon::get_caption怎么用?PHP Utils_RecordBrowserCommon::get_caption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils_RecordBrowserCommon的用法示例。


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

示例1: admin

 public function admin()
 {
     if ($this->is_back()) {
         if ($this->parent->get_type() == 'Base_Admin') {
             $this->parent->reset();
         } elseif (Base_BoxCommon::main_module_instance()->get_type() == $this->get_type()) {
             Base_BoxCommon::pop_main();
         }
         return;
     }
     Base_ActionBarCommon::add('back', __('Back'), $this->create_back_href());
     $gb = $this->init_module(Utils_GenericBrowser::module_name(), null, 'rb_custom');
     $gb->set_table_columns(array(array('name' => __('Table')), array('name' => __('Caption')), array('name' => __('Menu Entry'))));
     $tabs = DB::GetAll('SELECT * FROM recordbrowser_custom_recordsets ORDER BY tab ASC');
     foreach ($tabs as $t) {
         $gbr = $gb->get_new_row();
         if (!$t['active']) {
             $gbr->add_action($this->create_callback_href(array($this, 'set_active'), array($t['id'], true)), 'Activate', null, 'active-off');
         } else {
             $gbr->add_action($this->create_callback_href(array($this, 'set_active'), array($t['id'], false)), 'Deactivate', null, 'active-on');
         }
         $gbr->add_action($this->create_callback_href(array($this, 'edit_rset'), array($t['id'])), 'edit');
         $table_name = $t['tab'];
         $table_href = $this->create_callback_href(array($this, 'manage_recordset'), array($table_name));
         $gbr->add_data("<a {$table_href}>{$table_name}</a>", Utils_RecordBrowserCommon::get_caption($t['tab']), str_replace(Utils_RecordBrowser_CustomRecordsetsCommon::$sep, ' -> ', $t['menu']));
     }
     Base_ActionBarCommon::add('new', __('Create new'), $this->create_callback_href(array($this, 'edit_rset')));
     $this->display_module($gb);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:29,代码来源:CustomRecordsets_0.php

示例2: print_document

 /**
  * This method is responsible for printing document.
  *
  * Example code:
  * <code>
  * $section = $this->new_section();
  * $section->assign('data', $data);
  * $this->print_section('section_name', $section);
  * </code>
  *
  * @param mixed $data This is a value that is passed to get_href method
  *
  * @see new_section
  * @see print_section
  * @see set_footer
  * @return null It doesn't have to return value
  */
 protected function print_document($data)
 {
     $tab = $data['tab'];
     $record_id = $data['record_id'];
     $printable_data = $this->format_values($tab, $record_id);
     $this->get_document()->set_filename($tab . '_' . $record_id);
     $section = $this->new_section();
     $section->assign('cols', $this->cols());
     $section->assign('caption', Utils_RecordBrowserCommon::get_caption($tab));
     $section->assign('record_id', $record_id);
     $section->assign('data', $printable_data);
     $this->print_section('record', $section);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:30,代码来源:RecordPrinter.php

示例3: display_recordset

 public static function display_recordset($r, $nolink = false)
 {
     $caption = Utils_RecordBrowserCommon::get_caption($r['recordset']);
     return $caption . ' (' . $r['recordset'] . ')';
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:5,代码来源:TasksCommon_0.php

示例4: setup_loader

    public function setup_loader() {
        if (isset($_REQUEST['field_pos'])) {
            list($field, $position) = $_REQUEST['field_pos'];
            // adjust position
            $position += 2;
            Utils_RecordBrowserCommon::change_field_position($this->tab, $field, $position);
        }
        $this->init(true);
        $action = $this->get_module_variable_or_unique_href_variable('setup_action', 'show');
        $subject = $this->get_module_variable_or_unique_href_variable('subject', 'regular');
		
		$full_access = Base_AdminCommon::get_access('Utils_RecordBrowser', 'fields')==2;

		if ($full_access) {
			Base_ActionBarCommon::add('add',__('New field'),$this->create_callback_href(array($this, 'view_field')));
			Base_ActionBarCommon::add('add',__('New page'),$this->create_callback_href(array($this, 'new_page')));
		}
        $gb = $this->init_module('Utils/GenericBrowser', null, 'fields');
        $gb->set_table_columns(array(
            array('name'=>__('Field'), 'width'=>20),
            array('name'=>__('Caption'), 'width'=>20),
            array('name'=>__('Type'), 'width'=>10),
            array('name'=>__('Table view'), 'width'=>5),
            array('name'=>__('Tooltip'), 'width'=>5),
            array('name'=>__('Required'), 'width'=>5),
            array('name'=>__('Filter'), 'width'=>5),
            array('name'=>__('Export'), 'width'=>5),
            array('name'=>__('Parameters'), 'width'=>27),
            array('name'=>__('Value display function'), 'width'=>5),
            array('name'=>__('Field generator function'), 'width'=>5)
		));
		
		$display_callbacbacks = DB::GetAssoc('SELECT field, callback FROM '.$this->tab.'_callback WHERE freezed=1');
		$QFfield_callbacbacks = DB::GetAssoc('SELECT field, callback FROM '.$this->tab.'_callback WHERE freezed=0');

        //read database
        $rows = end($this->table_rows);
		$rows = $rows['position'];
        foreach($this->table_rows as $field=>$args) {
            $gb_row = $gb->get_new_row();
			if ($full_access) {
				if ($args['type'] != 'page_split') {
					$gb_row->add_action($this->create_callback_href(array($this, 'view_field'),array('edit',$field)),'Edit');
				} elseif ($field!='General') {
					$gb_row->add_action($this->create_callback_href(array($this, 'delete_page'),array($field)),'Delete');
					$gb_row->add_action($this->create_callback_href(array($this, 'edit_page'),array($field)),'Edit');
				}
				if ($args['type']!=='page_split' && $args['extra']){
					if ($args['active']) $gb_row->add_action($this->create_callback_href(array($this, 'set_field_active'),array($field, false)),'Deactivate', null, 'active-on');
					else $gb_row->add_action($this->create_callback_href(array($this, 'set_field_active'),array($field, true)),'Activate', null, 'active-off');
				}
                if ($field != 'General') {
                    $gb_row->add_action('class="move-handle"','Move', __('Drag to change field position'), 'move-up-down');
                    $gb_row->set_attrs("field_name=\"$field\" class=\"sortable\"");
                }
			}
            switch ($args['type']) {
				case 'text':
					$args['param'] = __('Length').' '.$args['param'];
					break;
				case 'select':
				case 'multiselect':
					$reg = explode(';', $args['param']);
					$rege = explode('::', $reg[0]);
					if ($rege[0]=='__COMMON__') {
						$args['param'] = array('array_id'=>$rege[1], 'order_by_key'=>(isset($rege[2]) && $rege[2]=='key'));
						$args['type'] = 'multiselect';
					} elseif ($rege[0]=='__RECORDSETS__') {
						$param = __('Source').': Record Sets'.'<br/>';
						$param .= __('Crits callback').': '.(!isset($reg[1]) || $reg[1]=='::'?'---':$reg[1]);
						$args['param'] = $param;
						break;
					} else {
						$param = __('Source').': Record Set'.'<br/>';
						$param .= __('Recordset').': '.Utils_RecordBrowserCommon::get_caption($rege[0]).' ('.$rege[0].')<br/>';
						$fs = explode('|', isset($rege[1])?$rege[1]:'');
						foreach ($fs as $k=>$v)
							$fs[$k] = _V($v); // ****** RecordBrowser - field name
						$param .= __('Related field(s)').': '.(implode(', ',$fs)).'<br/>';
						$param .= __('Crits callback').': '.(!isset($reg[1]) || $reg[1]=='::'?'---':$reg[1]);
						$args['param'] = $param;
						break;
					}
				case 'commondata':
					if ($args['type']=='commondata') $args['type'] = 'select';
					$param = __('Source').': CommonData'.'<br/>';
					$param .= __('Table').': '.$args['param']['array_id'].'<br/>';
					$param .= __('Order by').': '.($args['param']['order_by_key']?__('Key'):__('Value'));
					$args['param'] = $param;
					break;
                case 'time':
                case 'timestamp':
                    $interval = $args['param'] ? $args['param'] : __('Default');
                    $args['param'] = __('Minutes Interval') . ': ' . $interval;
                    break;
				default:
					$args['param'] = '';
			}
			$types = array(
				'hidden'=>__('Hidden'),
//.........这里部分代码省略.........
开发者ID:62BRAINS,项目名称:EPESI,代码行数:101,代码来源:RecordBrowser_0.php

示例5: get_caption

 /**
  * Retrieve currrent caption of RecordSet.
  * @return string caption
  */
 public function get_caption()
 {
     return Utils_RecordBrowserCommon::get_caption($this->tab);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:8,代码来源:Recordset.php

示例6: body

 public function body()
 {
     if (!Base_AclCommon::check_permission('View Activity Report')) {
         return;
     }
     $rb_tabs = DB::GetAssoc('SELECT tab, caption FROM recordbrowser_table_properties ORDER BY caption');
     foreach ($rb_tabs as $k => $v) {
         $rb_tabs[$k] = Utils_RecordBrowserCommon::get_caption($k);
     }
     $form = $this->init_module('Libs/QuickForm');
     $users_count = DB::GetOne('SELECT COUNT(id) FROM user_login') > Base_User_SettingsCommon::get('Utils_RecordBrowser', 'enable_autocomplete');
     if ($users_count) {
         $crits = array('!login' => '');
         $fcallback = array('CRM_ContactsCommon', 'contact_format_no_company');
         $form->addElement('autoselect', 'user', __('User'), array(), array(array('CRM_ContactsCommon', 'autoselect_contact_suggestbox'), array($crits, $fcallback)), $fcallback);
     } else {
         $users = DB::GetAssoc('SELECT id, id FROM user_login');
         foreach ($users as $k => $u) {
             $users[$k] = Base_UserCommon::get_user_label($u, true);
         }
         asort($users);
         $users = array('' => '[' . __('All') . ']') + $users;
         $form->addElement('select', 'user', __('User'), $users);
     }
     $form->addElement('multiselect', 'recordsets', __('Record Type'), $rb_tabs);
     $form->addElement('checkbox', 'new', __('New record'));
     $form->addElement('checkbox', 'edit', __('Record edit'));
     $form->addElement('checkbox', 'delete_restore', __('Record Delete/restore'));
     $form->addElement('checkbox', 'file', __('Files'));
     $form->addElement('datepicker', 'start_date', __('Start Date'));
     $form->addElement('datepicker', 'end_date', __('End Date'));
     //$form->addElement('submit', 'submit', __('Show'));
     Base_ActionBarCommon::add('search', __('Show'), $form->get_submit_form_href());
     $filters = $this->get_module_variable('filters', array('user' => '', 'new' => 1, 'edit' => 1, 'delete_restore' => 1, 'recordsets' => array_keys($rb_tabs), 'start_date' => date('Y-m-01'), 'end_date' => date('Y-m-d')));
     if ($form->validate()) {
         $filters = $form->exportValues();
         $this->set_module_variable('filters', $filters);
     }
     $form->setDefaults($filters);
     $theme = $this->init_module('Base/Theme');
     $form->assign_theme('form', $theme);
     $theme->display();
     $filters['recordsets'] = array_flip($filters['recordsets']);
     foreach ($rb_tabs as $k => $v) {
         if (!isset($filters['recordsets'][$k])) {
             unset($rb_tabs[$k]);
         }
     }
     $gb = $this->init_module('Utils/GenericBrowser', null, 'activity_report');
     $gb->set_table_columns(array(array('name' => __('Date'), 'width' => 40), array('name' => __('User'), 'width' => 40), array('name' => __('Type'), 'width' => 40), array('name' => __('Label')), array('name' => __('Actions taken'), 'width' => 40)));
     $tables = array();
     if ($users_count) {
         $filters['user'] = CRM_ContactsCommon::get_contact($filters['user']);
         $filters['user'] = $filters['user']['login'];
     }
     $af_where = array();
     foreach ($rb_tabs as $k => $t) {
         $af_where[] = 'ual.local ' . DB::like() . ' ' . DB::Concat(DB::qstr($k . '/'), DB::qstr('%'));
     }
     $af_where = count($af_where) ? ' (' . implode(' OR ', $af_where) . ')' : 'TRUE ';
     $e_where = array();
     $c_where = '';
     if ($filters['user']) {
         $e_where[] = ' edited_by = ' . $filters['user'];
         $c_where = ' created_by = ' . $filters['user'];
         $af_where .= ' AND uaf.created_by = ' . $filters['user'];
     }
     if (isset($filters['edit'])) {
         if (!isset($filters['delete_restore'])) {
             $e_where[] = ' ehd.field!=' . DB::qstr('id');
         }
     } else {
         if (isset($filters['delete_restore'])) {
             $e_where[] = ' ehd.field=' . DB::qstr('id');
         }
     }
     if ($filters['start_date']) {
         $date = DB::qstr(date('Y-m-d', strtotime($filters['start_date'])));
         $af_where .= ' AND uaf.created_on >= ' . $date;
         $c_where .= ($c_where ? ' AND' : '') . ' created_on >= ' . $date;
         $e_where[] = ' edited_on >= ' . $date;
     }
     if ($filters['end_date']) {
         $date = DB::qstr(date('Y-m-d 23:59:59', strtotime($filters['end_date'])));
         $af_where .= ' AND uaf.created_on <= ' . $date;
         $c_where .= ($c_where ? ' AND' : '') . ' created_on <= ' . $date;
         $e_where[] = ' edited_on <= ' . $date;
     }
     if (!empty($e_where)) {
         $e_where = ' WHERE' . implode(' AND', $e_where);
     } else {
         $e_where = '';
     }
     if ($c_where) {
         $c_where = ' WHERE' . $c_where;
     }
     $postgre_cast_type = DB::is_postgresql() ? '::varchar' : '';
     // **** files ****
     if (isset($filters['file'])) {
         $tables[] = 'SELECT uaf.id AS id,uaf.created_on AS edited_on,uaf.created_by AS edited_by, ual.local AS r_id, ' . DB::qstr('') . ' AS tab, ' . DB::qstr('file') . ' AS action FROM utils_attachment_file uaf INNER JOIN utils_attachment_data_1 ua ON uaf.attach_id=ua.id INNER JOIN utils_attachment_local ual ON ua.id=ual.attachment WHERE original!=' . DB::qstr('') . ' AND ' . $af_where;
//.........这里部分代码省略.........
开发者ID:62BRAINS,项目名称:EPESI,代码行数:101,代码来源:ActivityReport_0.php

示例7: array

        if ($qry) {
            $arrRow = array();
            $result = "";
            while ($rowValue = $qry->FetchRow()) {
                $rowValue["RECORD_SET"] = $key;
                $arrayKey[] = $rowValue;
            }
        }
    }
    if (is_array($arrayKey) && !empty($arrayKey)) {
        foreach ($arrayKey as $rows) {
            $result = "";
            $keyRecordset = $rows["RECORD_SET"];
            foreach ($formatString[$keyRecordset] as $keyIdx) {
                $result .= $rows[$keyIdx] . " ";
            }
            //Tooltip Code = <span ".Utils_TooltipCommon::open_tag_attrs($tooltip , false)."><img border='0' src='data/Base_Theme/templates/default/Utils/GenericBrowser/info.png'></span>
            $tooltip = ucwords($result);
            print "<tr style='background:#FFFFD5;'> \n\t\t\t\t\t\t<td class='Utils_GenericBrowser__td' style='width:80%;height:20px'></td>\n\t\t\t\t\t\t<td class='Utils_GenericBrowser__td' style='width:80%;height:20px'> <a onclick=\"_chj('__jump_to_RB_table=" . $keyRecordset . "&amp;__jump_to_RB_record=" . $rows["id"] . "&amp;__jump_to_RB_action=view', '', '');\" href=\"javascript: void(0)\">" . ucwords($result) . "</a></td>\n\t\t\t\t\t\t<td class='Utils_GenericBrowser__td' style='width:10%'>" . Utils_RecordBrowserCommon::get_caption($keyRecordset) . "</td></tr>";
        }
    }
}
$content = ob_get_contents();
ob_end_clean();
require_once 'libs/minify/HTTP/Encoder.php';
$he = new HTTP_Encoder(array('content' => $content));
if (MINIFY_ENCODE) {
    $he->encode();
}
$he->sendAll();
exit;
开发者ID:62BRAINS,项目名称:EPESI,代码行数:31,代码来源:getresult.php

示例8: get_recordsets

 public function get_recordsets()
 {
     $options = array();
     $rb_tabs = DB::GetAssoc('SELECT tab, tpl FROM recordbrowser_table_properties');
     if ($rb_tabs) {
         foreach ($rb_tabs as $key => $value) {
             $options[$key] = Utils_RecordBrowserCommon::get_caption($key);
         }
     }
     return $options;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:11,代码来源:QuickSearchCommon_0.php


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