本文整理汇总了PHP中X2Html::fa方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Html::fa方法的具体用法?PHP X2Html::fa怎么用?PHP X2Html::fa使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类X2Html
的用法示例。
在下文中一共展示了X2Html::fa方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderMoreButton
public function renderMoreButton()
{
$pager = Yii::createComponent(array('class' => Yii::app()->controller->pathAliasBase . 'components.MobileRecordIndexPager', 'pages' => $this->dataProvider->getPagination()));
$currentPage = $pager->getCurrentPage(false);
$pageCount = $pager->getPageCount();
//$href = $pager->createPageUrl ($currentPage + 1),
//$href = UrlUtil::mergeParams (Yii::app()->request->url, array (
//));
if ($currentPage + 1 < $pageCount) {
$html = CHtml::openTag('a', array('href' => $pager->createPageUrl($currentPage + 1), 'class' => 'more-button record-list-item'));
$html .= X2Html::fa('ellipsis-h');
$html .= '<span>' . CHtml::encode(Yii::t('app', 'More')) . '</span>';
$html .= "</a>";
echo $html;
}
}
示例2: array
<ul id="top-contacts-list">
<?php
$bookmarkInfo = array();
foreach ($bookmarkRecords as $record) {
$bookmarkInfo[get_class($record)][] = $record->id;
echo '<li id="contact' . $record->id . '">';
if ($record instanceof Contacts) {
$link = '<strong>' . CHtml::encode($record->firstName) . ' ' . CHtml::encode($record->lastName) . '</strong><br />' . CHtml::encode($record->phone);
} elseif (isset($record->name)) {
$link = '<strong>' . CHtml::encode($record->name) . '</strong><br />';
}
if (isset($link) && $record->asa('X2LinkableBehavior')) {
echo CHtml::link($link, $record->url);
}
unset($link);
echo CHtml::link(X2Html::fa('fa-times'), '#', array('class' => 'delete-link', 'onclick' => "\n x2.topContacts.removeTopContact ('" . $record->id . "', " . CJSON::encode(get_class($record)) . "); \n return false;\n "));
echo "</li>\n";
}
if (isset(Yii::app()->controller->modelClass) && is_subclass_of(Yii::app()->controller->modelClass, 'X2Model') && Yii::app()->controller->action->id == 'view' && $viewId != null && (!isset($bookmarkInfo[Yii::app()->controller->modelClass]) || !in_array($viewId, $bookmarkInfo[Yii::app()->controller->modelClass]))) {
// must not already be in Top Contacts
$currentRecord = X2Model::model(Yii::app()->controller->modelClass)->findByPk($viewId);
if ($currentRecord instanceof Contacts) {
$name = CHtml::encode($currentRecord->firstName) . ' ' . CHtml::encode($currentRecord->lastName);
} elseif (isset($currentRecord->name)) {
$name = CHtml::encode($currentRecord->name);
} else {
$name = '';
}
echo '<li>';
echo CHtml::link(Yii::t('app', 'Add {name}', array('{name}' => $name)), '#', array('onclick' => "\n x2.topContacts.addTopContact('" . $viewId . "', " . CJSON::encode(Yii::app()->controller->modelClass) . "); \n return false;"));
echo "</li>\n";
示例3: renderBoolean
/**
* renders boolean fields in view layouts as icons, instead of as unchecked checkboxes.
*/
protected function renderBoolean($field, $makeLinks, $textOnly, $encode)
{
$fieldName = $field->fieldName;
$bool = $this->owner->{$fieldName};
if ($textOnly) {
$text = $bool ? Yii::t('app', 'Yes') : Yii::t('app', 'No');
return $this->render($text, $encode);
}
$html = $bool ? X2Html::fa('check', array('class' => 'field-checked')) : X2Html::fa('times', array('class' => 'field-unchecked'));
return $html;
}
示例4: renderAttribute
public function renderAttribute($fieldName, $makeLinks = true, $textOnly = true, $encode = true)
{
switch ($fieldName) {
case 'image':
$imageLink = $this->getImage(true);
return '<div class="media-image">
<div class="full-size-screen">' . X2Html::fa('expand') . Yii::t('media', 'View Full Size') . '
</div>
' . $imageLink . '
</div>';
break;
}
return call_user_func_array('parent::' . __FUNCTION__, func_get_args());
}
示例5: array
<div class="icon-container">
<?php
echo X2Html::fa('fa-bullhorn');
?>
</div>
<div class="icon-description">
<p> <?php
echo CHtml::link(Yii::t('app', 'Marketing'), array('/marketing/marketing/index'));
?>
</p>
</div>
</div>
<div class="row">
<div class="icon-container">
<?php
echo X2Html::fa('fa-bullseye');
?>
</div>
<div class="icon-description">
<p> <?php
echo CHtml::link(Yii::t('opportunities', 'Opportunities'), array('/opportunities/opportunities/index'));
?>
</p>
</div>
</div>
<div class="row">
<div class="icon-container">
<?php
echo X2Html::x2icon('package');
?>
</div>
示例6: array
<ul id='email-settings-menu' class='x2-popup-dropdown-menu' style='display: none;'>
<li>
<span><?php
echo Yii::t('app', 'Set Default Template');
?>
</span>
</li>
</ul>
<?php
}
?>
<?php
// echo X2Html::fa ('fa-expand', array (
// 'class' => 'email-fullscreen-button x2-icon-button fa-lg x2-hide',
// ));
echo X2Html::fa('fa-level-down', array('class' => 'email-reattach-button x2-icon-button fa-lg x2-hide', 'style' => 'visibility: hidden;', 'title' => CHtml::encode(Yii::t('app', 'Reattach email form'))));
?>
</div>
<?php
$formConfig = array('enableAjaxValidation' => false, 'method' => 'post');
$form = $this->beginWidget('CActiveForm', $formConfig);
echo X2Html::loadingIcon(array('id' => 'email-sending-icon', 'style' => 'display: none'));
echo $this->specialFields;
echo $form->hiddenField($this->model, 'modelId');
echo CHtml::hiddenField('associationType', $associationType);
echo $form->hiddenField($this->model, 'modelName');
echo CHtml::hiddenField('contactFlag', $this->contactFlag);
?>
<div class='email-inputs form'>
<div class="row">
<div id="inline-email-errors" class="error" style="display:none"></div>
示例7: renderInlineButtons
/**
* renders inline edit buttons in the extra column
*/
public function renderInlineButtons()
{
$html = '<div class="inline-edit-icons">';
$html .= CHtml::link(X2Html::fa('fa-edit'), '#', array('class' => 'edit-icon active', 'title' => Yii::t('app', 'Edit field')));
$html .= CHtml::link(X2Html::fa('fa-times-circle'), '#', array('class' => 'cancel-icon', 'title' => Yii::t('app', 'Cancel changes')));
$html .= CHtml::link(X2Html::fa('fa-check-circle'), '#', array('class' => 'confirm-icon', 'title' => Yii::t('app', 'Confirm changes')));
$html .= '</div>';
return $html;
}
示例8: photoAttachmentButton
public function photoAttachmentButton()
{
$html = '';
$html .= "<div class='photo-attach-button icon-button'>" . X2Html::fa('camera') . '</div>';
return $html;
}
示例9:
<?php
echo MobileFormatter::formatDateRelative($data->timestamp);
?>
</div>
<div class='controls'>
<?php
if ($showComments) {
?>
<div data-x2-url='<?php
echo $this->createAbsoluteUrl('/profile/mobileViewEvent/id/' . $data->id);
?>
'
class='comments'>
<div>
<?php
echo X2Html::fa('comment');
?>
</div>
</div>
<div class='comment-count'>
<?php
if ($commentCount = $data->comments()->count()) {
echo $commentCount;
}
?>
</div>
<?php
}
?>
</div>
</div>
示例10: unset
$fieldHtml = $model->renderAttribute($field->fieldName, true, false);
}
}
if ($fieldHtml === '') {
$htmlString .= ' ';
} else {
$htmlString .= $fieldHtml;
}
$htmlString .= '</span>';
}
}
unset($item);
if ($inlineEdit) {
$htmlString .= CHtml::link(X2Html::fa('fa-edit'), '#', array('class' => 'edit-icon active', 'title' => Yii::t('app', 'Edit field')));
$htmlString .= CHtml::link(X2Html::fa('fa-check-circle'), '#', array('class' => 'confirm-icon', 'title' => Yii::t('app', 'Confirm changes')));
$htmlString .= CHtml::link(X2Html::fa('fa-times-circle'), '#', array('class' => 'cancel-icon', 'title' => Yii::t('app', 'Cancel changes')));
}
$htmlString .= '</div>';
$htmlString .= '</div>';
}
}
$htmlString .= '</td>';
}
}
unset($col);
$htmlString .= '</tr>';
}
$htmlString .= '</table></div>';
}
unset($row);
$htmlString .= '</div>';
示例11:
?>
<div id="campaign-attachments-wrapper" class="x2-layout form-view">
<div class="formSection collapsible <?php
echo $showAttachments ? 'showSection' : '';
?>
">
<div class="formSectionHeader">
<a href="javascript:void(0)" class="formSectionHide">
<?php
echo X2Html::fa('fa-caret-down');
?>
</a>
<a href="javascript:void(0)" class="formSectionShow">
<?php
echo X2Html::fa('fa-caret-right');
?>
</a>
<span class="sectionTitle"><?php
echo Yii::t('app', 'Attachments');
?>
</span>
</div>
<div id="campaign-attachments" class="tableWrapper" style="padding: 5px;
<?php
echo $showAttachments ? '' : 'display: none;';
?>
">
<div style="min-height: 100px;">
<?php
$attachments = $model->attachments;
示例12: renderSectionHeader
/**
* Renders a section header
* @param array $section Section Options
*/
public function renderSectionHeader($section)
{
$html = X2Html::openTag('div', array('class' => 'formSectionHeader'));
// Add the collapse Icon
if ($section['collapsible']) {
$html .= X2Html::link(X2Html::fa('fa-caret-down'), 'javascript:void(0)', array('class' => 'formSectionHide'));
$html .= X2Html::link(X2Html::fa('fa-caret-right'), 'javascript:void(0)', array('class' => 'formSectionShow'));
}
$html .= X2Html::tag('span', array('class' => 'sectionTitle', 'title' => addslashes($section['title'])), Yii::t(strtolower(Yii::app()->controller->id), $section['title']));
$html .= '</div>';
return $html;
}
示例13: array
if ($model instanceof Profile) {
echo CHtml::encode(Modules::displayName(false, 'Users'));
} else {
echo CHtml::encode($this->getModuleObj()->getDisplayName(false));
}
?>
</h1>
</div>
<?php
if ($model instanceof X2Model) {
if ($this->hasMobileAction('mobileUpdate') && Yii::app()->user->checkAccess(ucfirst($this->module->name) . 'Update', $authParams)) {
?>
<div class='refresh-content' data-refresh-selector='.header-content-right'>
<div class='header-content-right'>
<div class='edit-button ui-btn icon-btn'
data-x2-url='<?php
echo $this->createAbsoluteUrl('mobileUpdate', array('id' => $model->id));
?>
'>
<?php
echo X2Html::fa('pencil');
?>
</div>
</div>
</div>
<?php
}
}
$this->renderPartial('application.modules.mobile.views.mobile._recordDetails', array('model' => $model));
示例14: minimizeButton
public static function minimizeButton(array $htmlOptions = array(), $hideableSelector = null, $left = true, $defaultOpen = false)
{
$orientation = $left ? 'left' : 'right';
if ($hideableSelector) {
$js = "\$('{$hideableSelector}').toggle ();";
} else {
$js = "";
}
$html = X2Html::fa('fa-caret-' . $orientation, array_merge(array('style' => !$defaultOpen ? '' : 'display: none;', 'onClick' => '$(this).hide (); $(this).next ().show ();' . $js . '; event.stopPropagation (); event.preventDefault ();'), $htmlOptions)) . X2Html::fa('fa-caret-down', array_merge(array('style' => $defaultOpen ? '' : 'display: none;', 'onClick' => '$(this).hide (); $(this).prev ().show ();' . $js . '; event.stopPropagation (); event.preventDefault ();'), $htmlOptions));
return $html;
}
示例15: getIcon
public function getIcon()
{
return X2Html::fa($this->type === 'folder' ? 'folder-open' : 'file-text');
}