本文整理汇总了PHP中X2Html::tag方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Html::tag方法的具体用法?PHP X2Html::tag怎么用?PHP X2Html::tag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类X2Html
的用法示例。
在下文中一共展示了X2Html::tag方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSortLinks
public static function getSortLinks($order = null)
{
$ret = X2Html::link(Yii::t('topics', 'Sorting'), '#', array('id' => 'topics-sort-toggle', 'class' => 'x2-button', 'style' => 'vertical-align:top;'));
$links = array(X2Html::link(Yii::t('topics', 'Most Recent'), Yii::app()->controller->createUrl('/topics/topics/index', array('order' => 'mostRecent')), array('class' => 'x2-button' . ($order == 'mostRecent' || is_null($order) ? ' disabled disabled-link' : ''), 'style' => 'vertical-align:top;')), X2Html::link(Yii::t('topics', 'Alphabetical'), Yii::app()->controller->createUrl('/topics/topics/index', array('order' => 'alphabetical')), array('class' => 'x2-button' . ($order == 'alphabetical' ? ' disabled disabled-link' : ''), 'style' => 'vertical-align:top;')), X2Html::link(Yii::t('topics', 'Create Date'), Yii::app()->controller->createUrl('/topics/topics/index', array('order' => 'firstCreated')), array('class' => 'x2-button' . ($order == 'firstCreated' ? ' disabled disabled-link' : ''), 'style' => 'vertical-align:top;')), X2Html::link(Yii::t('topics', 'Most Popular'), Yii::app()->controller->createUrl('/topics/topics/index', array('order' => 'mostPopular')), array('class' => 'x2-button' . ($order == 'mostPopular' ? ' disabled disabled-link' : ''), 'style' => 'vertical-align:top;')));
$ret .= X2Html::tag('div', array('id' => 'topics-sort-buttons', 'style' => 'display:none;'), implode(' ', $links));
return $ret;
}
示例2: getListViewHeader
public static function getListViewHeader()
{
$linkHeader = X2Html::tag('div', array('class' => 'file-system-object-link'), Yii::t('docs', 'Name'));
$attrHeaderContent = X2Html::tag('span', array('class' => 'file-system-object-owner'), Yii::t('docs', 'Owner')) . X2Html::tag('span', array('class' => 'file-system-object-last-updated'), Yii::t('docs', 'Last Updated')) . X2Html::tag('span', array('class' => 'file-system-object-visibility'), Yii::t('docs', 'Visibility'));
$attrHeader = X2Html::tag('div', array('class' => 'file-system-object-attributes'), $attrHeaderContent);
$headerContent = X2Html::tag('div', array('class' => 'file-system-clear-fix'), $linkHeader . $attrHeader);
return X2Html::tag('div', array('class' => 'file-system-header page-title'), $headerContent);
}
示例3: getGooglePreview
public function getGooglePreview()
{
return X2Html::tag('iframe', array('src' => $this->url . '/preview', 'class' => 'google-drive'), '');
}
示例4: array
?>
</h2></div>
<div class="form">
<div style="max-width: 630px;">
<?php
echo Yii::t('admin', 'This interface allows you to view all potential duplicates within your system and act to resolve them.');
?>
<?php
echo Yii::t('admin', 'Clicking an individual record in one of the grids will take you to the duplicate resolution page for that record and redirect you to this page after resolution.');
?>
</div>
<br>
<div style="max-width:630px;">
<?php
echo Yii::t('admin', 'Currently displaying {type} duplicates.', array('{type}' => $showAll ? Yii::t('admin', 'all') : Yii::t('admin', 'unresolved'))) . ' ' . X2Html::hint(Yii::t('admin', 'Unresolved duplicates are records which have yet to be manually dealt with via the duplicate checker. All duplicates includes records which have already been acted upon.'));
echo "<br><br>" . X2Html::tag('a', array('class' => 'x2-button', 'href' => $this->createUrl('admin/massDedupe', array('showAll' => !$showAll))), $showAll ? Yii::t('admin', 'Show Unresolved') : Yii::t('admin', 'Show All')) . "<br><br>";
?>
</div>
<?php
foreach ($dataProviders as $modelType => $dataProvider) {
Yii::app()->clientScript->registerScript($modelType . '-duplicate-grid', '
$("#' . $modelType . '-show-duplicates").on("click",function(){
if($("#' . $modelType . '-duplicates").is(":visible")){
$(this).removeClass("fa-minus-square");
$(this).addClass("fa-plus-square");
$("#' . $modelType . '-duplicates").hide();
} else {
$(this).removeClass("fa-plus-square");
$(this).addClass("fa-minus-square");
$("#' . $modelType . '-duplicates").show();
}
示例5: renderAttribute
/**
* Renders the attribute and invisible inline edit field
* if user can inline-edit
*/
public function renderAttribute($item, Fields $field)
{
$class = '';
$style = '';
if ($field->type == 'text') {
$class = 'textBox';
$style .= 'min-height:' . $item['height'] . 'px';
}
$html = X2Html::openTag('div', array('class' => "formInputBox {$class}", 'style' => $style));
if ($this->canEdit($field)) {
$html .= $this->renderInput($item, $field);
}
$html .= X2Html::tag('span', array('class' => 'model-attribute', 'id' => $field->modelName . '_' . $field->fieldName . '_field-field'));
if (isset($this->specialFields[$field->fieldName])) {
$html .= $this->specialFields[$field->fieldName];
} else {
if ($field->fieldName == 'name' && $this->nameLink && $this->model->asa('X2LinkableBehavior')) {
$html .= $this->model->link;
} else {
$rendered = $this->model->renderAttribute($field->fieldName, true, false);
if (!$rendered) {
$rendered = ' ';
}
$html .= $rendered;
}
}
$html .= '</span>';
$html .= '</div>';
if ($this->canEdit($field)) {
$html .= $this->renderInlineButtons();
}
return $html;
}
示例6: array_merge
* Free Software Foundation with the addition of the following permission added
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
* IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along with
* this program; if not, see http://www.gnu.org/licenses or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*
* You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
* California 95067, USA. or at email address contact@x2engine.com.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* 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->registerScript($this->id . 'x2PillBoxJS', "\n\n\$(function () {\n new x2.{$this->pillBoxJSClass} (" . CJSON::encode($this->getJSClassParams()) . ");\n});\n\n", CClientScript::POS_END);
echo X2Html::tag('div', array_merge($this->htmlOptions, array('id' => $this->id)), ' ');
示例7: 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;
}
示例8: renderExtra
/**
* Renders the quick create/ Field help icons
*/
public function renderExtra($field)
{
$html = '';
if ($field->type === 'link' && !$this->suppressQuickCreate && isset($this->quickCreateModels[$field->linkType])) {
$html .= X2Html::tag('span', array('class' => "quick-create-button create-{$field->linkType}"), '+');
$this->_quickCreateButtonTypes[] = $field->linkType;
}
if (!empty($field->description)) {
$html .= X2Html::hint($field->description);
}
return $html;
}
示例9: array
*****************************************************************************************/
?>
<div class="view top-level">
<div class="deleteButton">
<?php
$parent = Events::model()->findByPk($data->associationId);
if ($data->user == Yii::app()->user->getName() || $parent->associationId == Yii::app()->user->getId() || Yii::app()->params->isAdmin) {
echo CHtml::link('', array('/profile/deletePost', 'id' => $data->id, 'profileId' => $profileId), array('class' => 'fa fa-close'));
}
//,array('class'=>'x2-button')
?>
</div>
<?php
echo User::getUserLinks($data->user);
echo ' ';
echo X2Html::tag('span', array('class' => 'comment-age x2-hint', 'id' => "-{$data->timestamp}", 'title' => Formatter::formatFeedTimestamp($data->timestamp)), Formatter::formatFeedTimestamp($data->timestamp));
?>
<br/>
<?php
echo $data->text;
?>
</div>
<?php
/*
<div class="view">
<div class="deleteButton">
<?php echo CHtml::link('[x]',array('deleteNote','id'=>$data->id)); //,array('class'=>'x2-button') ?>
<?php //echo CHtml::link("<img src='".Yii::app()->request->baseUrl."/images/deleteButton.png' />",array("deleteNote","id"=>$data->id)); ?>
示例10: array
echo X2Html::tag('div', array('id' => $data->id . '-file-system-object', 'data-type' => $data->type, 'data-id' => $data->objId, 'class' => 'view file-system-object' . ($data->type == 'folder' ? ' file-system-object-folder' : ' file-system-object-doc') . ($data->validDraggable() ? ' draggable-file-system-object' : '') . ($data->validDroppable() ? ' droppable-file-system-object' : '')), '', false);
?>
<div class="file-system-clear-fix">
<div class="file-system-object-link">
<span style="margin-right:5px;"><?php
echo $data->getIcon();
?>
</span>
<span><?php
echo $data->getLink();
?>
</span>
</div>
<div class="file-system-object-attributes">
<div class="file-system-object-owner"><?php
echo $data->getOwner();
?>
</div>
<div class="file-system-object-last-updated"><?php
echo $data->getLastUpdateInfo();
?>
</div>
<div class="file-system-object-visibility"><?php
echo $data->getVisibility();
?>
</div>
</div>
</div>
<?php
echo X2Html::tag('/div');
示例11: array
* 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".
*****************************************************************************************/
$menuOptions = array('index', 'create', 'createEmail', 'createQuote', 'import', 'export');
$this->insertMenu($menuOptions);
Yii::app()->clientScript->registerCssFile(Yii::app()->controller->module->assetsUrl . '/css/index.css');
Yii::app()->clientScript->registerScriptFile(Yii::app()->controller->module->assetsUrl . '/js/FolderManager.js');
Yii::app()->clientScript->registerScript('docsIndexJS', "\nx2.folderManager = new x2.FolderManager (" . CJSON::encode(array('translations' => array('createFolder' => Yii::t('docs', 'Create Folder'), 'deleteFolderConf' => Yii::t('docs', 'Are you sure you want to delete this folder and all of its contents?'), 'deleteDocConf' => Yii::t('docs', 'Are you sure you want to delete this Doc?'), 'folderDeleted' => Yii::t('docs', 'Folder deleted.'), 'docDeleted' => Yii::t('docs', 'Doc deleted.'), 'permissionsMissing' => Yii::t('docs', 'You do not have permission to delete that Doc or folder.')), 'urls' => array('moveFolder' => Yii::app()->controller->createUrl('/docs/moveFolder'), 'index' => Yii::app()->controller->createUrl('/docs/index'), 'deleteFileFolder' => Yii::app()->controller->createUrl('/docs/deleteFileFolder')))) . ");\n", CClientScript::POS_END);
?>
<div>
<?php
$folderViewHeader = FileSystemObject::getListViewHeader();
$columns = array(array('name' => 'gvCheckbox', 'width' => '30px', 'header' => '', 'disabled' => '!$data->objId || $data->objId === -1', 'value' => '$data->objId ? $data->objId : -2'), array('name' => 'name', 'header' => Yii::t('docs', 'Name'), 'type' => 'raw', 'value' => '$data->renderName ()', 'width' => '30%', 'htmlOptions' => array('id' => 'php:$data->id . "-file-system-object"', 'data-type' => 'php:$data->type', 'data-id' => 'php:$data->objId', 'class' => 'php:"view file-system-object".' . "(\$data->type=='folder'?' file-system-object-folder':' file-system-object-doc')")), array('name' => 'owner', 'header' => Yii::t('docs', 'Owner'), 'type' => 'raw', 'value' => '$data->getOwner ();', 'width' => '30%', 'htmlOptions' => array('class' => 'file-system-object-owner')), array('name' => 'lastUpdated', 'header' => Yii::t('docs', 'Last Updated'), 'type' => 'raw', 'value' => '$data->getLastUpdateInfo ();', 'width' => '25%', 'htmlOptions' => array('class' => 'file-system-object-last-updated')), array('name' => 'visibility', 'header' => Yii::t('docs', 'Visibility'), 'type' => 'raw', 'value' => '$data->getVisibility ();', 'width' => '10%', 'htmlOptions' => array('class' => 'file-system-object-visibility')));
$listView = $this->widget('X2GridViewGeneric', array('dataProvider' => $folderDataProvider, 'id' => 'folder-contents', 'baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/listview', 'columns' => $columns, 'template' => '<div class="page-title rounded-top icon docs"><h2>' . Yii::t('docs', 'Docs') . ' </h2>{massActionButtons}{summary}' . X2Html::tag('span', array('id' => 'create-folder-button', 'class' => 'x2-button fa-stack', 'style' => 'float:right;margin-top:5px;'), X2Html::fa('folder fa-stack-2x', array('style' => 'margin-top:1px;')) . X2Html::fa('plus-circle fa-stack-1x fa-inverse', array('style' => 'margin-top:3px;margin-left:5px;'))) . '</div>{items}{pager}', 'afterGridViewUpdateJSString' => 'x2.folderManager.setUpDragAndDrop ();', 'massActions' => array('MassMoveFileSysObjToFolder', 'MassRenameFileSysObj'), 'dataColumnClass' => 'X2DataColumnGeneric', 'rowHtmlOptionsExpression' => 'array (
"class" => ($data->validDraggable() ? " draggable-file-system-object" : "").
($data->validDroppable() ? " droppable-file-system-object" : ""),
)', 'enableColDragging' => false, 'enableGridResizing' => false, 'rememberColumnSort' => false));
?>
</div>
<div id="file-delete" style="text-align:center;display:none;">
<?php
echo X2Html::fa('trash fa-3x fa-border', array('id' => 'delete-drop', 'style' => 'color:red;margin:auto;margin-top:20px;'));
?>
</div>
<br />
<div class='flush-grid-view'>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'attachments-grid', 'baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/gridview', 'template' => '<div class="page-title rounded-top icon docs"><h2>' . Yii::t('docs', 'Uploaded {module}', array('{module}' => Modules::displayName())) . '</h2>{summary}</div>{items}{pager}', 'dataProvider' => $attachments, 'columns' => array(array('name' => 'fileName', 'value' => '$data->getMediaLink()', 'type' => 'raw', 'htmlOptions' => array('width' => '30%')), array('name' => 'uploadedBy', 'value' => 'User::getUserLinks($data->uploadedBy)', 'type' => 'raw'), array('name' => 'createDate', 'type' => 'raw', 'value' => 'Yii::app()->dateFormatter->format(
Yii::app()->locale->getDateFormat("medium"), $data->createDate)'))));
示例12: 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".
*****************************************************************************************/
$menuOptions = array('index', 'create', 'createEmail', 'createQuote', 'import', 'export');
$this->insertMenu($menuOptions);
Yii::app()->clientScript->registerCssFile(Yii::app()->controller->module->assetsUrl . '/css/index.css');
Yii::app()->clientScript->registerScript('docsIndexJS', "\n x2.foldersManager = {};\n x2.foldersManager.setUpDragAndDrop = function(){\n \$('.draggable-file-system-object').draggable({\n delay: 200,\n cursor:'move',\n cursorAt:{top:0,left:0},\n revert:'invalid',\n stack:'.draggable-file-system-object',\n start: function(){\n originalWidth = \$(this).css('width');\n \$(this).css('width','15%');\n \$(this).css('border-radius','4px');\n \$(this).find('.file-system-object-attributes').hide();\n \$(this).find('.file-system-object-link').css('width','100%');\n \$('#file-delete').show();\n },\n stop: function(){\n \$(this).css('width', originalWidth);\n \$(this).css('border-radius','');\n \$(this).find('.file-system-object-link').css('width','30%');\n \$(this).find('.file-system-object-attributes').show();\n \$('#file-delete').hide();\n } \n });\n \$('.droppable-file-system-object').droppable({\n accept:'.draggable-file-system-object',\n activeClass:'x2-active-folder',\n hoverClass:'x2-state-active highlight',\n drop: function(event, ui){\n ui.draggable.hide();\n var type = ui.draggable.attr('data-type');\n var objId = ui.draggable.attr('data-id');\n var destId = \$(this).attr('data-id');\n \$.ajax({\n url:'" . Yii::app()->controller->createUrl('/docs/moveFolder') . "',\n data:{type:type, objId:objId, destId:destId},\n error:function(){\n ui.draggable.show();\n }\n });\n }\n });\n }\n \$(document).on('click','#create-folder-button',function(){\n \$('#folder-form').dialog({\n width: '500px',\n buttons: [\n {\n text: " . CJSON::encode(Yii::t('docs', 'Create Folder')) . ",\n click: function () {\n \$('#folder-form input[type=\"submit\"]').click ();\n }\n }\n ]\n });\n });\n \$(document).on('click','.file-system-object-folder',function(){\n \$.fn.yiiListView.update('folder-contents',{\n url:'" . Yii::app()->controller->createUrl('/docs/index') . "',\n data:{id:\$(this).attr('data-id')},\n complete:function(){\n x2.foldersManager.setUpDragAndDrop();\n }\n }); \n \$('#DocFolders_parentFolder').val(\$(this).attr('data-id')); \n return false;\n });\n \$(document).on('ready',function(){\n x2.foldersManager.setUpDragAndDrop();\n \$('#delete-drop').droppable({\n accept:'.draggable-file-system-object',\n hoverClass:'highlight',\n drop:function(event, ui){\n ui.draggable.hide();\n var type = ui.draggable.attr('data-type');\n var id = ui.draggable.attr('data-id');\n var message = ui.draggable.attr('data-type')=='folder'?\n " . CJSON::encode(Yii::t('docs', 'Are you sure you want to delete this folder and all of its ' . 'contents?')) . " :\n " . CJSON::encode(Yii::t('docs', 'Are you sure you want to delete this file?')) . ";\n if(window.confirm(message)){\n \$.ajax({\n url:'" . Yii::app()->controller->createUrl('/docs/deleteFileFolder') . "',\n method:'POST',\n data:{YII_CSRF_TOKEN:x2.csrfToken,type:type, id:id},\n success:function(){\n x2.flashes.displayFlashes({\n 'success':[" . CJSON::encode(Yii::t('docs', 'Successfully deleted.')) . "]});\n },\n error:function(){\n x2.flashes.displayFlashes({\n 'error':[" . CJSON::encode(Yii::t('docs', 'You do not have permission to delete that file or ' . 'folder.')) . "]\n });\n \$.fn.yiiListView.update(\n 'folder-contents', {complete:function(){ \n x2.foldersManager.setUpDragAndDrop(); }});\n }\n });\n }else{\n \$.fn.yiiListView.update(\n 'folder-contents', {\n complete:function(){ x2.foldersManager.setUpDragAndDrop(); }});\n }\n }\n });\n });\n");
?>
<div>
<?php
$folderViewHeader = FileSystemObject::getListViewHeader();
$this->widget('zii.widgets.CListView', array('dataProvider' => $folderDataProvider, 'itemView' => '_viewFileSystemObject', 'id' => 'folder-contents', 'htmlOptions' => array('class' => 'x2-list-view list-view'), 'baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/listview', 'template' => '<div class="page-title rounded-top icon docs"><h2>' . Yii::t('docs', 'Docs') . ' </h2>{summary}' . X2Html::tag('span', array('id' => 'create-folder-button', 'class' => 'x2-button fa-stack', 'style' => 'float:right;margin-top:5px;'), X2Html::fa('folder fa-stack-2x', array('style' => 'margin-top:1px;')) . X2Html::fa('plus-circle fa-stack-1x fa-inverse', array('style' => 'margin-top:3px;margin-left:5px;'))) . '</div>' . $folderViewHeader . '{items}{pager}'));
?>
</div>
<div id="file-delete" style="text-align:center;display:none;">
<?php
echo X2Html::fa('trash fa-3x fa-border', array('id' => 'delete-drop', 'style' => 'color:red;margin:auto;margin-top:20px;'));
?>
</div>
<br />
<div class='flush-grid-view'>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'attachments-grid', 'baseScriptUrl' => Yii::app()->request->baseUrl . '/themes/' . Yii::app()->theme->name . '/css/gridview', 'template' => '<div class="page-title rounded-top icon docs"><h2>' . Yii::t('docs', 'Uploaded {module}', array('{module}' => Modules::displayName())) . '</h2>{summary}</div>{items}{pager}', 'dataProvider' => $attachments, 'columns' => array(array('name' => 'fileName', 'value' => '$data->getMediaLink()', 'type' => 'raw', 'htmlOptions' => array('width' => '30%')), array('name' => 'uploadedBy', 'value' => 'User::getUserLinks($data->uploadedBy)', 'type' => 'raw'), array('name' => 'createDate', 'type' => 'raw', 'value' => 'Yii::app()->dateFormatter->format(
Yii::app()->locale->getDateFormat("medium"), $data->createDate)'))));
?>
</div>
<br>