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


PHP X2Html::x2icon方法代码示例

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


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

示例1: array

            <div class="icon-container">
                <?php 
echo X2Html::x2icon('service');
?>
            </div>
            <div class="icon-description">
                <p> <?php 
echo CHtml::link(Yii::t('help', 'Services'), array('/services/services/index'));
?>
 </p>
            </div>
        </div>
        <div class="row">
            <div class="icon-container">
                <?php 
echo X2Html::x2icon('funnel');
?>
            </div>
            <div class="icon-description">
                <p> <?php 
echo CHtml::link(Yii::t('workflow', 'Process'), array('/workflow/workflow/index'));
?>
 </p>
            </div>
        </div>
    </div>
</div>

<?php 
Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/activityFeed.css');
/* The event icons are assigned in activityFeed.css, so this way reuses the assignments there */
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:iconreference.php

示例2: generateFeedEmail

    public static function generateFeedEmail($filters, $userId, $range, $limit, $eventId, $deleteKey)
    {
        $image = Yii::app()->getAbsoluteBaseUrl(true) . '/images/x2engine.png';
        $msg = "<div id='wrap' style='width:6.5in;height:9in;margin-top:auto;margin-left:auto;margin-bottom:auto;margin-right:auto;'><html><body><center>";
        $msg .= '<table border="0" cellpadding="0" cellspacing="0" height="100%" id="top-activity" style="background: white; font-family: \'Helvetica Neue\', \'Helvetica\', Helvetica, Arial, sans-serif; font-weight: normal; font-style: normal; font-size: 14px; line-height: 1; color: #222222; position: relative; -webkit-font-smoothing: antialiased;background-color:#FAFAFA;height:25% !important; margin:0; padding:0; width:100% !important;" width="100%">' . "<tbody><tr><td align=\"center\" style=\"padding-top:20px;\" valign=\"top\">" . '<table border="0" cellpadding="0" cellspacing="0" id="templateContainer" style="border: 1px solid #DDDDDD;background-color:#FFFFFF;" width="600"><tbody>';
        $msg .= '<tr>
                    <td align="center" valign="top"><!-- // Begin Template Header \\ -->
			<table border="0" cellpadding="0" cellspacing="0" id="templateHeader" width="600">
                            <tbody>
				<tr>
                                    <td class="headerContent" style="color:#202020;font-weight:bold;line-height:100%;padding:0;text-align:center;vertical-align:middle;font-family: inherit;font-weight: normal;font-size: 14px;margin-bottom: 17px"><img id="headerImage campaign-icon" src="' . $image . '" style="border:0; height:auto; line-height:100%; outline:none; text-decoration:none;max-width:600px;" /></td>
                                </tr>
                                <tr>
                                    <td style="color:#202020;font-weight:bold;padding:5px;text-align:center;vertical-align:middle;font-family: inherit;font-weight: normal;font-size: 14px;"><h2>' . Yii::t('profile', 'Activity Feed Report') . '</h2></td>
                                </tr>
                            </tbody>
			</table>
                    <hr width="60%"></td><!-- // End Template Header \\ -->
		</tr>';
        $msg .= '<tr><td align="center" valign="top"><!-- // Begin Template Body \\ -->' . '<table border="0" cellpadding="0" cellspacing="0" id="templateBody" width="600"><tbody><tr>' . '<td valign="top"><!-- // Begin Module: Standard Content \\ -->' . '<table border="0" cellpadding="20" cellspacing="0" width="100%"><tbody>';
        $params = array();
        $userRecord = X2Model::model('Profile')->findByPk($userId);
        $params[':username'] = $userRecord->username;
        $parsedFilters = Events::parseFilters($filters, $params);
        $visibilityCondition = $parsedFilters['conditions']['visibility'];
        $accessCriteria = Events::model()->getAccessCriteria();
        $userCondition = $parsedFilters['conditions']['users'];
        $typeCondition = $parsedFilters['conditions']['types'];
        $subtypeCondition = $parsedFilters['conditions']['subtypes'];
        $condition = "type!='comment' AND (type!='action_reminder' " . "OR user=:username) AND " . "(type!='notif' OR user=:username)" . $visibilityCondition . $userCondition . $typeCondition . $subtypeCondition . ' AND (' . $accessCriteria->condition . ')';
        switch ($range) {
            case 'daily':
                $timeRange = 24 * 60 * 60;
                break;
            case 'weekly':
                $timeRange = 7 * 24 * 60 * 60;
                break;
            case 'monthly':
                $timeRange = 30 * 24 * 60 * 60;
                break;
            default:
                $timeRange = 24 * 60 * 60;
                break;
        }
        $condition .= " AND timestamp BETWEEN " . (time() - $timeRange) . " AND " . time();
        $topTypes = Yii::app()->db->createCommand()->select('type, COUNT(type)')->from('x2_events')->where($condition, array_merge($params, $accessCriteria->params))->group('type')->order('COUNT(type) DESC')->limit(5)->queryAll();
        $topUsers = Yii::app()->db->createCommand()->select('user, COUNT(user)')->from('x2_events')->where($condition, array_merge($params, $accessCriteria->params))->group('user')->order('COUNT(user) DESC')->limit(5)->queryAll();
        $msg .= "<tr><td style='text-align:center;'>";
        $msg .= "<div>" . Yii::t('profile', "Here's your {range} update on what's been going on in X2Engine!", array('{range}' => Yii::t('profile', $range))) . "</div><br>" . "<div>Time Range: <em>" . Formatter::formatDateTime(time() - $timeRange) . "</em> to <em>" . Formatter::formatDateTime(time()) . "</em></div>";
        $msg .= "</tr></td>";
        $msg .= "<tr><td><table width='100%'><tbody>";
        $msg .= "<tr><th>" . Yii::t('profile', "Top Activity") . "</th><th>" . Yii::t('profile', "Top Users") . "</th></tr>";
        for ($i = 0; $i < 5; $i++) {
            $msg .= "<tr><td style='text-align:center;'>";
            if (isset($topTypes[$i])) {
                $type = Events::parseType($topTypes[$i]['type']);
                $count = $topTypes[$i]['COUNT(type)'];
                $msg .= $count . " " . $type;
            }
            $msg .= "</td><td style='text-align:center;'>";
            if (isset($topUsers[$i]) && $topUsers[$i]['COUNT(user)'] > 0) {
                $username = User::getUserLinks($topUsers[$i]['user'], false, true);
                $count = $topUsers[$i]['COUNT(user)'];
                $msg .= $count . " " . Yii::t('profile', "events from") . " " . $username . ".";
            }
            $msg .= "</td></tr>";
        }
        $msg .= "</tbody></table></td></tr>";
        $msg .= "<tr><td style='text-align:center'><hr width='60%'>";
        $msg .= "<tr><td style='text-align:center;'>" . Yii::t('profile', "Here's the {limit} most recent items on the Activity Feed.", array('{limit}' => $limit)) . "</td></tr>";
        $msg .= "</td></tr>";
        $msg .= "<tr><td style='text-align:center'><hr width='60%'><table><tbody>";
        $events = new CActiveDataProvider('Events', array('criteria' => array('condition' => $condition, 'order' => 'timestamp DESC', 'params' => array_merge($params, $accessCriteria->params)), 'pagination' => array('pageSize' => $limit)));
        foreach ($events->getData() as $event) {
            $msg .= "<tr>";
            $avatar = Yii::app()->db->createCommand()->select('avatar')->from('x2_profile')->where('username=:user', array(':user' => $event->user))->queryScalar();
            if (!empty($avatar) && file_exists($avatar)) {
                $avatar = Profile::renderAvatarImage($id, 45, 45);
            } else {
                $avatar = X2Html::x2icon('profile-large', array('class' => 'avatar-image default-avatar', 'style' => "font-size: {$dimensionLimit}px"));
            }
            $typeFile = $event->type;
            if (in_array($event->type, array('email_sent', 'email_opened'))) {
                if (in_array($event->subtype, array('quote', 'invoice'))) {
                    $typeFile .= "_{$event->subtype}";
                }
            }
            if ($event->type == 'record_create') {
                switch ($event->subtype) {
                    case 'call':
                        $typeFile = 'voip_call';
                        break;
                    case 'time':
                        $typeFile = 'log_time';
                        break;
                }
            }
            $img = $avatar;
            if (file_exists(Yii::app()->theme->getBasePath() . '/images/eventIcons/' . $typeFile . '.png')) {
                $imgFile = Yii::app()->getAbsoluteBaseUrl() . '/themes/' . Yii::app()->theme->getName() . '/images/eventIcons/' . $typeFile . '.png';
//.........这里部分代码省略.........
开发者ID:tymiles003,项目名称:X2CRM,代码行数:101,代码来源:Events.php

示例3: renderFullSizeAvatar

 /**
  * Renders the avatar image with max dimension 95x95
  * @param int $id the profile id 
  */
 public static function renderFullSizeAvatar($id, $dimensionLimit = 95)
 {
     $model = Profile::model()->findByPk($id);
     if (isset($model->avatar) && $model->avatar != '' && file_exists($model->avatar)) {
         $imgSize = @getimagesize($model->avatar);
         if (!$imgSize) {
             $imgSize = array(45, 45);
         }
         $maxDimension = max($imgSize[0], $imgSize[1]);
         $scaleFactor = 1;
         if ($maxDimension > $dimensionLimit) {
             $scaleFactor = $dimensionLimit / $maxDimension;
         }
         $imgSize[0] = round($imgSize[0] * $scaleFactor);
         $imgSize[1] = round($imgSize[1] * $scaleFactor);
         echo '<img id="avatar-image" width="' . $imgSize[0] . '" height="' . $imgSize[1] . '" class="avatar-upload" ' . 'src="' . Yii::app()->request->baseUrl . '/' . $model->avatar . '" />';
     } else {
         echo X2Html::x2icon('profile-large', array('class' => 'avatar-image default-avatar', 'style' => "font-size: {$dimensionLimit}px"));
         // echo '<img id="avatar-image" width="'.$dimensionLimit.'" height="'.$dimensionLimit.'" src='.
         // Yii::app()->request->baseUrl."/uploads/default.png".'>';
     }
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:26,代码来源:Profile.php

示例4: getIcon

 public function getIcon()
 {
     return X2Html::x2icon('quotes');
 }
开发者ID:dsyman2,项目名称:X2CRM,代码行数:4,代码来源:QuotesWidget.php

示例5: array

 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/
Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/about-page.css');
$this->layout = '//layouts/column1';
$this->pageTitle = Yii::app()->settings->appName . ' - ' . Yii::t('app', 'About');
$logo = Yii::app()->baseUrl . '/images/x2engine.png';
?>
<div id='icon-container'>
<?php 
if (ThemeGenerator::isThemed()) {
    echo X2Html::x2icon('x2-logo-square', array('id' => 'x2-about-logo'));
} else {
    echo CHtml::image($logo, '');
}
?>
</div>
<?php 
Yii::app()->clientScript->registerScript('loadJqueryVersion', "\$('#jqueryVersion').html(\$().jquery);", CClientScript::POS_READY);
?>

<div class='center-column-container form left' >
    <b><?php 
echo Yii::t('app', 'Version') . " " . Yii::app()->params->version;
?>
</b><br>
	<b><?php 
开发者ID:keyeMyria,项目名称:CRM,代码行数:31,代码来源:about.php


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