本文整理汇总了PHP中Utils_RecordBrowserCommon::create_linked_label_r方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils_RecordBrowserCommon::create_linked_label_r方法的具体用法?PHP Utils_RecordBrowserCommon::create_linked_label_r怎么用?PHP Utils_RecordBrowserCommon::create_linked_label_r使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utils_RecordBrowserCommon
的用法示例。
在下文中一共展示了Utils_RecordBrowserCommon::create_linked_label_r方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_company
public static function display_company($record, $nolink = false)
{
$def = Utils_RecordBrowserCommon::create_linked_label_r('company', 'Company Name', $record, $nolink);
if (!$def) {
return '---';
}
return $def;
}
示例2: display_title
public static function display_title($record, $nolink)
{
$ret = Utils_RecordBrowserCommon::create_linked_label_r('task', 'Title', $record, $nolink);
if (isset($record['description']) && $record['description'] != '' && !MOBILE_DEVICE) {
$ret = '<span ' . Utils_TooltipCommon::open_tag_attrs(Utils_RecordBrowserCommon::format_long_text($record['description']), false) . '>' . $ret . '</span>';
}
return $ret;
}
示例3: watchdog_label
public static function watchdog_label($tab, $cat, $rid, $events = array(), $label = null, $details = true)
{
$ret = array('category' => $cat);
if ($rid !== null) {
$r = self::get_record($tab, $rid);
if ($r === null) {
return null;
}
if (!self::get_access($tab, 'view', $r)) {
return null;
}
if (is_array($label)) {
$label = Utils_RecordBrowserCommon::record_link_open_tag_r($tab, $r) . call_user_func($label, $r, true) . Utils_RecordBrowserCommon::record_link_close_tag();
$label = self::create_default_record_tooltip_ajax($label, $tab, $rid);
} elseif ($label) {
$label = Utils_RecordBrowserCommon::create_linked_label_r($tab, $label, $r);
$label = self::create_default_record_tooltip_ajax($label, $tab, $rid);
} else {
$label = Utils_RecordBrowserCommon::create_default_linked_label($tab, $rid, false, false);
}
$ret['title'] = $label;
$ret['view_href'] = Utils_RecordBrowserCommon::create_record_href($tab, $rid);
$events_display = array();
$events = array_reverse($events);
$other_events = array();
$header = false;
foreach ($events as $v) {
if (count($events_display) > 20) {
$other_events[__('And more...')] = 1;
break;
}
$param = explode('_', $v);
switch ($param[0]) {
case 'C':
$what = 'Created';
$event_display = array('who' => Base_UserCommon::get_user_label($r['created_by'], true), 'when' => Base_RegionalSettingsCommon::time2reg($r['created_on']), 'what' => _V($what));
break;
case 'D':
if (!isset($what)) {
$what = 'Deleted';
}
case 'R':
if (!isset($what)) {
$what = 'Restored';
}
if (!isset($param[1])) {
$event_display = array('who' => '', 'when' => '', 'what' => _V($what));
break;
}
case 'E':
$event_display = self::get_edit_details_modify_record($tab, $r['id'], $param[1], $details);
if (isset($event_display['what']) && !empty($event_display['what'])) {
$header = true;
}
break;
case 'N':
$event_display = false;
switch ($param[1]) {
case '+':
$action = __('Note linked');
break;
case '-':
$action = __('Note unlinked');
break;
default:
if (!isset($other_events[$param[1]])) {
$other_events[$param[1]] = 0;
}
$other_events[$param[1]]++;
$event_display = null;
break;
}
if ($event_display === false) {
$date = isset($param[3]) ? Base_RegionalSettingsCommon::time2reg($param[3]) : '';
$who = isset($param[4]) ? Base_UserCommon::get_user_label($param[4], true) : '';
$action .= ' - ' . self::create_default_linked_label('utils_attachment', $param[2]);
$event_display = array('what' => $action, 'who' => $who, 'when' => $date);
}
break;
default:
$event_display = array('what' => _V($v));
}
if ($event_display) {
$events_display[] = $event_display;
}
}
foreach ($other_events as $k => $v) {
$events_display[] = array('what' => _V($k) . ($v > 1 ? ' [' . $v . ']' : ''));
}
if ($events_display) {
$theme = Base_ThemeCommon::init_smarty();
if ($header) {
$theme->assign('header', array(__('Field'), __('Old value'), __('New value')));
}
$theme->assign('events', $events_display);
$tpl = 'changes_list';
if (Utils_WatchdogCommon::email_mode()) {
$record_data = self::get_record_tooltip_data($tab, $rid);
$theme->assign('record', $record_data);
$tpl = 'changes_list_email';
//.........这里部分代码省略.........
示例4: display_cname
public static function display_cname($v, $nolink)
{
return Utils_RecordBrowserCommon::create_linked_label_r('company', 'Company Name', $v, $nolink);
}
示例5: display_subject
public static function display_subject($record, $nolink, $desc)
{
/* static $last_message_id = null;*/
if (isset($record['body'])) {
$chars_count = 100;
$body_preview = strip_tags($record['body']);
if (strlen($body_preview) > $chars_count) {
$body_preview = substr($body_preview, 0, $chars_count) . " ...";
}
$subject_label = Utils_RecordBrowserCommon::create_linked_label_r('rc_mails', 'subject', $record, $nolink);
$subject_label = Utils_TooltipCommon::create($subject_label, "<pre class=\"wrap\">{$body_preview}</pre>", false);
$ret = $subject_label . '<br />From: ' . $record['from'] . '<br />To: ' . $record['to'] . '<br />';
} else {
$ret = Utils_RecordBrowserCommon::create_linked_label_r('rc_mail_threads', 'subject', $record, $nolink);
}
/* $replies = '<div style="text-align:center;float:right;width:20px;font-size:16px;line-height:20px;padding:8px;border-radius:18px;height:20px;background-color:gray;color:white;" class="num_of_replies"></div>';
if(!$record['references'] || !$last_message_id || strpos($record['references'],$last_message_id)===false) {
$last_message_id = $record['message_id'];
return $replies.$ret;
}
if(!$last_message_id) return $replies.$ret;
return '<div style="margin-left:20px" class="reply parent_'.md5($last_message_id).'">'.$ret.'</div>';*/
return $ret;
}
示例6: display_asset_id
public static function display_asset_id($r, $nolink)
{
return Utils_RecordBrowserCommon::create_linked_label_r('crm_assets', 'asset_id', $r, $nolink);
}
示例7: display_subject
public static function display_subject($record, $nolink = false)
{
$ret = Utils_RecordBrowserCommon::create_linked_label_r('phonecall', 'Subject', $record, $nolink);
if (!$nolink && isset($record['description']) && $record['description'] != '') {
$ret = '<span ' . Utils_TooltipCommon::open_tag_attrs(Utils_RecordBrowserCommon::format_long_text($record['description']), false) . '>' . $ret . '</span>';
}
return $ret;
}